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:
   The type of the field `pools` of spi Instance class uses Map<String, 
Integer>. Thus it is safe to directly use Integer.parseInt without checking the 
parsing exception and fallback to the default value in case of 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