diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/shard/IndexShardIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/shard/IndexShardIT.java index 5d389ad5ef11a..823bbf14a1cab 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/shard/IndexShardIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/index/shard/IndexShardIT.java @@ -25,7 +25,7 @@ import org.elasticsearch.cluster.EstimatedHeapUsageCollector; import org.elasticsearch.cluster.InternalClusterInfoService; import org.elasticsearch.cluster.NodeUsageStatsForThreadPools; -import org.elasticsearch.cluster.NodeUsageStatsForThreadPoolsCollector; +import org.elasticsearch.cluster.ThreadPoolUsageCollector; import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.cluster.metadata.ProjectId; import org.elasticsearch.cluster.node.DiscoveryNode; @@ -334,7 +334,7 @@ public void testNodeWriteLoadsArePresent() { ClusterInfoServiceUtils.refresh(clusterInfoService); nodeThreadPoolStats = clusterInfoService.getClusterInfo().getNodeUsageStatsForThreadPools(); - /** Verify that each node has usage stats reported. The test {@link BogusNodeUsageStatsForThreadPoolsCollector} implementation + /** Verify that each node has usage stats reported. The test {@link BogusThreadPoolUsageCollector} implementation * generates random usage values */ ClusterState state = getInstanceFromNode(ClusterService.class).state(); assertEquals(state.nodes().size(), nodeThreadPoolStats.size()); @@ -995,17 +995,17 @@ public ClusterService getClusterService() { } /** - * A simple {@link NodeUsageStatsForThreadPoolsCollector} implementation that creates and returns random + * A simple {@link ThreadPoolUsageCollector} implementation that creates and returns random * {@link NodeUsageStatsForThreadPools} for each node in the cluster. *
* Note: there's an 'org.elasticsearch.cluster.NodeUsageStatsForThreadPoolsCollector' file that declares this implementation so that the
* plugin system can pick it up and use it for the test set-up.
*/
- public static class BogusNodeUsageStatsForThreadPoolsCollector implements NodeUsageStatsForThreadPoolsCollector {
+ public static class BogusThreadPoolUsageCollector implements ThreadPoolUsageCollector {
private final BogusNodeUsageStatsForThreadPoolsCollectorPlugin plugin;
- public BogusNodeUsageStatsForThreadPoolsCollector(BogusNodeUsageStatsForThreadPoolsCollectorPlugin plugin) {
+ public BogusThreadPoolUsageCollector(BogusNodeUsageStatsForThreadPoolsCollectorPlugin plugin) {
this.plugin = plugin;
}
diff --git a/server/src/internalClusterTest/resources/META-INF/services/org.elasticsearch.cluster.NodeUsageStatsForThreadPoolsCollector b/server/src/internalClusterTest/resources/META-INF/services/org.elasticsearch.cluster.ThreadPoolUsageCollector
similarity index 84%
rename from server/src/internalClusterTest/resources/META-INF/services/org.elasticsearch.cluster.NodeUsageStatsForThreadPoolsCollector
rename to server/src/internalClusterTest/resources/META-INF/services/org.elasticsearch.cluster.ThreadPoolUsageCollector
index 787ce436c3ca6..3befdbfe98262 100644
--- a/server/src/internalClusterTest/resources/META-INF/services/org.elasticsearch.cluster.NodeUsageStatsForThreadPoolsCollector
+++ b/server/src/internalClusterTest/resources/META-INF/services/org.elasticsearch.cluster.ThreadPoolUsageCollector
@@ -7,4 +7,4 @@
# License v3.0 only", or the "Server Side Public License, v 1".
#
-org.elasticsearch.index.shard.IndexShardIT$BogusNodeUsageStatsForThreadPoolsCollector
+org.elasticsearch.index.shard.IndexShardIT$BogusThreadPoolUsageCollector
diff --git a/server/src/main/java/org/elasticsearch/cluster/InternalClusterInfoService.java b/server/src/main/java/org/elasticsearch/cluster/InternalClusterInfoService.java
index d4ecec83ebc8c..9ef496749e01f 100644
--- a/server/src/main/java/org/elasticsearch/cluster/InternalClusterInfoService.java
+++ b/server/src/main/java/org/elasticsearch/cluster/InternalClusterInfoService.java
@@ -113,7 +113,7 @@ public class InternalClusterInfoService implements ClusterInfoService, ClusterSt
private final Object mutex = new Object();
private final List
* Results are returned as a map of node ID to node usage stats.
*/
-public interface NodeUsageStatsForThreadPoolsCollector {
+public interface ThreadPoolUsageCollector {
/**
* This will be used when there is no NodeUsageLoadCollector available.
*/
- NodeUsageStatsForThreadPoolsCollector EMPTY = listener -> listener.onResponse(Map.of());
+ ThreadPoolUsageCollector EMPTY = listener -> listener.onResponse(Map.of());
/**
* Collects the write load estimates from the cluster.
diff --git a/server/src/main/java/org/elasticsearch/node/NodeServiceProvider.java b/server/src/main/java/org/elasticsearch/node/NodeServiceProvider.java
index 326002c7d346c..71c59eba642b1 100644
--- a/server/src/main/java/org/elasticsearch/node/NodeServiceProvider.java
+++ b/server/src/main/java/org/elasticsearch/node/NodeServiceProvider.java
@@ -14,7 +14,7 @@
import org.elasticsearch.cluster.ClusterInfoService;
import org.elasticsearch.cluster.EstimatedHeapUsageCollector;
import org.elasticsearch.cluster.InternalClusterInfoService;
-import org.elasticsearch.cluster.NodeUsageStatsForThreadPoolsCollector;
+import org.elasticsearch.cluster.ThreadPoolUsageCollector;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.breaker.CircuitBreaker;
@@ -80,9 +80,9 @@ ClusterInfoService newClusterInfoService(
EstimatedHeapUsageCollector.class,
() -> EstimatedHeapUsageCollector.EMPTY
);
- final NodeUsageStatsForThreadPoolsCollector nodeUsageStatsForThreadPoolsCollector = pluginsService.loadSingletonServiceProvider(
- NodeUsageStatsForThreadPoolsCollector.class,
- () -> NodeUsageStatsForThreadPoolsCollector.EMPTY
+ final ThreadPoolUsageCollector nodeUsageStatsForThreadPoolsCollector = pluginsService.loadSingletonServiceProvider(
+ ThreadPoolUsageCollector.class,
+ () -> ThreadPoolUsageCollector.EMPTY
);
final InternalClusterInfoService service = new InternalClusterInfoService(
settings,
diff --git a/server/src/test/java/org/elasticsearch/cluster/InternalClusterInfoServiceSchedulingTests.java b/server/src/test/java/org/elasticsearch/cluster/InternalClusterInfoServiceSchedulingTests.java
index 6e80e0d087993..13bfb24eee641 100644
--- a/server/src/test/java/org/elasticsearch/cluster/InternalClusterInfoServiceSchedulingTests.java
+++ b/server/src/test/java/org/elasticsearch/cluster/InternalClusterInfoServiceSchedulingTests.java
@@ -84,9 +84,7 @@ protected PrioritizedEsThreadPoolExecutor createThreadPoolExecutor() {
final FakeClusterInfoServiceClient client = new FakeClusterInfoServiceClient(threadPool);
final EstimatedHeapUsageCollector mockEstimatedHeapUsageCollector = spy(new StubEstimatedEstimatedHeapUsageCollector());
- final NodeUsageStatsForThreadPoolsCollector mockNodeUsageStatsForThreadPoolsCollector = spy(
- new StubNodeUsageStatsForThreadPoolsCollector()
- );
+ final ThreadPoolUsageCollector mockNodeUsageStatsForThreadPoolsCollector = spy(new StubThreadPoolUsageCollector());
final InternalClusterInfoService clusterInfoService = new InternalClusterInfoService(
settings,
clusterService,
@@ -164,10 +162,10 @@ public void collectClusterHeapUsage(ActionListener