Skip to content

Commit

Permalink
Retaining old constructor of MasterService class to maintain compatib…
Browse files Browse the repository at this point in the history
…ility (#14123)

Signed-off-by: Harsh Garg <[email protected]>
Co-authored-by: Harsh Garg <[email protected]>
  • Loading branch information
gargharsh3134 and Harsh Garg authored Jun 10, 2024
1 parent c639e9a commit 42d6af6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.common.settings.Settings;
import org.opensearch.telemetry.metrics.noop.NoopMetricsRegistry;
import org.opensearch.threadpool.ThreadPool;

/**
Expand All @@ -24,7 +23,7 @@
public class ClusterManagerService extends MasterService {

public ClusterManagerService(Settings settings, ClusterSettings clusterSettings, ThreadPool threadPool) {
super(settings, clusterSettings, threadPool, new ClusterManagerMetrics(NoopMetricsRegistry.INSTANCE));
super(settings, clusterSettings, threadPool);
}

public ClusterManagerService(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
import org.opensearch.core.concurrency.OpenSearchRejectedExecutionException;
import org.opensearch.discovery.Discovery;
import org.opensearch.node.Node;
import org.opensearch.telemetry.metrics.noop.NoopMetricsRegistry;
import org.opensearch.telemetry.metrics.tags.Tags;
import org.opensearch.threadpool.Scheduler;
import org.opensearch.threadpool.ThreadPool;
Expand Down Expand Up @@ -140,6 +141,10 @@ public class MasterService extends AbstractLifecycleComponent {
private final ClusterStateStats stateStats;
private final ClusterManagerMetrics clusterManagerMetrics;

public MasterService(Settings settings, ClusterSettings clusterSettings, ThreadPool threadPool) {
this(settings, clusterSettings, threadPool, new ClusterManagerMetrics(NoopMetricsRegistry.INSTANCE));
}

public MasterService(
Settings settings,
ClusterSettings clusterSettings,
Expand Down

0 comments on commit 42d6af6

Please sign in to comment.