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

    https://github.com/apache/storm/pull/2241#discussion_r158024035
  
    --- Diff: storm-client/src/jvm/org/apache/storm/daemon/Task.java ---
    @@ -122,28 +130,33 @@ public Task(Executor executor, Integer taskId) throws 
IOException {
             return new ArrayList<>(0);
         }
     
    +
         public List<Integer> getOutgoingTasks(String stream, List<Object> 
values) {
             if (debug) {
                 LOG.info("Emitting Tuple: taskId={} componentId={} stream={} 
values={}", taskId, componentId, stream, values);
             }
     
    -        List<Integer> outTasks = new ArrayList<>();
    -        if (!streamComponentToGrouper.containsKey(stream)) {
    -            throw new IllegalArgumentException("Unknown stream ID: " + 
stream);
    -        }
    -        if (null != streamComponentToGrouper.get(stream)) {
    -            // null value for __system
    -            for (LoadAwareCustomStreamGrouping grouper : 
streamComponentToGrouper.get(stream).values()) {
    +        ArrayList<Integer> outTasks = new ArrayList<>();
    +
    +        // TODO: PERF: expensive hashtable lookup in critical path
    --- End diff --
    
    I guess the patch is ready to review again (given that we've revised 
numbers for comparison), now we may need to decide whether removing the comment 
or file an issue. For me, at least in this case, looks like hashtable lookup is 
unavoidable.


---

Reply via email to