wirybeaver commented on code in PR #15203:
URL: https://github.com/apache/pinot/pull/15203#discussion_r2037942177


##########
pinot-core/src/main/java/org/apache/pinot/core/transport/ServerInstance.java:
##########
@@ -173,4 +189,18 @@ public int hashCode() {
   public String toString() {
     return _instanceId;
   }
+
+  @VisibleForTesting
+  int extractGroup(InstanceConfig instanceConfig) {
+    Map<String, String> pools = 
instanceConfig.getRecord().getMapField(InstanceUtils.POOL_KEY);

Review Comment:
   self review: The type of the field `pools` of spi 
[Instance](https://github.com/apache/pinot/blob/978950bcb8d64c11af3992a41ba1322ff34b2a53/pinot-spi/src/main/java/org/apache/pinot/spi/config/instance/Instance.java#L56)
 class uses Map<String, Integer>. Thus it is safe to directly use 
Integer.parseInt without checking the parsing exception



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to