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 2014/06/26 23:02:34 UTC
[1/3] git commit: STORM-213. Decouple In-Process ZooKeeper from
LocalCluster.
Repository: incubator-storm
Updated Branches:
refs/heads/master 8f2e74933 -> 6f57464c5
STORM-213. Decouple In-Process ZooKeeper from LocalCluster.
Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/c95c7193
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/c95c7193
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/c95c7193
Branch: refs/heads/master
Commit: c95c7193e7e24b08016dd68793e19ecad580d118
Parents: 97db22a
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Tue Jun 24 18:38:16 2014 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Tue Jun 24 18:38:16 2014 -0700
----------------------------------------------------------------------
.../src/clj/backtype/storm/LocalCluster.clj | 7 +++++-
storm-core/src/clj/backtype/storm/testing.clj | 24 ++++++++++++--------
2 files changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/c95c7193/storm-core/src/clj/backtype/storm/LocalCluster.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/LocalCluster.clj b/storm-core/src/clj/backtype/storm/LocalCluster.clj
index dc8214d..47bd6b8 100644
--- a/storm-core/src/clj/backtype/storm/LocalCluster.clj
+++ b/storm-core/src/clj/backtype/storm/LocalCluster.clj
@@ -20,7 +20,7 @@
(:gen-class
:init init
:implements [backtype.storm.ILocalCluster]
- :constructors {[] [] [java.util.Map] []}
+ :constructors {[] [] [java.util.Map] [] [String Long] []}
:state state))
(defn -init
@@ -29,6 +29,11 @@
:daemon-conf
{TOPOLOGY-ENABLE-MESSAGE-TIMEOUTS true})]
[[] ret]))
+ ([^String zk-host ^Long zk-port]
+ (let [ret (mk-local-storm-cluster :daemon-conf {TOPOLOGY-ENABLE-MESSAGE-TIMEOUTS true
+ STORM-ZOOKEEPER-SERVERS (list zk-host)
+ STORM-ZOOKEEPER-PORT zk-port})]
+ [[] zk-host zk-port]))
([^Map stateMap]
[[] stateMap]))
http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/c95c7193/storm-core/src/clj/backtype/storm/testing.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/testing.clj b/storm-core/src/clj/backtype/storm/testing.clj
index 32f7f88..c3eb76f 100644
--- a/storm-core/src/clj/backtype/storm/testing.clj
+++ b/storm-core/src/clj/backtype/storm/testing.clj
@@ -119,16 +119,18 @@
;; if need to customize amt of ports more, can use add-supervisor calls afterwards
(defnk mk-local-storm-cluster [:supervisors 2 :ports-per-supervisor 3 :daemon-conf {} :inimbus nil :supervisor-slot-port-min 1024]
(let [zk-tmp (local-temp-path)
- [zk-port zk-handle] (zk/mk-inprocess-zookeeper zk-tmp)
+ [zk-port zk-handle] (if-not (contains? daemon-conf STORM-ZOOKEEPER-SERVERS)
+ (zk/mk-inprocess-zookeeper zk-tmp))
daemon-conf (merge (read-storm-config)
{TOPOLOGY-SKIP-MISSING-KRYO-REGISTRATIONS true
ZMQ-LINGER-MILLIS 0
TOPOLOGY-ENABLE-MESSAGE-TIMEOUTS false
- TOPOLOGY-TRIDENT-BATCH-EMIT-INTERVAL-MILLIS 50}
- daemon-conf
- {STORM-CLUSTER-MODE "local"
- STORM-ZOOKEEPER-PORT zk-port
- STORM-ZOOKEEPER-SERVERS ["localhost"]})
+ TOPOLOGY-TRIDENT-BATCH-EMIT-INTERVAL-MILLIS 50
+ STORM-CLUSTER-MODE "local"}
+ (if-not (contains? daemon-conf STORM-ZOOKEEPER-SERVERS)
+ {STORM-ZOOKEEPER-PORT zk-port
+ STORM-ZOOKEEPER-SERVERS ["localhost"]})
+ daemon-conf)
nimbus-tmp (local-temp-path)
port-counter (mk-counter supervisor-slot-port-min)
nimbus (nimbus/service-handler
@@ -142,7 +144,7 @@
:state (mk-distributed-cluster-state daemon-conf)
:storm-cluster-state (mk-storm-cluster-state daemon-conf)
:tmp-dirs (atom [nimbus-tmp zk-tmp])
- :zookeeper zk-handle
+ :zookeeper (if (not-nil? zk-handle) zk-handle)
:shared-context context}
supervisor-confs (if (sequential? supervisors)
supervisors
@@ -173,9 +175,11 @@
;; race condition here? will it launch the workers again?
(supervisor/kill-supervisor s))
(psim/kill-all-processes)
- (log-message "Shutting down in process zookeeper")
- (zk/shutdown-inprocess-zookeeper (:zookeeper cluster-map))
- (log-message "Done shutting down in process zookeeper")
+ (if (not-nil? (:zookeeper cluster-map))
+ (do
+ (log-message "Shutting down in process zookeeper")
+ (zk/shutdown-inprocess-zookeeper (:zookeeper cluster-map))
+ (log-message "Done shutting down in process zookeeper")))
(doseq [t @(:tmp-dirs cluster-map)]
(log-message "Deleting temporary path " t)
(try
[2/3] git commit: Merge branch 'STORM-213-V1' of
https://github.com/harshach/incubator-storm into STORM-213
Posted by bo...@apache.org.
Merge branch 'STORM-213-V1' of https://github.com/harshach/incubator-storm into STORM-213
STORM-213: Decouple In-Process ZooKeeper from LocalCluster.
Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/e9ca55cd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/e9ca55cd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/e9ca55cd
Branch: refs/heads/master
Commit: e9ca55cdb4c60597f6560191dfac55203580ccb6
Parents: 8f2e749 c95c719
Author: Robert (Bobby) Evans <bo...@apache.org>
Authored: Thu Jun 26 15:56:06 2014 -0500
Committer: Robert (Bobby) Evans <bo...@apache.org>
Committed: Thu Jun 26 15:56:06 2014 -0500
----------------------------------------------------------------------
.../src/clj/backtype/storm/LocalCluster.clj | 7 +++++-
storm-core/src/clj/backtype/storm/testing.clj | 24 ++++++++++++--------
2 files changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
[3/3] git commit: UAdded STORM-213 to Changelog
Posted by bo...@apache.org.
UAdded STORM-213 to Changelog
Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/6f57464c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/6f57464c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/6f57464c
Branch: refs/heads/master
Commit: 6f57464c539f2a667389dffde0d2243796022c76
Parents: e9ca55c
Author: Robert (Bobby) Evans <bo...@apache.org>
Authored: Thu Jun 26 15:58:12 2014 -0500
Committer: Robert (Bobby) Evans <bo...@apache.org>
Committed: Thu Jun 26 15:58:12 2014 -0500
----------------------------------------------------------------------
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/6f57464c/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 38c1f7d..bdc6af0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
* STORM-54: Per-Topology Classpath and Environment for Workers
* STORM-355: excluding outdated netty transitively included via curator
* STORM-183: Replacing RunTime.halt() with RunTime.exit()
+ * STORM-213: Decouple In-Process ZooKeeper from LocalCluster.
## 0.9.2-incubating
* STORM-66: send taskid on initial handshake