You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by HeartSaVioR <gi...@git.apache.org> on 2018/02/07 20:59:25 UTC

[GitHub] storm pull request #2551: [STORM-2940] Dynamically set the CAPACITY value of...

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

    https://github.com/apache/storm/pull/2551#discussion_r166750716
  
    --- Diff: storm-client/src/jvm/org/apache/storm/grouping/LoadAwareShuffleGrouping.java ---
    @@ -85,6 +85,7 @@ public void prepare(WorkerTopologyContext context, GlobalStreamId stream, List<I
             sourceNodeInfo = new NodeInfo(context.getThisWorkerHost(), Sets.newHashSet((long) context.getThisWorkerPort()));
             taskToNodePort = context.getTaskToNodePort();
             this.targetTasks = targetTasks;
    +        CAPACITY = targetTasks.size() == 1 ? 1 : targetTasks.size() * MAX_WEIGHT;
    --- End diff --
    
    Given that other logic still leverage max weight, will this work for targetTasks.size() == 1? If it works, It may be ideal to have test on this case to clear out wondering.


---