shauryachats commented on code in PR #15843:
URL: https://github.com/apache/pinot/pull/15843#discussion_r2106083621
##########
pinot-common/src/main/java/org/apache/pinot/common/assignment/InstancePartitions.java:
##########
@@ -111,6 +113,21 @@ public List<String> getInstances(int partitionId, int
replicaGroupId) {
.get(Integer.toString(partitionId) + PARTITION_REPLICA_GROUP_SEPARATOR
+ replicaGroupId);
}
+ public Map<String, Integer> getInstanceToPartitionIdMap() {
+ Map<String, Integer> instanceToPartitionIdMap = new HashMap<>();
+
+ for (Map.Entry<String, List<String>> entry :
_partitionToInstancesMap.entrySet()) {
+ Pair<Integer, Integer> partitionIdAndReplicaGroupId =
getPartitionIdAndReplicaGroupId(entry.getKey());
+ int partitionId = partitionIdAndReplicaGroupId.getLeft();
+
Review Comment:
Addressed.
##########
pinot-common/src/main/java/org/apache/pinot/common/assignment/InstancePartitions.java:
##########
@@ -111,6 +113,21 @@ public List<String> getInstances(int partitionId, int
replicaGroupId) {
.get(Integer.toString(partitionId) + PARTITION_REPLICA_GROUP_SEPARATOR
+ replicaGroupId);
}
+ public Map<String, Integer> getInstanceToPartitionIdMap() {
Review Comment:
Added.
--
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]