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

    https://github.com/apache/incubator-storm/pull/103#discussion_r12845484
  
    --- Diff: storm-core/src/clj/backtype/storm/daemon/worker.clj ---
    @@ -109,25 +111,30 @@
     (defn mk-transfer-fn [worker]
       (let [local-tasks (-> worker :task-ids set)
             local-transfer (:transfer-local-fn worker)
    -        ^DisruptorQueue transfer-queue (:transfer-queue worker)]
    +        ^DisruptorQueue transfer-queue (:transfer-queue worker)
    +        task->node+port (:cached-task->node+port worker)]
         (fn [^KryoTupleSerializer serializer tuple-batch]
           (let [local (ArrayList.)
    -            remote (ArrayList.)]
    +            remoteMap (HashMap.)]
             (fast-list-iter [[task tuple :as pair] tuple-batch]
               (if (local-tasks task)
                 (.add local pair)
    -            (.add remote pair)
    -            ))
    +            (let [node+port (get @task->node+port task)]
    +              (when (not (.get remoteMap node+port))
    +                (.put remoteMap node+port (ArrayList.)))
    +              (let [remote (.get remoteMap node+port)]
    +                (.add remote (TaskMessage. task (.serialize serializer 
tuple)))
    +                 ))))
    --- End diff --
    
    OK, if you could add a quick comment about it, that would help prevent 
someone like me trying to "clean it up" in the future and slowing it down. 
Something like
    ```;;Using java objects directly to avoid performance issues in java code```


---
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