From 73302cb61dcbd62e0e221770eab79da0b05e3c79 Mon Sep 17 00:00:00 2001 From: Khushboo Rajput <59671881+khushbr@users.noreply.github.com> Date: Tue, 27 Jun 2023 18:08:00 -0700 Subject: [PATCH] Fix `routingTable` Change is incoming from upstream core. Signed-off-by: Khushboo Rajput <59671881+khushbr@users.noreply.github.com> --- .../performanceanalyzer/collectors/ShardStateCollector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/opensearch/performanceanalyzer/collectors/ShardStateCollector.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/ShardStateCollector.java index 95f8cdd6..a1246054 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/collectors/ShardStateCollector.java +++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/ShardStateCollector.java @@ -68,7 +68,7 @@ public void collectMetrics(long startTime) { value.append(PerformanceAnalyzerMetrics.getJsonCurrentMilliSeconds()) .append(PerformanceAnalyzerMetrics.sMetricNewLineDelimitor); RoutingTable routingTable = clusterState.routingTable(); - String[] indices = routingTable.indicesRouting().keys().toArray(String.class); + String[] indices = routingTable.indicesRouting().keySet().toArray(new String[0]); for (String index : indices) { List allShardsIndex = routingTable.allShards(index); value.append(