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

    https://github.com/apache/storm/pull/2433#discussion_r152716882
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/grouping/LoadAwareShuffleGrouping.java ---
    @@ -291,7 +291,10 @@ private Scope calculateScope(Map<Integer, NodeInfo> 
taskToNodePort, Map<String,
         private Map<String, String> getHostToRackMapping(Map<Integer, 
NodeInfo> taskToNodePort) {
             Set<String> hosts = new HashSet();
             for (int task: targetTasks) {
    -            hosts.add(taskToNodePort.get(task).get_node());
    +            //if is a kill, taskToNodePort will be an empty map which is 
refreshed by WorkerState
    --- End diff --
    
    i means that the taskToNodePort cache is refreshed by worker as a timer 
task, if we kill the worker/or rebalance, the local task NodePort maybe a null, 
so we should have a check here, or it may throw a NPE


---

Reply via email to