9aman commented on code in PR #12334:
URL: https://github.com/apache/pinot/pull/12334#discussion_r1470555734
##########
pinot-controller/src/main/java/org/apache/pinot/controller/util/ServerSegmentMetadataReader.java:
##########
@@ -140,16 +143,17 @@ public TableMetadataInfo
getAggregatedTableMetadataFromServer(String tableNameWi
return v;
});
- // Since table segments may have multiple replicas, divide
diskSizeInBytes, numRows and numSegments by numReplica
- // to avoid double counting, for columnAvgLengthMap,
columnAvgCardinalityMap and maxNumMultiValuesMap, dividing by
- // numReplica is not needed since totalNumSegments already contains
replicas.
+ // Since table segments may have multiple replicas, divide
diskSizeInBytes, numRows, numSegments and primary key
+ // count by numReplica to avoid double counting, for columnAvgLengthMap,
columnAvgCardinalityMap and
+ // maxNumMultiValuesMap, dividing by numReplica is not needed since
totalNumSegments already contains replicas.
totalDiskSizeInBytes /= numReplica;
totalNumSegments /= numReplica;
totalNumRows /= numReplica;
+ upsertPartitionToPrimaryKeyCountMap.replaceAll((k, v) -> v / numReplica);
Review Comment:
@klsince @ege-st I agree to above point. Adding replica-level information
can help improve the usability of the API.
I can return partition to server to PK count Map
{
"0": {
"Server1":50,
"Server2:28,
},
},
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]