Skip to content

Commit

Permalink
Remove unused fields (#101509)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreidan authored Oct 30, 2023
1 parent 50d4a28 commit 4db0d14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

import org.apache.lucene.util.SetOnce;
import org.elasticsearch.cluster.routing.allocation.ShardsAvailabilityHealthIndicatorService;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.health.HealthIndicatorService;
import org.elasticsearch.plugin.Inject;
import org.elasticsearch.plugins.HealthPlugin;
import org.elasticsearch.plugins.Plugin;

Expand All @@ -23,8 +21,7 @@ public class ShardsAvailabilityPlugin extends Plugin implements HealthPlugin {

private final SetOnce<ShardsAvailabilityHealthIndicatorService> shardHealthService = new SetOnce<>();

@Inject
public ShardsAvailabilityPlugin(Settings settings) {}
public ShardsAvailabilityPlugin() {}

@Override
public Collection<?> createComponents(PluginServices services) {
Expand Down
12 changes: 2 additions & 10 deletions server/src/main/java/org/elasticsearch/node/NodeConstruction.java
Original file line number Diff line number Diff line change
Expand Up @@ -1043,13 +1043,7 @@ record PluginServiceInstances(
discoveryModule.getCoordinator(),
masterHistoryService
);
final HealthService healthService = createHealthService(
clusterService,
clusterModule,
coordinationDiagnosticsService,
threadPool,
systemIndices
);
final HealthService healthService = createHealthService(clusterService, coordinationDiagnosticsService, threadPool);
HealthPeriodicLogger healthPeriodicLogger = createHealthPeriodicLogger(clusterService, settings, client, healthService);
healthPeriodicLogger.init();
HealthMetadataService healthMetadataService = HealthMetadataService.create(clusterService, settings);
Expand Down Expand Up @@ -1261,10 +1255,8 @@ private static ReloadablePlugin wrapPlugins(List<ReloadablePlugin> reloadablePlu

private HealthService createHealthService(
ClusterService clusterService,
ClusterModule clusterModule,
CoordinationDiagnosticsService coordinationDiagnosticsService,
ThreadPool threadPool,
SystemIndices systemIndices
ThreadPool threadPool
) {
var serverHealthIndicatorServices = Stream.of(
new StableMasterHealthIndicatorService(coordinationDiagnosticsService, clusterService),
Expand Down

0 comments on commit 4db0d14

Please sign in to comment.