Github user jerrypeng commented on a diff in the pull request:

    https://github.com/apache/storm/pull/921#discussion_r47825137
  
    --- Diff: storm-core/src/jvm/backtype/storm/scheduler/TopologyDetails.java 
---
    @@ -396,34 +410,50 @@ public void addResourcesForExec(ExecutorDetails exec, 
Map<String, Double> resour
                 LOG.warn("Executor {} already exists...ResourceList: {}", 
exec, getTaskResourceReqList(exec));
                 return;
             }
    -        _resourceList.put(exec, resourceList);
    +        this.resourceList.put(exec, resourceList);
         }
     
         /**
          * Add default resource requirements for a executor
          */
         public void addDefaultResforExec(ExecutorDetails exec) {
    +        Double topologyComponentCpuPcorePercent = 
Utils.getDouble(this.topologyConf.get(Config.TOPOLOGY_COMPONENT_CPU_PCORE_PERCENT),
 null);
    +        if (topologyComponentCpuPcorePercent == null) {
    +            LOG.warn("default value for " + 
Config.TOPOLOGY_COMPONENT_CPU_PCORE_PERCENT + " needs to be set!");
    +        }
    --- End diff --
    
    I am still not 100% convinced these checks are not neccessary. If I was a 
developer testing RAS and I didn't configure something right by accident thus 
causing an NPE in weird spot, I might be discouraged to test out RAS, but if I 
see an early exception thrown or warning message telling me that its my fault 
for incorrectly configuring RAS, I might not.  People tend to blame others for 
things going wrong and I don't want anyone to blame the RAS implementation for 
having bugs when its the user's fault for using wrong configurations.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to