Skip to content

Commit

Permalink
Retaining the old constructors for classes marked as API changed as p…
Browse files Browse the repository at this point in the history
…art of #12333

Signed-off-by: Harsh Garg <gkharsh@amazon.com>
  • Loading branch information
Harsh Garg committed Jun 2, 2024
1 parent f50121a commit 3028db6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
import org.opensearch.common.util.concurrent.PrioritizedOpenSearchThreadPoolExecutor;
import org.opensearch.common.util.concurrent.ThreadContext;
import org.opensearch.core.concurrency.OpenSearchRejectedExecutionException;
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 @@ -125,6 +126,10 @@ public class ClusterApplierService extends AbstractLifecycleComponent implements
private NodeConnectionsService nodeConnectionsService;
private final ClusterManagerMetrics clusterManagerMetrics;

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

Check warning on line 131 in server/src/main/java/org/opensearch/cluster/service/ClusterApplierService.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/cluster/service/ClusterApplierService.java#L130-L131

Added lines #L130 - L131 were not covered by tests

public ClusterApplierService(
String nodeName,
Settings settings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
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 @@ -21,6 +22,11 @@
*/
@PublicApi(since = "2.2.0")
public class ClusterManagerService extends MasterService {

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

Check warning on line 28 in server/src/main/java/org/opensearch/cluster/service/ClusterManagerService.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/cluster/service/ClusterManagerService.java#L27-L28

Added lines #L27 - L28 were not covered by tests

public ClusterManagerService(
Settings settings,
ClusterSettings clusterSettings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import org.opensearch.common.settings.Settings;
import org.opensearch.index.IndexingPressureService;
import org.opensearch.node.Node;
import org.opensearch.telemetry.metrics.noop.NoopMetricsRegistry;
import org.opensearch.threadpool.ThreadPool;

import java.util.Collections;
Expand Down Expand Up @@ -92,6 +93,10 @@ public class ClusterService extends AbstractLifecycleComponent {

private IndexingPressureService indexingPressureService;

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

Check warning on line 98 in server/src/main/java/org/opensearch/cluster/service/ClusterService.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/cluster/service/ClusterService.java#L97-L98

Added lines #L97 - L98 were not covered by tests

public ClusterService(
Settings settings,
ClusterSettings clusterSettings,
Expand Down

0 comments on commit 3028db6

Please sign in to comment.