agresch commented on a change in pull request #3365:
URL: https://github.com/apache/storm/pull/3365#discussion_r546951932



##########
File path: 
storm-server/src/main/java/org/apache/storm/daemon/supervisor/SupervisorUtils.java
##########
@@ -92,8 +92,13 @@ public static String getNumaIdForPort(Integer port, 
Map<String, Object> supervis
     }
 
     public static List<Integer> getSlotsPorts(Map<String, Object> 
supervisorConf) {
-        List<Integer> slotsPorts = (List<Integer>) 
supervisorConf.getOrDefault(DaemonConfig.SUPERVISOR_SLOTS_PORTS,
+        List<Integer> slotsPorts = new ArrayList<>();
+        List<Number> ports = (List<Number>) 
supervisorConf.getOrDefault(DaemonConfig.SUPERVISOR_SLOTS_PORTS,
                 new ArrayList<>());
+        for (Number port : ports) {
+            slotsPorts.add(port.intValue());

Review comment:
       This is similar to how the code used to be (see 
https://github.com/apache/storm/blame/69e69d40d5c700465b49f4c23312f974fb2ca1f6/storm-server/src/main/java/org/apache/storm/daemon/supervisor/ReadClusterState.java#L101-L103)
 before this change: https://github.com/apache/storm/pull/3267/files
   
   




----------------------------------------------------------------
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.

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


Reply via email to