Skip to content

Commit c349636

Browse files
authored
Remove the use of AbstractLifecycleComponent constructor Backport#37488 (#37522)
The AbstractLifecycleComponent used to extend AbstractComponent, so it had to pass settings to the constructor of its supper class. It no longer extends the AbstractComponent so there is no need for this constructor There is also no need for AbstractLifecycleComponent subclasses to have Settings in their constructors if they were only passing it over to super constructor. This is part 1. which will be backported to 6.x with a migration guide/deprecation log. part 2 will have this constructor removed in 7 relates #35560 relates #34488
1 parent 3cdfcb4 commit c349636

File tree

41 files changed

+20
-56
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+20
-56
lines changed

plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/management/AzureComputeServiceImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ public class AzureComputeServiceImpl extends AbstractLifecycleComponent
5252
private final String serviceName;
5353

5454
public AzureComputeServiceImpl(Settings settings) {
55-
super(settings);
5655
String subscriptionId = getRequiredSetting(settings, Management.SUBSCRIPTION_ID_SETTING);
5756

5857
serviceName = getRequiredSetting(settings, Management.SERVICE_NAME_SETTING);

plugins/discovery-gce/src/main/java/org/elasticsearch/cloud/gce/GceMetadataService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public class GceMetadataService extends AbstractLifecycleComponent {
5353
private HttpTransport gceHttpTransport;
5454

5555
public GceMetadataService(Settings settings) {
56-
super(settings);
5756
this.settings = settings;
5857
}
5958

server/src/main/java/org/elasticsearch/cluster/NodeConnectionsService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public class NodeConnectionsService extends AbstractLifecycleComponent {
7575

7676
@Inject
7777
public NodeConnectionsService(Settings settings, ThreadPool threadPool, TransportService transportService) {
78-
super(settings);
7978
this.threadPool = threadPool;
8079
this.transportService = transportService;
8180
this.reconnectInterval = NodeConnectionsService.CLUSTER_NODE_RECONNECT_INTERVAL_SETTING.get(settings);

server/src/main/java/org/elasticsearch/cluster/routing/DelayedAllocationService.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.elasticsearch.cluster.service.ClusterService;
3131
import org.elasticsearch.common.component.AbstractLifecycleComponent;
3232
import org.elasticsearch.common.inject.Inject;
33-
import org.elasticsearch.common.settings.Settings;
3433
import org.elasticsearch.common.unit.TimeValue;
3534
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
3635
import org.elasticsearch.common.util.concurrent.FutureUtils;
@@ -130,9 +129,8 @@ public void onFailure(String source, Exception e) {
130129
}
131130

132131
@Inject
133-
public DelayedAllocationService(Settings settings, ThreadPool threadPool, ClusterService clusterService,
132+
public DelayedAllocationService(ThreadPool threadPool, ClusterService clusterService,
134133
AllocationService allocationService) {
135-
super(settings);
136134
this.threadPool = threadPool;
137135
this.clusterService = clusterService;
138136
this.allocationService = allocationService;

server/src/main/java/org/elasticsearch/cluster/routing/RoutingService.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.elasticsearch.common.Priority;
3131
import org.elasticsearch.common.component.AbstractLifecycleComponent;
3232
import org.elasticsearch.common.inject.Inject;
33-
import org.elasticsearch.common.settings.Settings;
3433

3534
import java.util.concurrent.atomic.AtomicBoolean;
3635

@@ -57,8 +56,7 @@ public class RoutingService extends AbstractLifecycleComponent {
5756
private AtomicBoolean rerouting = new AtomicBoolean();
5857

5958
@Inject
60-
public RoutingService(Settings settings, ClusterService clusterService, AllocationService allocationService) {
61-
super(settings);
59+
public RoutingService(ClusterService clusterService, AllocationService allocationService) {
6260
this.clusterService = clusterService;
6361
this.allocationService = allocationService;
6462
}

server/src/main/java/org/elasticsearch/cluster/service/ClusterApplierService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ public class ClusterApplierService extends AbstractLifecycleComponent implements
104104

105105
public ClusterApplierService(String nodeName, Settings settings, ClusterSettings clusterSettings, ThreadPool threadPool,
106106
Supplier<ClusterState.Builder> stateBuilderSupplier) {
107-
super(settings);
108107
this.clusterSettings = clusterSettings;
109108
this.threadPool = threadPool;
110109
this.state = new AtomicReference<>();

server/src/main/java/org/elasticsearch/cluster/service/ClusterService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public class ClusterService extends AbstractLifecycleComponent {
7676

7777
public ClusterService(Settings settings, ClusterSettings clusterSettings, ThreadPool threadPool,
7878
Map<String, Supplier<ClusterState.Custom>> initialClusterStateCustoms) {
79-
super(settings);
8079
this.settings = settings;
8180
this.nodeName = Node.NODE_NAME_SETTING.get(settings);
8281
this.masterService = new MasterService(nodeName, settings, threadPool);

server/src/main/java/org/elasticsearch/cluster/service/MasterService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public class MasterService extends AbstractLifecycleComponent {
8585
private volatile Batcher taskBatcher;
8686

8787
public MasterService(String nodeName, Settings settings, ThreadPool threadPool) {
88-
super(settings);
8988
this.nodeName = nodeName;
9089
// TODO: introduce a dedicated setting for master service
9190
this.slowTaskLoggingThreshold = CLUSTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.get(settings);

server/src/main/java/org/elasticsearch/common/component/AbstractLifecycleComponent.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ public abstract class AbstractLifecycleComponent implements LifecycleComponent {
3434

3535
private final List<LifecycleListener> listeners = new CopyOnWriteArrayList<>();
3636

37+
protected AbstractLifecycleComponent() {}
38+
39+
/**
40+
* @deprecated the settings parameters are not used, therefore the use of this constructor is deprecated.
41+
* Going to be removed in subsequent versions. The parameterless constructor should be used instead.
42+
*/
43+
@Deprecated
3744
protected AbstractLifecycleComponent(Settings settings) {
3845
// TODO drop settings from ctor
3946
}

server/src/main/java/org/elasticsearch/discovery/single/SingleNodeDiscovery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class SingleNodeDiscovery extends AbstractLifecycleComponent implements D
5757

5858
public SingleNodeDiscovery(final Settings settings, final TransportService transportService,
5959
final MasterService masterService, final ClusterApplier clusterApplier) {
60-
super(Objects.requireNonNull(settings));
60+
Objects.requireNonNull(settings);
6161
this.clusterName = ClusterName.CLUSTER_NAME_SETTING.get(settings);
6262
this.transportService = Objects.requireNonNull(transportService);
6363
masterService.setClusterStateSupplier(() -> clusterState);

server/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ public ZenDiscovery(Settings settings, ThreadPool threadPool, TransportService t
159159
NamedWriteableRegistry namedWriteableRegistry, MasterService masterService, ClusterApplier clusterApplier,
160160
ClusterSettings clusterSettings, UnicastHostsProvider hostsProvider, AllocationService allocationService,
161161
Collection<BiConsumer<DiscoveryNode, ClusterState>> onJoinValidators) {
162-
super(settings);
163162
this.onJoinValidators = addBuiltInJoinValidators(onJoinValidators);
164163
this.masterService = masterService;
165164
this.clusterApplier = clusterApplier;

server/src/main/java/org/elasticsearch/gateway/GatewayService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ public GatewayService(Settings settings, AllocationService allocationService, Cl
9797
ThreadPool threadPool, GatewayMetaState metaState,
9898
TransportNodesListGatewayMetaState listGatewayMetaState,
9999
IndicesService indicesService) {
100-
super(settings);
101100
this.gateway = new Gateway(settings, clusterService, listGatewayMetaState,
102101
indicesService);
103102
this.allocationService = allocationService;

server/src/main/java/org/elasticsearch/indices/IndicesService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ public IndicesService(Settings settings, PluginsService pluginsService, NodeEnvi
220220
ScriptService scriptService, Client client, MetaStateService metaStateService,
221221
Collection<Function<IndexSettings, Optional<EngineFactory>>> engineFactoryProviders,
222222
Map<String, Function<IndexSettings, IndexStore>> indexStoreFactories) {
223-
super(settings);
224223
this.settings = settings;
225224
this.threadPool = threadPool;
226225
this.pluginsService = pluginsService;

server/src/main/java/org/elasticsearch/indices/breaker/CircuitBreakerService.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.apache.logging.log4j.Logger;
2424
import org.elasticsearch.common.breaker.CircuitBreaker;
2525
import org.elasticsearch.common.component.AbstractLifecycleComponent;
26-
import org.elasticsearch.common.settings.Settings;
2726

2827
/**
2928
* Interface for Circuit Breaker services, which provide breakers to classes
@@ -32,8 +31,7 @@
3231
public abstract class CircuitBreakerService extends AbstractLifecycleComponent {
3332
private static final Logger logger = LogManager.getLogger(CircuitBreakerService.class);
3433

35-
protected CircuitBreakerService(Settings settings) {
36-
super(settings);
34+
protected CircuitBreakerService() {
3735
}
3836

3937
/**

server/src/main/java/org/elasticsearch/indices/breaker/HierarchyCircuitBreakerService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public class HierarchyCircuitBreakerService extends CircuitBreakerService {
9090
private final AtomicLong parentTripCount = new AtomicLong(0);
9191

9292
public HierarchyCircuitBreakerService(Settings settings, ClusterSettings clusterSettings) {
93-
super(settings);
93+
super();
9494
this.fielddataSettings = new BreakerSettings(CircuitBreaker.FIELDDATA,
9595
FIELDDATA_CIRCUIT_BREAKER_LIMIT_SETTING.get(settings).getBytes(),
9696
FIELDDATA_CIRCUIT_BREAKER_OVERHEAD_SETTING.get(settings),

server/src/main/java/org/elasticsearch/indices/breaker/NoneCircuitBreakerService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
import org.elasticsearch.common.breaker.CircuitBreaker;
2323
import org.elasticsearch.common.breaker.NoopCircuitBreaker;
24-
import org.elasticsearch.common.settings.Settings;
2524

2625
/**
2726
* Class that returns a breaker that never breaks
@@ -31,7 +30,7 @@ public class NoneCircuitBreakerService extends CircuitBreakerService {
3130
private final CircuitBreaker breaker = new NoopCircuitBreaker(CircuitBreaker.FIELDDATA);
3231

3332
public NoneCircuitBreakerService() {
34-
super(Settings.EMPTY);
33+
super();
3534
}
3635

3736
@Override

server/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ public IndicesClusterStateService(
171171
final SnapshotShardsService snapshotShardsService,
172172
final PrimaryReplicaSyncer primaryReplicaSyncer,
173173
final Consumer<ShardId> globalCheckpointSyncer) {
174-
super(settings);
175174
this.settings = settings;
176175
this.buildInIndexListener =
177176
Arrays.asList(

server/src/main/java/org/elasticsearch/monitor/MonitorService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public class MonitorService extends AbstractLifecycleComponent {
4242

4343
public MonitorService(Settings settings, NodeEnvironment nodeEnvironment, ThreadPool threadPool,
4444
ClusterInfoService clusterInfoService) throws IOException {
45-
super(settings);
4645
this.jvmGcMonitorService = new JvmGcMonitorService(settings, threadPool);
4746
this.osService = new OsService(settings);
4847
this.processService = new ProcessService(settings);

server/src/main/java/org/elasticsearch/monitor/jvm/JvmGcMonitorService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ public String toString() {
107107
}
108108

109109
public JvmGcMonitorService(Settings settings, ThreadPool threadPool) {
110-
super(settings);
111110
this.threadPool = threadPool;
112111

113112
this.enabled = ENABLED_SETTING.get(settings);

server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent imp
243243
* @param settings Settings for the node this repository object is created on
244244
*/
245245
protected BlobStoreRepository(RepositoryMetaData metadata, Settings settings, NamedXContentRegistry namedXContentRegistry) {
246-
super(settings);
247246
this.settings = settings;
248247
this.metadata = metadata;
249248
this.namedXContentRegistry = namedXContentRegistry;

server/src/main/java/org/elasticsearch/search/SearchService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ public class SearchService extends AbstractLifecycleComponent implements IndexEv
196196
public SearchService(ClusterService clusterService, IndicesService indicesService,
197197
ThreadPool threadPool, ScriptService scriptService, BigArrays bigArrays, FetchPhase fetchPhase,
198198
ResponseCollectorService responseCollectorService) {
199-
super(clusterService.getSettings());
200199
Settings settings = clusterService.getSettings();
201200
this.threadPool = threadPool;
202201
this.clusterService = clusterService;

server/src/main/java/org/elasticsearch/snapshots/SnapshotShardsService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ public class SnapshotShardsService extends AbstractLifecycleComponent implements
127127
public SnapshotShardsService(Settings settings, ClusterService clusterService, SnapshotsService snapshotsService,
128128
ThreadPool threadPool, TransportService transportService, IndicesService indicesService,
129129
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
130-
super(settings);
131130
this.settings = settings;
132131
this.indicesService = indicesService;
133132
this.snapshotsService = snapshotsService;

server/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ public class SnapshotsService extends AbstractLifecycleComponent implements Clus
124124
@Inject
125125
public SnapshotsService(Settings settings, ClusterService clusterService, IndexNameExpressionResolver indexNameExpressionResolver,
126126
RepositoriesService repositoriesService, ThreadPool threadPool) {
127-
super(settings);
128127
this.clusterService = clusterService;
129128
this.indexNameExpressionResolver = indexNameExpressionResolver;
130129
this.repositoriesService = repositoriesService;

server/src/main/java/org/elasticsearch/transport/TcpTransport.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ public abstract class TcpTransport extends AbstractLifecycleComponent implements
156156
public TcpTransport(String transportName, Settings settings, Version version, ThreadPool threadPool,
157157
PageCacheRecycler pageCacheRecycler, CircuitBreakerService circuitBreakerService,
158158
NamedWriteableRegistry namedWriteableRegistry, NetworkService networkService) {
159-
super(settings);
160159
this.settings = settings;
161160
this.profileSettings = getProfileSettings(settings);
162161
this.version = version;

server/src/main/java/org/elasticsearch/transport/TransportService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ public TransportService(Settings settings, Transport transport, ThreadPool threa
155155
public TransportService(Settings settings, Transport transport, ThreadPool threadPool, TransportInterceptor transportInterceptor,
156156
Function<BoundTransportAddress, DiscoveryNode> localNodeFactory, @Nullable ClusterSettings clusterSettings,
157157
Set<String> taskHeaders, ConnectionManager connectionManager) {
158-
super(settings);
159158
// The only time we do not want to validate node connections is when this is a transport client using the simple node sampler
160159
this.validateConnections = TransportClient.CLIENT_TYPE.equals(settings.get(Client.CLIENT_TYPE_SETTING_S.getKey())) == false ||
161160
TransportClient.CLIENT_TRANSPORT_SNIFF.get(settings);

server/src/main/java/org/elasticsearch/watcher/ResourceWatcherService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public enum Frequency {
9090

9191
@Inject
9292
public ResourceWatcherService(Settings settings, ThreadPool threadPool) {
93-
super(settings);
9493
this.enabled = ENABLED.get(settings);
9594
this.threadPool = threadPool;
9695

server/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationServiceTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public void createDelayedAllocationService() {
6969
threadPool = new TestThreadPool(getTestName());
7070
clusterService = mock(ClusterService.class);
7171
allocationService = createAllocationService(Settings.EMPTY, new DelayedShardsMockGatewayAllocator());
72-
delayedAllocationService = new TestDelayAllocationService(Settings.EMPTY, threadPool, clusterService, allocationService);
72+
delayedAllocationService = new TestDelayAllocationService(threadPool, clusterService, allocationService);
7373
verify(clusterService).addListener(delayedAllocationService);
7474
}
7575

@@ -464,9 +464,9 @@ public void testDelayedUnassignedScheduleRerouteRescheduledOnShorterDelay() thro
464464
private static class TestDelayAllocationService extends DelayedAllocationService {
465465
private volatile long nanoTimeOverride = -1L;
466466

467-
TestDelayAllocationService(Settings settings, ThreadPool threadPool, ClusterService clusterService,
468-
AllocationService allocationService) {
469-
super(settings, threadPool, clusterService, allocationService);
467+
private TestDelayAllocationService(ThreadPool threadPool, ClusterService clusterService,
468+
AllocationService allocationService) {
469+
super(threadPool, clusterService, allocationService);
470470
}
471471

472472
@Override

server/src/test/java/org/elasticsearch/cluster/routing/RoutingServiceTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
package org.elasticsearch.cluster.routing;
2121

22-
import org.elasticsearch.common.settings.Settings;
2322
import org.elasticsearch.cluster.ESAllocationTestCase;
2423
import org.junit.Before;
2524

@@ -47,7 +46,7 @@ private class TestRoutingService extends RoutingService {
4746
private AtomicBoolean rerouted = new AtomicBoolean();
4847

4948
TestRoutingService() {
50-
super(Settings.EMPTY, null, null);
49+
super(null, null);
5150
}
5251

5352
public boolean hasReroutedAndClear() {

server/src/test/java/org/elasticsearch/common/network/NetworkModuleTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ public void tearDown() throws Exception {
7373
}
7474

7575
static class FakeHttpTransport extends AbstractLifecycleComponent implements HttpServerTransport {
76-
FakeHttpTransport() {
77-
super(null);
78-
}
7976
@Override
8077
protected void doStart() {}
8178
@Override

server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3111,7 +3111,6 @@ private abstract static class RestoreOnlyRepository extends AbstractLifecycleCom
31113111
private final String indexName;
31123112

31133113
RestoreOnlyRepository(String indexName) {
3114-
super(Settings.EMPTY);
31153114
this.indexName = indexName;
31163115
}
31173116

server/src/test/java/org/elasticsearch/rest/RestControllerTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,6 @@ private static final class TestHttpServerTransport extends AbstractLifecycleComp
473473
HttpServerTransport {
474474

475475
TestHttpServerTransport() {
476-
super(Settings.EMPTY);
477476
}
478477

479478
@Override

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/Ccr.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public Collection<Object> createComponents(
163163
return emptyList();
164164
}
165165

166-
CcrRestoreSourceService restoreSourceService = new CcrRestoreSourceService(settings);
166+
CcrRestoreSourceService restoreSourceService = new CcrRestoreSourceService();
167167
this.restoreSourceService.set(restoreSourceService);
168168
return Arrays.asList(
169169
ccrLicenseChecker,

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/CcrRepositoryManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class CcrRepositoryManager extends AbstractLifecycleComponent {
2828
private final RemoteSettingsUpdateListener updateListener;
2929

3030
CcrRepositoryManager(Settings settings, ClusterService clusterService, NodeClient client) {
31-
super(settings);
3231
this.client = client;
3332
updateListener = new RemoteSettingsUpdateListener(settings);
3433
updateListener.listenForUpdates(clusterService.getClusterSettings());

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/repository/CcrRepository.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public class CcrRepository extends AbstractLifecycleComponent implements Reposit
7272
private final CcrLicenseChecker ccrLicenseChecker;
7373

7474
public CcrRepository(RepositoryMetaData metadata, Client client, CcrLicenseChecker ccrLicenseChecker, Settings settings) {
75-
super(settings);
7675
this.metadata = metadata;
7776
assert metadata.name().startsWith(NAME_PREFIX) : "CcrRepository metadata.name() must start with: " + NAME_PREFIX;
7877
this.remoteClusterAlias = Strings.split(metadata.name(), NAME_PREFIX)[1];

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/repository/CcrRestoreSourceService.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ public class CcrRestoreSourceService extends AbstractLifecycleComponent implemen
3838
private final CopyOnWriteArrayList<Consumer<String>> openSessionListeners = new CopyOnWriteArrayList<>();
3939
private final CopyOnWriteArrayList<Consumer<String>> closeSessionListeners = new CopyOnWriteArrayList<>();
4040

41-
public CcrRestoreSourceService(Settings settings) {
42-
super(settings);
43-
}
44-
4541
@Override
4642
public synchronized void afterIndexShardClosed(ShardId shardId, @Nullable IndexShard indexShard, Settings indexSettings) {
4743
if (indexShard != null) {

x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/repository/CcrRestoreSourceServiceTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class CcrRestoreSourceServiceTests extends IndexShardTestCase {
2323
@Before
2424
public void setUp() throws Exception {
2525
super.setUp();
26-
restoreSourceService = new CcrRestoreSourceService(Settings.EMPTY);
26+
restoreSourceService = new CcrRestoreSourceService();
2727
}
2828

2929
public void testOpenSession() throws IOException {

x-pack/plugin/core/src/main/java/org/elasticsearch/license/LicenseService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ public class LicenseService extends AbstractLifecycleComponent implements Cluste
121121

122122
public LicenseService(Settings settings, ClusterService clusterService, Clock clock, Environment env,
123123
ResourceWatcherService resourceWatcherService, XPackLicenseState licenseState) {
124-
super(settings);
125124
this.settings = settings;
126125
this.clusterService = clusterService;
127126
this.clock = clock;

x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ private static void deprecateMinusOne(final TimeValue value) {
118118

119119
MonitoringService(Settings settings, ClusterService clusterService, ThreadPool threadPool,
120120
Set<Collector> collectors, Exporters exporters) {
121-
super(settings);
122121
this.clusterService = Objects.requireNonNull(clusterService);
123122
this.threadPool = Objects.requireNonNull(threadPool);
124123
this.collectors = Objects.requireNonNull(collectors);

0 commit comments

Comments
 (0)