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

    https://github.com/apache/storm/pull/2319#discussion_r138074783
  
    --- Diff: storm-core/src/clj/org/apache/storm/daemon/worker.clj ---
    @@ -47,9 +48,30 @@
     
     (defmulti mk-suicide-fn cluster-mode)
     
    +(defn get-local-assignment
    +  [conf storm-id cluster-state]
    +  (try
    +    (let [supervisor-cli (SupervisorClient/getConfiguredClient conf 
(memoized-local-hostname))
    +          assignment (converter/clojurify-assignment 
(.getLocalAssignmentForStorm (.getClient supervisor-cli) storm-id))]
    +      (try
    +        (.close supervisor-cli)
    +        (catch Throwable e
    +          (log-warn (.getMessage e) "Exception when close supervisor 
client.")))
    +      assignment)
    +    (catch Throwable e
    +      ;; if any error/exception thrown, fetch it from zookeeper
    +      (.remote-assignment-info cluster-state storm-id)
    +      )))
    +
     (defn read-worker-executors [storm-conf storm-cluster-state storm-id 
assignment-id port assignment-versions]
       (log-message "Reading Assignments.")
    -  (let [assignment (:executor->node+port (.assignment-info 
storm-cluster-state storm-id nil))]
    +  ;; TODO: keep a long time connection when worker need more heart beat to 
supervisor.
    --- End diff --
    
    Another TODO


---

Reply via email to