Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2385#discussion_r149162640
--- Diff:
storm-server/src/main/java/org/apache/storm/scheduler/TopologyDetails.java ---
@@ -133,30 +136,31 @@ public StormTopology getTopology() {
private void initResourceList() {
this.resourceList = new HashMap<>();
- // Extract bolt memory info
+ // Extract bolt resource info
if (topology.get_bolts() != null) {
for (Map.Entry<String, Bolt> bolt :
topology.get_bolts().entrySet()) {
//the json_conf is populated by TopologyBuilder (e.g.
boltDeclarer.setMemoryLoad)
Map<String, Double> topologyResources =
ResourceUtils.parseResources(bolt.getValue().get_common().get_json_conf());
- ResourceUtils.checkIntialization(topologyResources,
bolt.getKey(), topologyConf);
+ ResourceUtils.checkInitialization(topologyResources,
bolt.getKey(), this.topologyConf);
for (Map.Entry<ExecutorDetails, String>
anExecutorToComponent :
executorToComponent.entrySet()) {
- if
(bolt.getKey().equals(anExecutorToComponent.getValue())) {
+ if
(bolt.getKey().equals(anExecutorToComponent.getValue()) &&
topologyResources.keySet().size() > 0) {
--- End diff --
nit: `!topologyResources.isEmpty()` is a bit cleaner.
---