You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ki...@apache.org on 2016/03/04 18:10:11 UTC

[1/2] storm git commit: Merge branch 'storm1561' of https://github.com/kishorvpatil/incubator-storm

Repository: storm
Updated Branches:
  refs/heads/1.x-branch 84e3444ec -> af50c2538


Merge branch 'storm1561' of https://github.com/kishorvpatil/incubator-storm

Conflicts:
	storm-core/src/clj/org/apache/storm/daemon/supervisor.clj


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/d5e8bab2
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/d5e8bab2
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/d5e8bab2

Branch: refs/heads/1.x-branch
Commit: d5e8bab2a83850c1eeabc89a8981f30adeefe3ef
Parents: 84e3444
Author: Kishor Patil <kp...@yahoo-inc.com>
Authored: Fri Mar 4 16:45:54 2016 +0000
Committer: Kishor Patil <kp...@yahoo-inc.com>
Committed: Fri Mar 4 17:05:19 2016 +0000

----------------------------------------------------------------------
 .../src/clj/org/apache/storm/daemon/supervisor.clj       | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/d5e8bab2/storm-core/src/clj/org/apache/storm/daemon/supervisor.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/daemon/supervisor.clj b/storm-core/src/clj/org/apache/storm/daemon/supervisor.clj
index b504e57..2b1f4b8 100644
--- a/storm-core/src/clj/org/apache/storm/daemon/supervisor.clj
+++ b/storm-core/src/clj/org/apache/storm/daemon/supervisor.clj
@@ -524,6 +524,16 @@
           (rm-topo-files conf storm-id localizer false)
           storm-id)))))
 
+(defn kill-existing-workers-with-change-in-components [supervisor existing-assignment new-assignment]
+  (let [assigned-executors (or (ls-local-assignments (:local-state supervisor)) {})
+        allocated (read-allocated-workers supervisor assigned-executors (Time/currentTimeSecs))
+        valid-allocated (filter-val (fn [[state _]] (= state :valid)) allocated)
+        port->worker-id (clojure.set/map-invert (map-val #((nth % 1) :port) valid-allocated))]
+    (doseq [p (set/intersection (set (keys existing-assignment))
+                                (set (keys new-assignment)))]
+      (if (not= (:executors (existing-assignment p)) (:executors (new-assignment p)))
+        (shutdown-worker supervisor (port->worker-id p))))))
+
 (defn mk-synchronize-supervisor [supervisor sync-processes event-manager processes-event-manager]
   (fn this []
     (let [conf (:conf supervisor)
@@ -581,6 +591,7 @@
       (doseq [p (set/difference (set (keys existing-assignment))
                                 (set (keys new-assignment)))]
         (.killedWorker isupervisor (int p)))
+      (kill-existing-workers-with-change-in-components supervisor existing-assignment new-assignment)
       (.assigned isupervisor (keys new-assignment))
       (ls-local-assignments! local-state
             new-assignment)


[2/2] storm git commit: Added STORM-1561 ot Changelog

Posted by ki...@apache.org.
Added STORM-1561 ot Changelog


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/af50c253
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/af50c253
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/af50c253

Branch: refs/heads/1.x-branch
Commit: af50c25385e7ea48bf21f292bd91c253b547854e
Parents: d5e8bab
Author: Kishor Patil <kp...@yahoo-inc.com>
Authored: Fri Mar 4 17:06:55 2016 +0000
Committer: Kishor Patil <kp...@yahoo-inc.com>
Committed: Fri Mar 4 17:06:55 2016 +0000

----------------------------------------------------------------------
 CHANGELOG.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/af50c253/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53c6d0b..481b803 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 1.0.0
+ * STORM-1561: Supervisor should relaunch worker if assignments have changed
  * STORM-1601: Check if /backpressure/storm-id node exists before requesting children
  * STORM-1574: Better handle backpressure exception etc.
  * STORM-1587: Avoid NPE while prining Metrics