You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by abellina <gi...@git.apache.org> on 2016/08/18 01:34:24 UTC

[GitHub] storm pull request #1427: [STORM-1701] Port PR 1370 to 1.x-branch (Git rid o...

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

    https://github.com/apache/storm/pull/1427#discussion_r75236698
  
    --- Diff: storm-core/src/clj/org/apache/storm/daemon/supervisor.clj ---
    @@ -415,23 +427,35 @@
         ;; 6. wait for workers launch
     
         (log-debug "Syncing processes")
    +    (log-debug "Keepers: " keepers)
    +    (log-debug "Keep ports: " keep-ports)
    +    (log-debug "Reassigned executors: " reassign-executors)
         (log-debug "Assigned executors: " assigned-executors)
         (log-debug "Allocated: " allocated)
         (doseq [[id [state heartbeat]] allocated]
    -      (when (not= :valid state)
    -        (log-message
    -         "Shutting down and clearing state for id " id
    -         ". Current supervisor time: " now
    -         ". State: " state
    -         ", Heartbeat: " (pr-str heartbeat))
    -        (shutdown-worker supervisor id)))
    +      (let
    +        [worker-launchtime (:launchtime (@(:worker-launchtime-atom supervisor) id))]
    +        (when
    +          (or 
    +            (and (not= :valid state)
    +                 (not= :not-started state))
    +            (and (= :not-started state)
    +                 (or (nil? worker-launchtime)
    +                   (is-worker-launchtime-timed-out? now worker-launchtime conf))))
    +              (if (= :not-started state)
    +                (log-message "Worker " id " failed to start"))
    +              (log-message
    +                "Shutting down and clearing state for id " id
    +                ". Current supervisor time: " now
    +                ". State: " state
    +                ", Heartbeat: " (pr-str heartbeat))
    +              (shutdown-worker supervisor id))))
         (let [valid-new-worker-ids (get-valid-new-worker-ids conf supervisor reassign-executors new-worker-ids)]
           (ls-approved-workers! local-state
                             (merge
                               (select-keys (ls-approved-workers local-state)
                                 (keys keepers))
    -                          valid-new-worker-ids))
    -      (wait-for-workers-launch conf (keys valid-new-worker-ids)))))
    --- End diff --
    
    since we removed this, we should also remove the wait-for-workers-launch private functions.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---