Ethanlm commented on a change in pull request #3365:
URL: https://github.com/apache/storm/pull/3365#discussion_r546969485
##########
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:
How do we reproduce this?
I changed the port to be a value larger than Integer.MAX_VALUE, the
supervisor fails to start
```
2020-12-21 22:50:47.009 o.a.s.v.ConfigValidation main [INFO] Will use [class
org.apache.storm.DaemonConfig, class org.apache.storm.Config] for validation
2020-12-21 22:50:47.250 o.a.s.u.Utils main [ERROR] Received error in thread
main.. terminating server...
java.lang.Error: java.lang.IllegalArgumentException: Field
SUPERVISOR_SLOTS_PORTS list entry must be an Integer within type range.
at
org.apache.storm.utils.Utils.handleUncaughtException(Utils.java:664)
~[storm-client-2.3.0.y.jar:2.3.0-SNAPSHOT]
at
org.apache.storm.utils.Utils.handleUncaughtException(Utils.java:668)
~[storm-client-2.3.0.y.jar:2.3.0-SNAPSHOT]
at
org.apache.storm.utils.Utils.lambda$createDefaultUncaughtExceptionHandler$2(Utils.java:1048)
~[storm-client-2.3.0.y.jar:2.3.0-SNAPSHOT]
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1057)
[?:1.8.0_262]
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1052)
[?:1.8.0_262]
at java.lang.Thread.dispatchUncaughtException(Thread.java:1959)
[?:1.8.0_262]
Caused by: java.lang.IllegalArgumentException: Field SUPERVISOR_SLOTS_PORTS
list entry must be an Integer within type range.
at
org.apache.storm.validation.ConfigValidation$IntegerValidator.validateInteger(ConfigValidation.java:415)
~[storm-client-2.3.0.y.jar:2.3.0-SNAPSHOT]
at
org.apache.storm.validation.ConfigValidation$IntegerValidator.validateField(ConfigValidation.java:401)
~[storm-client-2.3.0.y.jar:2.3.0-SNAPSHOT]
at
org.apache.storm.validation.ConfigValidation$ListEntryCustomValidator.validateField(ConfigValidation.java:588)
~[storm-client-2.3.0.y.jar:2.3.0-SNAPSHOT]
at
org.apache.storm.validation.ConfigValidation$ListEntryCustomValidator.validateField(ConfigValidation.java:602)
~[storm-client-2.3.0.y.jar:2.3.0-SNAPSHOT]
at
org.apache.storm.validation.ConfigValidation.validateField(ConfigValidation.java:167)
~[storm-client-2.3.0.y.jar:2.3.0-SNAPSHOT]
at
org.apache.storm.validation.ConfigValidation.validateFields(ConfigValidation.java:215)
~[storm-client-2.3.0.y.jar:2.3.0-SNAPSHOT]
at
org.apache.storm.validation.ConfigValidation.validateFields(ConfigValidation.java:189)
~[storm-client-2.3.0.y.jar:2.3.0-SNAPSHOT]
at
org.apache.storm.utils.ConfigUtils.readStormConfigImpl(ConfigUtils.java:440)
~[storm-client-2.3.0.y.jar:2.3.0-SNAPSHOT]
at
org.apache.storm.utils.ConfigUtils.readStormConfig(ConfigUtils.java:166)
~[storm-client-2.3.0.y.jar:2.3.0-SNAPSHOT]
at
org.apache.storm.daemon.supervisor.Supervisor.<init>(Supervisor.java:126)
~[storm-server-2.3.0.y.jar:2.3.0-SNAPSHOT]
at
org.apache.storm.daemon.supervisor.Supervisor.main(Supervisor.java:200)
~[storm-server-2.3.0.y.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:
[email protected]