Skip to content

Commit 6ce72b7

Browse files
committed
Add project resolver in plugin
1 parent 49adbff commit 6ce72b7

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderTaskExecutor.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -108,24 +108,9 @@ public final class GeoIpDownloaderTaskExecutor extends PersistentTasksExecutor<G
108108

109109
private final ConcurrentHashMap<ProjectId, AtomicBoolean> atLeastOneGeoipProcessorByProject = new ConcurrentHashMap<>();
110110
private final ConcurrentHashMap<ProjectId, AtomicBoolean> taskIsBootstrappedByProject = new ConcurrentHashMap<>();
111-
// TODO: start task add to map, stop task remove from map
112111
private final ConcurrentHashMap<ProjectId, AtomicReference<GeoIpDownloader>> tasks = new ConcurrentHashMap<>();
113112
private final ProjectResolver projectResolver;
114113

115-
GeoIpDownloaderTaskExecutor(Client client, HttpClient httpClient, ClusterService clusterService, ThreadPool threadPool) {
116-
super(GEOIP_DOWNLOADER, threadPool.generic());
117-
this.client = new OriginSettingClient(client, IngestService.INGEST_ORIGIN);
118-
this.httpClient = httpClient;
119-
this.clusterService = clusterService;
120-
this.threadPool = threadPool;
121-
this.settings = clusterService.getSettings();
122-
this.persistentTasksService = new PersistentTasksService(clusterService, threadPool, client);
123-
this.pollInterval = POLL_INTERVAL_SETTING.get(settings);
124-
this.eagerDownload = EAGER_DOWNLOAD_SETTING.get(settings);
125-
this.projectResolver = null;
126-
}
127-
128-
// TODO: consolidate with the other constructor
129114
GeoIpDownloaderTaskExecutor(
130115
Client client,
131116
HttpClient httpClient,

modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/IngestGeoIpPlugin.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ public Collection<?> createComponents(PluginServices services) {
148148
services.client(),
149149
new HttpClient(),
150150
services.clusterService(),
151-
services.threadPool()
151+
services.threadPool(),
152+
services.projectResolver()
152153
);
153154
geoIpDownloaderTaskExecutor.init();
154155

0 commit comments

Comments
 (0)