Update createComponents to supply AllocationService instead of AllocationDeciders (#92785)

This commit is contained in:
Ievgen Degtiarenko 2023-01-10 14:18:33 +01:00 committed by GitHub
parent 227181d72b
commit ad229dd70e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 105 additions and 103 deletions

View file

@ -102,7 +102,7 @@ import org.apache.lucene.util.SetOnce;
import org.elasticsearch.Version;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.logging.DeprecationCategory;
@ -166,7 +166,7 @@ public class CommonAnalysisPlugin extends Plugin implements AnalysisPlugin, Scri
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
this.scriptServiceHolder.set(scriptService);
return Collections.emptyList();

View file

@ -11,7 +11,7 @@ package org.elasticsearch.tracing.apm;
import org.apache.lucene.util.SetOnce;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Setting;
@ -81,7 +81,7 @@ public class APM extends Plugin implements NetworkPlugin, TracerPlugin {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer unused,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
final APMTracer apmTracer = tracer.get();

View file

@ -20,7 +20,7 @@ import org.elasticsearch.action.datastreams.PromoteDataStreamAction;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -117,7 +117,7 @@ public class DataStreamsPlugin extends Plugin implements ActionPlugin {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
var service = new UpdateTimeSeriesRangeService(environment.settings(), threadPool, clusterService);
this.service.set(service);

View file

@ -16,7 +16,7 @@ import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -116,7 +116,7 @@ public class IngestGeoIpPlugin extends Plugin implements IngestPlugin, SystemInd
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
try {
String nodeId = nodeEnvironment.nodeId();

View file

@ -14,7 +14,7 @@ import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -147,7 +147,7 @@ public final class PainlessPlugin extends Plugin implements ScriptPlugin, Extens
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
// this is a hack to bind the painless script engine in guice (all components are added to guice), so that
// the painless context api. this is a temporary measure until transport actions do no require guice

View file

@ -13,7 +13,7 @@ import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -100,7 +100,7 @@ public class ReindexPlugin extends Plugin implements ActionPlugin {
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
return Collections.singletonList(new ReindexSslConfig(environment.settings(), environment, resourceWatcherService));
}

View file

@ -21,7 +21,7 @@ import org.elasticsearch.action.support.ActionFilterChain;
import org.elasticsearch.action.support.WriteRequest.RefreshPolicy;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@ -170,7 +170,7 @@ public class ReindexFromRemoteWithAuthTests extends ESSingleNodeTestCase {
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
testFilter.set(new ReindexFromRemoteWithAuthTests.TestFilter(threadPool));
return Collections.emptyList();

View file

@ -13,7 +13,7 @@ import com.azure.core.util.serializer.JacksonAdapter;
import org.apache.lucene.util.SetOnce;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Setting;
@ -97,7 +97,7 @@ public class AzureRepositoryPlugin extends Plugin implements RepositoryPlugin, R
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
AzureClientProvider azureClientProvider = AzureClientProvider.create(threadPool, settings);
azureStoreService.set(createAzureStorageService(settings, azureClientProvider));

View file

@ -15,7 +15,7 @@ import org.elasticsearch.SpecialPermission;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.RepositoryMetadata;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Setting;
@ -102,7 +102,7 @@ public class S3RepositoryPlugin extends Plugin implements RepositoryPlugin, Relo
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
service.set(s3Service(environment));
this.service.get().refreshAndClearCache(S3ClientSettings.load(settings));

View file

@ -11,7 +11,7 @@ package org.elasticsearch.plugin.repository.url;
import org.apache.lucene.util.SetOnce;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.blobstore.url.http.URLHttpClient;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@ -88,7 +88,7 @@ public class URLRepositoryPlugin extends Plugin implements RepositoryPlugin {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
final URLHttpClient.Factory apacheURLHttpClientFactory = new URLHttpClient.Factory();

View file

@ -10,7 +10,7 @@ package org.elasticsearch.runtimefields;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Setting;
@ -76,7 +76,7 @@ public final class RuntimeFieldsCommonPlugin extends Plugin {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
grokHelper.finishInitializing(threadPool);
return List.of();

View file

@ -14,7 +14,7 @@ import org.apache.lucene.util.SetOnce;
import org.elasticsearch.Build;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.core.TimeValue;
@ -91,7 +91,7 @@ public class SystemdPlugin extends Plugin implements ClusterPlugin {
final IndexNameExpressionResolver expressionResolver,
final Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
if (enabled == false) {
extender.set(null);

View file

@ -14,7 +14,7 @@ import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.bytes.BytesReference;
@ -99,7 +99,7 @@ public class AsyncIngestProcessorIT extends ESSingleNodeTestCase {
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
this.threadPool = threadPool;
return List.of();

View file

@ -19,7 +19,7 @@ import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.MappingMetadata;
import org.elasticsearch.cluster.metadata.Metadata;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.Strings;
@ -445,7 +445,7 @@ public class SimpleClusterStateIT extends ESIntegTestCase {
final IndexNameExpressionResolver expressionResolver,
final Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
clusterService.addListener(event -> {
final ClusterState state = event.state();

View file

@ -11,7 +11,7 @@ package org.elasticsearch.cluster.metadata;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Setting;
@ -77,7 +77,7 @@ public class TemplateUpgradeServiceIT extends ESIntegTestCase {
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
clusterService.getClusterSettings()
.addSettingsUpdateConsumer(
@ -97,7 +97,7 @@ public class TemplateUpgradeServiceIT extends ESIntegTestCase {
expressionResolver,
repositoriesServiceSupplier,
tracer,
allocationDeciders
allocationService
);
}

View file

@ -12,7 +12,7 @@ import org.elasticsearch.ResourceNotFoundException;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.metrics.Counters;
@ -107,7 +107,7 @@ public class GetHealthActionIT extends ESIntegTestCase {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
healthIndicatorServices.add(new IlmHealthIndicatorService(clusterService));
healthIndicatorServices.add(new SlmHealthIndicatorService(clusterService));

View file

@ -12,7 +12,7 @@ import org.elasticsearch.action.ActionListener;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Settings;
@ -136,7 +136,7 @@ public class HealthServiceIT extends ESIntegTestCase {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
healthIndicatorServices.add(new TestHealthIndicatorService());
return new ArrayList<>(healthIndicatorServices);

View file

@ -20,7 +20,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.support.WriteRequest;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.bytes.BytesReference;
@ -350,7 +350,7 @@ public class FinalPipelineIT extends ESIntegTestCase {
final IndexNameExpressionResolver expressionResolver,
final Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
return List.of();
}

View file

@ -9,7 +9,7 @@ package org.elasticsearch.index;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.inject.AbstractModule;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@ -75,7 +75,7 @@ public class SettingsListenerIT extends ESIntegTestCase {
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
return Collections.singletonList(service);
}

View file

@ -731,7 +731,7 @@ public class Node implements Closeable {
clusterModule.getIndexNameExpressionResolver(),
repositoriesServiceReference::get,
tracer,
clusterModule.getAllocationService().getAllocationDeciders()
clusterModule.getAllocationService()
)
).toList();

View file

@ -12,7 +12,7 @@ import org.elasticsearch.bootstrap.BootstrapCheck;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.component.LifecycleComponent;
import org.elasticsearch.common.io.stream.NamedWriteable;
@ -82,6 +82,7 @@ public abstract class Plugin implements Closeable {
* @param repositoriesServiceSupplier A supplier for the service that manages snapshot repositories; will return null when this method
* is called, but will return the repositories service once the node is initialized.
* @param tracer An interface for distributed tracing
* @param allocationService A service to manage shard allocation in the cluster
*/
public Collection<Object> createComponents(
Client client,
@ -96,7 +97,7 @@ public abstract class Plugin implements Closeable {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
return Collections.emptyList();
}

View file

@ -13,7 +13,7 @@ import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.SingleNodeShutdownMetadata;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.breaker.CircuitBreaker;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@ -272,7 +272,7 @@ public class PluginIntrospectorTests extends ESTestCase {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
return null;
}

View file

@ -10,7 +10,7 @@ package org.elasticsearch.test;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.ShardRouting;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Setting;
@ -88,7 +88,7 @@ public final class MockIndexEventListener {
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
return Collections.singletonList(listener);
}

View file

@ -10,7 +10,7 @@ import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Setting;
@ -190,7 +190,7 @@ public class AnalyticsPlugin extends Plugin implements SearchPlugin, ActionPlugi
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
return List.of(usage);
}

View file

@ -11,7 +11,7 @@ import org.elasticsearch.client.internal.Client;
import org.elasticsearch.client.internal.OriginSettingClient;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Settings;
@ -73,7 +73,7 @@ public class AsyncResultsIndexPlugin extends Plugin implements SystemIndexPlugin
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
List<Object> components = new ArrayList<>();
if (DiscoveryNode.canContainData(environment.settings())) {

View file

@ -15,6 +15,7 @@ import org.elasticsearch.cluster.NamedDiff;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.Metadata;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@ -119,10 +120,10 @@ public class Autoscaling extends Plugin implements ActionPlugin, ExtensiblePlugi
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
this.clusterServiceHolder.set(clusterService);
this.allocationDeciders.set(allocationDeciders);
this.allocationDeciders.set(allocationService.getAllocationDeciders());
var capacityServiceHolder = new AutoscalingCalculateCapacityService.Holder(this);
this.reservedAutoscalingPolicyAction.set(new ReservedAutoscalingPolicyAction(capacityServiceHolder));
return List.of(capacityServiceHolder, autoscalingLicenseChecker, new AutoscalingNodeInfoService(clusterService, client));

View file

@ -16,8 +16,8 @@ import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.Metadata;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -185,7 +185,7 @@ public class Ccr extends Plugin implements ActionPlugin, PersistentTaskPlugin, E
final IndexNameExpressionResolver expressionResolver,
final Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
this.client = client;
if (enabled == false) {

View file

@ -19,9 +19,9 @@ import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.Metadata;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.routing.allocation.DataTier;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.logging.DeprecationCategory;
@ -307,7 +307,7 @@ public class XPackPlugin extends XPackClientPlugin
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
List<Object> components = new ArrayList<>();

View file

@ -26,9 +26,9 @@ import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
import org.elasticsearch.cluster.metadata.SingleNodeShutdownMetadata;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.CheckedBiConsumer;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@ -201,7 +201,7 @@ public class LocalStateCompositeXPackPlugin extends XPackPlugin
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
List<Object> components = new ArrayList<>();
components.addAll(
@ -218,7 +218,7 @@ public class LocalStateCompositeXPackPlugin extends XPackPlugin
expressionResolver,
repositoriesServiceSupplier,
tracer,
allocationDeciders
allocationService
)
);
@ -238,7 +238,7 @@ public class LocalStateCompositeXPackPlugin extends XPackPlugin
expressionResolver,
repositoriesServiceSupplier,
tracer,
allocationDeciders
allocationService
)
)
);

View file

@ -11,7 +11,7 @@ import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.logging.RateLimitingFilter;
@ -100,7 +100,7 @@ public class Deprecation extends Plugin implements ActionPlugin {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
final DeprecationIndexingTemplateRegistry templateRegistry = new DeprecationIndexingTemplateRegistry(
environment.settings(),

View file

@ -13,7 +13,7 @@ import org.elasticsearch.cluster.NamedDiff;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.Metadata;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -201,7 +201,7 @@ public class EnrichPlugin extends Plugin implements SystemIndexPlugin, IngestPlu
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
EnrichPolicyLocks enrichPolicyLocks = new EnrichPolicyLocks();
EnrichPolicyExecutor enrichPolicyExecutor = new EnrichPolicyExecutor(

View file

@ -12,7 +12,7 @@ import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.breaker.CircuitBreaker;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@ -83,7 +83,7 @@ public class EqlPlugin extends Plugin implements ActionPlugin, CircuitBreakerPlu
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
return createComponents(client, environment.settings(), clusterService);
}

View file

@ -23,7 +23,7 @@ import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.ComposableIndexTemplate;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@ -95,7 +95,7 @@ public class Fleet extends Plugin implements SystemIndexPlugin {
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
FleetTemplateRegistry registry = new FleetTemplateRegistry(
environment.settings(),

View file

@ -14,7 +14,7 @@ import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -98,7 +98,7 @@ public class IdentityProviderPlugin extends Plugin implements ActionPlugin {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
settings = environment.settings();
enabled = ENABLED_SETTING.get(settings);

View file

@ -12,7 +12,7 @@ import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.ClusterStateObserver;
import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.inject.AbstractModule;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@ -74,7 +74,7 @@ public class UpdateSettingsStepTests extends ESSingleNodeTestCase {
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
return List.of(service);
}

View file

@ -15,7 +15,7 @@ import org.elasticsearch.client.internal.OriginSettingClient;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.Metadata;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry;
@ -214,7 +214,7 @@ public class IndexLifecycle extends Plugin implements ActionPlugin, HealthPlugin
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
final List<Object> components = new ArrayList<>();
ILMHistoryTemplateRegistry ilmTemplateRegistry = new ILMHistoryTemplateRegistry(

View file

@ -29,7 +29,7 @@ import org.elasticsearch.cluster.metadata.SingleNodeShutdownMetadata;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodeRole;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.breaker.CircuitBreaker;
import org.elasticsearch.common.collect.MapBuilder;
@ -853,7 +853,7 @@ public class MachineLearning extends Plugin
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
if (enabled == false) {
// special holder for @link(MachineLearningFeatureSetUsage) which needs access to job manager, empty if ML is disabled

View file

@ -12,7 +12,7 @@ import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -130,7 +130,7 @@ public class Monitoring extends Plugin implements ActionPlugin, ReloadablePlugin
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
final ClusterSettings clusterSettings = clusterService.getClusterSettings();
final CleanerService cleanerService = new CleanerService(settings, clusterSettings, threadPool, getLicenseState());

View file

@ -18,8 +18,8 @@ import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.UUIDs;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@ -99,7 +99,7 @@ public class OldLuceneVersions extends Plugin implements IndexStorePlugin, Clust
final IndexNameExpressionResolver resolver,
final Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
this.failShardsListener.set(new FailShardsOnInvalidLicenseClusterListener(getLicenseState(), clusterService.getRerouteService()));
if (DiscoveryNode.isMasterNode(environment.settings())) {

View file

@ -14,7 +14,7 @@ import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -74,7 +74,7 @@ public class ProfilingPlugin extends Plugin implements ActionPlugin {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
logger.info("Profiling is {}", enabled ? "enabled" : "disabled");
return super.createComponents(
@ -90,7 +90,7 @@ public class ProfilingPlugin extends Plugin implements ActionPlugin {
indexNameExpressionResolver,
repositoriesServiceSupplier,
tracer,
allocationDeciders
allocationService
);
}

View file

@ -12,7 +12,7 @@ import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -114,7 +114,7 @@ public class Rollup extends Plugin implements ActionPlugin, PersistentTaskPlugin
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
return emptyList();
}

View file

@ -22,10 +22,10 @@ import org.elasticsearch.cluster.metadata.RepositoryMetadata;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.RerouteService;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.routing.allocation.DataTier;
import org.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@ -331,7 +331,7 @@ public class SearchableSnapshots extends Plugin implements IndexStorePlugin, Eng
final IndexNameExpressionResolver resolver,
final Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
final List<Object> components = new ArrayList<>();
this.repositoriesServiceSupplier = repositoriesServiceSupplier;

View file

@ -22,7 +22,7 @@ import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.CheckedBiConsumer;
import org.elasticsearch.common.Strings;
@ -563,7 +563,7 @@ public class Security extends Plugin
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
try {
return createComponents(

View file

@ -21,7 +21,7 @@ import org.elasticsearch.cluster.ClusterStateListener;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.SingleNodeShutdownMetadata;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.io.stream.StreamInput;
@ -146,7 +146,7 @@ public class NodeShutdownTasksIT extends ESIntegTestCase {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
taskExecutor = new TaskExecutor(client, clusterService, threadPool);
return Collections.singletonList(taskExecutor);

View file

@ -12,7 +12,7 @@ import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -53,7 +53,7 @@ public class ShutdownPlugin extends Plugin implements ActionPlugin {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
NodeSeenService nodeSeenService = new NodeSeenService(clusterService);

View file

@ -11,7 +11,7 @@ import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -99,7 +99,7 @@ public class SqlPlugin extends Plugin implements ActionPlugin {
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
return createComponents(client, environment.settings(), clusterService, namedWriteableRegistry);

View file

@ -8,7 +8,7 @@ package org.elasticsearch.xpack.stack;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Setting;
@ -55,7 +55,7 @@ public class StackPlugin extends Plugin implements ActionPlugin {
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
StackTemplateRegistry templateRegistry = new StackTemplateRegistry(settings, clusterService, threadPool, client, xContentRegistry);
templateRegistry.initialize();

View file

@ -24,7 +24,7 @@ import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
import org.elasticsearch.cluster.metadata.Metadata;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
@ -235,7 +235,7 @@ public class Transform extends Plugin implements SystemIndexPlugin, PersistentTa
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
TransformConfigManager configManager = new IndexBasedTransformConfigManager(
clusterService,

View file

@ -20,7 +20,7 @@ import org.elasticsearch.cluster.coordination.PublicationTransportHandler;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodeRole;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.io.stream.StreamInput;
@ -95,7 +95,7 @@ public class VotingOnlyNodePlugin extends Plugin implements DiscoveryPlugin, Net
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
this.threadPool.set(threadPool);
return Collections.emptyList();

View file

@ -24,7 +24,7 @@ import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@ -307,7 +307,7 @@ public class Watcher extends Plugin implements SystemIndexPlugin, ScriptPlugin,
IndexNameExpressionResolver expressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
AllocationDeciders allocationDeciders
AllocationService allocationService
) {
if (enabled == false) {
return Collections.emptyList();