diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java index 948ada624df..d3bfb91c9ca 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java @@ -87,7 +87,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache("test1", "test2"), true); verify(_flush("test1", "test2"),true); verify(segments("test1", "test2"), true); - verify(stats("test1", "test2"), true); + verify(indicesStats("test1", "test2"), true); verify(forceMerge("test1", "test2"), true); verify(refreshBuilder("test1", "test2"), true); verify(validateQuery("test1", "test2"), true); @@ -104,7 +104,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache("test1", "test2").setIndicesOptions(options), true); verify(_flush("test1", "test2").setIndicesOptions(options),true); verify(segments("test1", "test2").setIndicesOptions(options), true); - verify(stats("test1", "test2").setIndicesOptions(options), true); + verify(indicesStats("test1", "test2").setIndicesOptions(options), true); verify(forceMerge("test1", "test2").setIndicesOptions(options), true); verify(refreshBuilder("test1", "test2").setIndicesOptions(options), true); verify(validateQuery("test1", "test2").setIndicesOptions(options), true); @@ -121,7 +121,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache("test1", "test2").setIndicesOptions(options), false); verify(_flush("test1", "test2").setIndicesOptions(options), false); verify(segments("test1", "test2").setIndicesOptions(options), false); - verify(stats("test1", "test2").setIndicesOptions(options), false); + verify(indicesStats("test1", "test2").setIndicesOptions(options), false); verify(forceMerge("test1", "test2").setIndicesOptions(options), false); verify(refreshBuilder("test1", "test2").setIndicesOptions(options), false); verify(validateQuery("test1", "test2").setIndicesOptions(options), false); @@ -139,7 +139,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache("test1", "test2").setIndicesOptions(options), false); verify(_flush("test1", "test2").setIndicesOptions(options),false); verify(segments("test1", "test2").setIndicesOptions(options), false); - verify(stats("test1", "test2").setIndicesOptions(options), false); + verify(indicesStats("test1", "test2").setIndicesOptions(options), false); verify(forceMerge("test1", "test2").setIndicesOptions(options), false); verify(refreshBuilder("test1", "test2").setIndicesOptions(options), false); verify(validateQuery("test1", "test2").setIndicesOptions(options), false); @@ -166,7 +166,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache("test1").setIndicesOptions(options), true); verify(_flush("test1").setIndicesOptions(options),true); verify(segments("test1").setIndicesOptions(options), true); - verify(stats("test1").setIndicesOptions(options), true); + verify(indicesStats("test1").setIndicesOptions(options), true); verify(forceMerge("test1").setIndicesOptions(options), true); verify(refreshBuilder("test1").setIndicesOptions(options), true); verify(validateQuery("test1").setIndicesOptions(options), true); @@ -184,7 +184,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache("test1").setIndicesOptions(options), false); verify(_flush("test1").setIndicesOptions(options),false); verify(segments("test1").setIndicesOptions(options), false); - verify(stats("test1").setIndicesOptions(options), false); + verify(indicesStats("test1").setIndicesOptions(options), false); verify(forceMerge("test1").setIndicesOptions(options), false); verify(refreshBuilder("test1").setIndicesOptions(options), false); verify(validateQuery("test1").setIndicesOptions(options), false); @@ -204,7 +204,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache("test1").setIndicesOptions(options), false); verify(_flush("test1").setIndicesOptions(options),false); verify(segments("test1").setIndicesOptions(options), false); - verify(stats("test1").setIndicesOptions(options), false); + verify(indicesStats("test1").setIndicesOptions(options), false); verify(forceMerge("test1").setIndicesOptions(options), false); verify(refreshBuilder("test1").setIndicesOptions(options), false); verify(validateQuery("test1").setIndicesOptions(options), false); @@ -223,7 +223,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache("test1").setIndicesOptions(options), true); verify(_flush("test1").setIndicesOptions(options),true); verify(segments("test1").setIndicesOptions(options), true); - verify(stats("test1").setIndicesOptions(options), true); + verify(indicesStats("test1").setIndicesOptions(options), true); verify(forceMerge("test1").setIndicesOptions(options), true); verify(refreshBuilder("test1").setIndicesOptions(options), true); verify(validateQuery("test1").setIndicesOptions(options), true); @@ -241,7 +241,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache("test1").setIndicesOptions(options), false); verify(_flush("test1").setIndicesOptions(options),false); verify(segments("test1").setIndicesOptions(options), false); - verify(stats("test1").setIndicesOptions(options), false); + verify(indicesStats("test1").setIndicesOptions(options), false); verify(forceMerge("test1").setIndicesOptions(options), false); verify(refreshBuilder("test1").setIndicesOptions(options), false); verify(validateQuery("test1").setIndicesOptions(options), false); @@ -260,7 +260,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache("test1").setIndicesOptions(options), false); verify(_flush("test1").setIndicesOptions(options),false); verify(segments("test1").setIndicesOptions(options), false); - verify(stats("test1").setIndicesOptions(options), false); + verify(indicesStats("test1").setIndicesOptions(options), false); verify(forceMerge("test1").setIndicesOptions(options), false); verify(refreshBuilder("test1").setIndicesOptions(options), false); verify(validateQuery("test1").setIndicesOptions(options), false); @@ -310,7 +310,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache(indices), false); verify(_flush(indices),false); verify(segments(indices), false); - verify(stats(indices), false); + verify(indicesStats(indices), false); verify(forceMerge(indices), false); verify(refreshBuilder(indices), false); verify(validateQuery(indices), true); @@ -328,7 +328,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache(indices).setIndicesOptions(options), false); verify(_flush(indices).setIndicesOptions(options),false); verify(segments(indices).setIndicesOptions(options), false); - verify(stats(indices).setIndicesOptions(options), false); + verify(indicesStats(indices).setIndicesOptions(options), false); verify(forceMerge(indices).setIndicesOptions(options), false); verify(refreshBuilder(indices).setIndicesOptions(options), false); verify(validateQuery(indices).setIndicesOptions(options), false); @@ -349,7 +349,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache(indices), false); verify(_flush(indices),false); verify(segments(indices), false); - verify(stats(indices), false); + verify(indicesStats(indices), false); verify(forceMerge(indices), false); verify(refreshBuilder(indices), false); verify(validateQuery(indices), false); @@ -367,7 +367,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache(indices), false); verify(_flush(indices),false); verify(segments(indices), false); - verify(stats(indices), false); + verify(indicesStats(indices), false); verify(forceMerge(indices), false); verify(refreshBuilder(indices), false); verify(validateQuery(indices), true); @@ -385,7 +385,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verify(clearCache(indices).setIndicesOptions(options), false); verify(_flush(indices).setIndicesOptions(options),false); verify(segments(indices).setIndicesOptions(options), false); - verify(stats(indices).setIndicesOptions(options), false); + verify(indicesStats(indices).setIndicesOptions(options), false); verify(forceMerge(indices).setIndicesOptions(options), false); verify(refreshBuilder(indices).setIndicesOptions(options), false); verify(validateQuery(indices).setIndicesOptions(options), false); @@ -661,12 +661,15 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verifyResolvability(dataStreamName, refreshBuilder(dataStreamName), false); verifyResolvability(dataStreamName, search(dataStreamName), false, 1); verifyResolvability(dataStreamName, msearch(null, dataStreamName), false); - verifyResolvability(dataStreamName, clearCache(dataStreamName), true); - verifyResolvability(dataStreamName, _flush(dataStreamName),true); - verifyResolvability(dataStreamName, segments(dataStreamName), true); - verifyResolvability(dataStreamName, stats(dataStreamName), false); - verifyResolvability(dataStreamName, forceMerge(dataStreamName), true); - verifyResolvability(dataStreamName, validateQuery(dataStreamName), true); + verifyResolvability(dataStreamName, clearCache(dataStreamName), false); + verifyResolvability(dataStreamName, _flush(dataStreamName),false); + verifyResolvability(dataStreamName, segments(dataStreamName), false); + verifyResolvability(dataStreamName, indicesStats(dataStreamName), false); + verifyResolvability(dataStreamName, forceMerge(dataStreamName), false); + verifyResolvability(dataStreamName, validateQuery(dataStreamName), false); + verifyResolvability(dataStreamName, client().admin().indices().prepareUpgrade(dataStreamName), false); + verifyResolvability(dataStreamName, client().admin().indices().prepareRecoveries(dataStreamName), false); + verifyResolvability(dataStreamName, client().admin().indices().prepareUpgradeStatus(dataStreamName), false); verifyResolvability(dataStreamName, getAliases(dataStreamName), true); verifyResolvability(dataStreamName, getFieldMapping(dataStreamName), true); verifyResolvability(dataStreamName, getMapping(dataStreamName), true); @@ -685,12 +688,15 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { verifyResolvability(wildcardExpression, refreshBuilder(wildcardExpression), false); verifyResolvability(wildcardExpression, search(wildcardExpression), false, 2); verifyResolvability(wildcardExpression, msearch(null, wildcardExpression), false); - verifyResolvability(wildcardExpression, clearCache(wildcardExpression), true); - verifyResolvability(wildcardExpression, _flush(wildcardExpression),true); - verifyResolvability(wildcardExpression, segments(wildcardExpression), true); - verifyResolvability(wildcardExpression, stats(wildcardExpression), false); - verifyResolvability(wildcardExpression, forceMerge(wildcardExpression), true); - verifyResolvability(wildcardExpression, validateQuery(wildcardExpression), true); + verifyResolvability(wildcardExpression, clearCache(wildcardExpression), false); + verifyResolvability(wildcardExpression, _flush(wildcardExpression),false); + verifyResolvability(wildcardExpression, segments(wildcardExpression), false); + verifyResolvability(wildcardExpression, indicesStats(wildcardExpression), false); + verifyResolvability(wildcardExpression, forceMerge(wildcardExpression), false); + verifyResolvability(wildcardExpression, validateQuery(wildcardExpression), false); + verifyResolvability(wildcardExpression, client().admin().indices().prepareUpgrade(wildcardExpression), false); + verifyResolvability(wildcardExpression, client().admin().indices().prepareRecoveries(wildcardExpression), false); + verifyResolvability(wildcardExpression, client().admin().indices().prepareUpgradeStatus(wildcardExpression), false); verifyResolvability(wildcardExpression, getAliases(wildcardExpression), true); verifyResolvability(wildcardExpression, getFieldMapping(wildcardExpression), true); verifyResolvability(wildcardExpression, getMapping(wildcardExpression), true); @@ -756,7 +762,7 @@ public class IndicesOptionsIntegrationIT extends ESIntegTestCase { return client().admin().indices().prepareSegments(indices); } - private static IndicesStatsRequestBuilder stats(String... indices) { + private static IndicesStatsRequestBuilder indicesStats(String... indices) { return client().admin().indices().prepareStats(indices); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/refresh/TransportRefreshAction.java b/server/src/main/java/org/elasticsearch/action/admin/indices/refresh/TransportRefreshAction.java index 23d4f0383b1..051c1c7b3ca 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/refresh/TransportRefreshAction.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/refresh/TransportRefreshAction.java @@ -64,9 +64,4 @@ public class TransportRefreshAction List shardFailures) { return new RefreshResponse(totalNumCopies, successfulShards, failedShards, shardFailures); } - - @Override - protected boolean shouldIncludeDataStreams() { - return true; - } } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/stats/TransportIndicesStatsAction.java b/server/src/main/java/org/elasticsearch/action/admin/indices/stats/TransportIndicesStatsAction.java index e260d68d539..400358f59af 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/stats/TransportIndicesStatsAction.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/stats/TransportIndicesStatsAction.java @@ -57,11 +57,6 @@ public class TransportIndicesStatsAction extends TransportBroadcastByNodeAction< this.indicesService = indicesService; } - @Override - protected boolean shouldIncludeDataStreams() { - return true; - } - /** * Status goes across *all* shards. */ diff --git a/server/src/main/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeAction.java b/server/src/main/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeAction.java index 9ac48532a18..b29cb922525 100644 --- a/server/src/main/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeAction.java +++ b/server/src/main/java/org/elasticsearch/action/support/broadcast/node/TransportBroadcastByNodeAction.java @@ -226,7 +226,7 @@ public abstract class TransportBroadcastByNodeAction