Github user Ethanlm commented on a diff in the pull request:
https://github.com/apache/storm/pull/2902#discussion_r231542667
--- Diff:
storm-server/src/main/java/org/apache/storm/utils/ServerUtils.java ---
@@ -691,8 +691,10 @@ public static boolean isRAS(Map<String, Object> conf) {
public static int getEstimatedWorkerCountForRASTopo(Map<String,
Object> topoConf, StormTopology topology)
throws InvalidTopologyException {
- return (int)
Math.ceil(getEstimatedTotalHeapMemoryRequiredByTopo(topoConf, topology) /
-
ObjectReader.getDouble(topoConf.get(Config.WORKER_HEAP_MEMORY_MB)));
+ Double defaultWorkerMaxHeap =
ObjectReader.getDouble(topoConf.get(Config.WORKER_HEAP_MEMORY_MB));
+ Double topologyWorkerMaxHeap =
ObjectReader.getDouble(topoConf.get(Config.TOPOLOGY_WORKER_MAX_HEAP_SIZE_MB));
--- End diff --
Will `topoConf.get(Config.WORKER_HEAP_MEMORY_MB)` be null? If so, this will
throw exception `IllegalArgumentException("Don't know how to convert null to
double");`
---