Skip to content

Commit

Permalink
Remove extra calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ltaragi committed Aug 21, 2024
1 parent 51d695c commit edcd80b
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,16 +307,9 @@ public void onFailure(Exception e) {
final CountDownLatch indicesLatch = updateIndicesStats(new ActionListener<>() {
@Override
public void onResponse(IndicesStatsResponse indicesStatsResponse) {
long currentPrimaryStoreSize = indicesStatsResponse.getPrimaries().getStore().sizeInBytes();
Map<String, IndexStats> indexStatsMap = indicesStatsResponse.getIndices();
logger.info("### currentPrimaryStoreSize = {}", currentPrimaryStoreSize);
logger.info("### indexStatsMap = ");
for (Map.Entry<String, IndexStats> entry : indexStatsMap.entrySet()) {
logger.info(" ### {} : {}", entry.getKey(), entry.getValue().getPrimaries().getStore().sizeInBytes());
}
long currentPrimaryStoreSize = 0L;
final ShardStats[] stats = indicesStatsResponse.getShards();
final Map<String, Long> shardSizeByIdentifierBuilder = new HashMap<>();
final Map<String, Long> indexSizeByIdentifierBuilder = new HashMap<>();
final Map<ShardRouting, String> dataPathByShardRoutingBuilder = new HashMap<>();
final Map<ClusterInfo.NodeAndPath, ClusterInfo.ReservedSpace.Builder> reservedSpaceBuilders = new HashMap<>();
currentPrimaryStoreSize = buildShardLevelInfo(
Expand Down Expand Up @@ -402,7 +395,7 @@ static long buildShardLevelInfo(
if (storeStats == null) {
continue;
}
// TODO: put entries for index name, size
// TODO: put entries for index name, size?
final long size = storeStats.sizeInBytes();
if (shardRouting.primary()) {
currentPrimaryStoreSize += size;
Expand Down

0 comments on commit edcd80b

Please sign in to comment.