Skip to content

Commit

Permalink
Fix spotless fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Arpit-Bandejiya committed Feb 16, 2024
1 parent fa38d3d commit d3a050b
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ private final static String printShardAllocationWithHeader(int[] shardCount) {
private final static String printShardAllocationWithHeader(String[] indexNames) {
StringBuffer sb = new StringBuffer();
Formatter formatter = new Formatter(sb, Locale.getDefault());
for( String index: indexNames) {
for (String index : indexNames) {
formatter.format("%-20s", index);
}
formatter.format("\n");
Expand Down Expand Up @@ -382,10 +382,12 @@ private static void buildMap(ClusterState inputState) {
}
}

private static void updateMap(TreeMap<String, int[]> ShardCountMapToUpdate,
TreeMap<String, String[]> nodeIdToIndexMapToUpdate,
TreeMap<String, String[]> nodeIdToIndexReplicaMapToUpdate,
ShardRouting shardRouting) {
private static void updateMap(
TreeMap<String, int[]> ShardCountMapToUpdate,
TreeMap<String, String[]> nodeIdToIndexMapToUpdate,
TreeMap<String, String[]> nodeIdToIndexReplicaMapToUpdate,
ShardRouting shardRouting
) {
int[] shard;
shard = shardRouting.assignedToNode() ? ShardCountMapToUpdate.get(shardRouting.currentNodeId()) : unassigned;
String indexName = shardRouting.getIndexName();
Expand All @@ -406,7 +408,6 @@ private static void updateMap(TreeMap<String, int[]> ShardCountMapToUpdate,
nodeIdToIndexReplicaMapToUpdate.put(shardRouting.currentNodeId(), newArray);
}


// For assigned shards, put back counter
if (shardRouting.assignedToNode()) ShardCountMapToUpdate.put(shardRouting.currentNodeId(), shard);
}
Expand Down

0 comments on commit d3a050b

Please sign in to comment.