Skip to content

Commit 9ad422b

Browse files
gargharsh3134Harsh Garg
authored andcommitted
Retaining old constructor of MasterService class to maintain compatibility (opensearch-project#14123)
Signed-off-by: Harsh Garg <[email protected]> Co-authored-by: Harsh Garg <[email protected]>
1 parent 7c0dc4e commit 9ad422b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

server/src/main/java/org/opensearch/cluster/service/ClusterManagerService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import org.opensearch.common.annotation.PublicApi;
1313
import org.opensearch.common.settings.ClusterSettings;
1414
import org.opensearch.common.settings.Settings;
15-
import org.opensearch.telemetry.metrics.noop.NoopMetricsRegistry;
1615
import org.opensearch.threadpool.ThreadPool;
1716

1817
/**
@@ -24,7 +23,7 @@
2423
public class ClusterManagerService extends MasterService {
2524

2625
public ClusterManagerService(Settings settings, ClusterSettings clusterSettings, ThreadPool threadPool) {
27-
super(settings, clusterSettings, threadPool, new ClusterManagerMetrics(NoopMetricsRegistry.INSTANCE));
26+
super(settings, clusterSettings, threadPool);
2827
}
2928

3029
public ClusterManagerService(

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
import org.opensearch.core.concurrency.OpenSearchRejectedExecutionException;
7272
import org.opensearch.discovery.Discovery;
7373
import org.opensearch.node.Node;
74+
import org.opensearch.telemetry.metrics.noop.NoopMetricsRegistry;
7475
import org.opensearch.telemetry.metrics.tags.Tags;
7576
import org.opensearch.threadpool.Scheduler;
7677
import org.opensearch.threadpool.ThreadPool;
@@ -140,6 +141,10 @@ public class MasterService extends AbstractLifecycleComponent {
140141
private final ClusterStateStats stateStats;
141142
private final ClusterManagerMetrics clusterManagerMetrics;
142143

144+
public MasterService(Settings settings, ClusterSettings clusterSettings, ThreadPool threadPool) {
145+
this(settings, clusterSettings, threadPool, new ClusterManagerMetrics(NoopMetricsRegistry.INSTANCE));
146+
}
147+
143148
public MasterService(
144149
Settings settings,
145150
ClusterSettings clusterSettings,

0 commit comments

Comments
 (0)