agresch commented on a change in pull request #3365: URL: https://github.com/apache/storm/pull/3365#discussion_r549473514
########## 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: Without this change: ./bin/storm supervisor -c supervisor.slots.ports="[6700]" 2020-12-28 14:06:38.860 o.a.s.d.s.Supervisor main [ERROR] Failed to start supervisor java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at org.apache.storm.daemon.supervisor.ReadClusterState.<init>(ReadClusterState.java:101) ~[storm-server-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT] at org.apache.storm.daemon.supervisor.Supervisor.launch(Supervisor.java:310) ~[storm-server-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT] at org.apache.storm.daemon.supervisor.Supervisor.launchDaemon(Supervisor.java:340) [storm-server-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT] at org.apache.storm.daemon.supervisor.Supervisor.main(Supervisor.java:201) [storm-server-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT] ---------------------------------------------------------------- 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