You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2015/08/24 15:52:30 UTC
[45/50] [abbrv] storm git commit: Nimbus-HAL: Bug fix,
install watch on code-distrbutor everytime sync-code is called.
Nimbus-HAL: Bug fix, install watch on code-distrbutor everytime sync-code is called.
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/21ba9c1c
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/21ba9c1c
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/21ba9c1c
Branch: refs/heads/master
Commit: 21ba9c1c9f73c7a84ac8d221b6ca6a7ca7639d14
Parents: 0395fd6
Author: Parth Brahmbhatt <br...@gmail.com>
Authored: Wed May 27 15:30:10 2015 -0700
Committer: Parth Brahmbhatt <br...@gmail.com>
Committed: Wed Aug 12 09:55:00 2015 -0700
----------------------------------------------------------------------
storm-core/src/clj/backtype/storm/daemon/nimbus.clj | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/21ba9c1c/storm-core/src/clj/backtype/storm/daemon/nimbus.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/nimbus.clj b/storm-core/src/clj/backtype/storm/daemon/nimbus.clj
index 9aa098a..4f516ce 100644
--- a/storm-core/src/clj/backtype/storm/daemon/nimbus.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/nimbus.clj
@@ -367,8 +367,8 @@
(if (< min-replication-count @current-replication-count)
(log-message "desired replication count " min-replication-count " achieved,
current-replication-count" @current-replication-count)
- (log-message "desired replication count of " min-replication-count " not achieved but we have hit the max wait time
- so moving on with replication count = " @current-replication-count)
+ (log-message "desired replication count of " min-replication-count " not achieved but we have hit the max wait time "
+ max-replication-wait-time " so moving on with replication count = " @current-replication-count)
)))
(defn- read-storm-topology [conf storm-id]
@@ -1485,7 +1485,7 @@
(defmethod sync-code :distributed [conf nimbus]
(let [storm-cluster-state (:storm-cluster-state nimbus)
code-ids (set (code-ids (:conf nimbus)))
- active-topologies (set (.code-distributor storm-cluster-state nil))
+ active-topologies (set (.code-distributor storm-cluster-state (fn [] (sync-code conf nimbus))))
missing-topologies (set/difference active-topologies code-ids)]
(if (not (empty? missing-topologies))
(do
@@ -1499,8 +1499,8 @@
(try
(download-code conf nimbus missing (.getHost nimbus-host-port) (.getPort nimbus-host-port))
(catch Exception e (log-error e "Exception while trying to syn-code for missing topology" missing)))))))))
- (.addToLeaderLockQueue (:leader-elector nimbus))
- (log-message "local disk is completely in sync with zk code-distributor.")))
+ ;;TODO Ideally This should only be called if all missing topology code was successfully downloaded.
+ (.addToLeaderLockQueue (:leader-elector nimbus))))
(defmethod sync-code :local [conf nimbus]
nil)