-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[STORM-1257] port backtype.storm.zookeeper to java #1047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
70f7497
39e11c0
d66ae23
c75ddca
3f1cefc
394feff
1c73197
795fda8
122fc09
12a7085
12631e0
9442b4a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,8 @@ | |
| [worker :as worker] | ||
| [executor :as executor]]) | ||
| (:require [org.apache.storm [process-simulator :as psim]]) | ||
| (:import [org.apache.commons.io FileUtils]) | ||
| (:import [org.apache.commons.io FileUtils] | ||
| [org.apache.storm.zookeeper Zookeeper]) | ||
| (:import [java.io File]) | ||
| (:import [java.util HashMap ArrayList]) | ||
| (:import [java.util.concurrent.atomic AtomicInteger]) | ||
|
|
@@ -134,7 +135,7 @@ | |
| (defnk mk-local-storm-cluster [:supervisors 2 :ports-per-supervisor 3 :daemon-conf {} :inimbus nil :supervisor-slot-port-min 1024 :nimbus-daemon false] | ||
| (let [zk-tmp (local-temp-path) | ||
| [zk-port zk-handle] (if-not (contains? daemon-conf STORM-ZOOKEEPER-SERVERS) | ||
| (zk/mk-inprocess-zookeeper zk-tmp)) | ||
| (Zookeeper/mkInprocessZookeeper zk-tmp nil)) | ||
| daemon-conf (merge (clojurify-structure (ConfigUtils/readStormConfig)) | ||
| {TOPOLOGY-SKIP-MISSING-KRYO-REGISTRATIONS true | ||
| ZMQ-LINGER-MILLIS 0 | ||
|
|
@@ -203,7 +204,7 @@ | |
| (if (not-nil? (:zookeeper cluster-map)) | ||
| (do | ||
| (log-message "Shutting down in process zookeeper") | ||
| (zk/shutdown-inprocess-zookeeper (:zookeeper cluster-map)) | ||
| (Zookeeper/shutdownInprocessZookeeper (:zookeeper cluster-map)) | ||
| (log-message "Done shutting down in process zookeeper"))) | ||
| (doseq [t @(:tmp-dirs cluster-map)] | ||
| (log-message "Deleting temporary path " t) | ||
|
|
@@ -288,11 +289,11 @@ | |
| (defmacro with-inprocess-zookeeper | ||
| [port-sym & body] | ||
| `(with-local-tmp [tmp#] | ||
| (let [[~port-sym zks#] (zk/mk-inprocess-zookeeper tmp#)] | ||
| (let [[~port-sym zks#] (Zookeeper/mkInprocessZookeeper tmp# nil)] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not a drop in replacement because mkInprocessZookeeper is returning just zks# not ~port-sym. You might be able to make this work by changing it to.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How did this make it through unit tests?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It didn't I fixed it in a different way. I made Zookeeper/mkInprocessZookeeper match zk/mk-inprocess-zookeeper instead of returning just the factory and trying to pull the port out of the factory.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahhhh, okay. This is the part you were talking about. So this is resolved. |
||
| (try | ||
| ~@body | ||
| (finally | ||
| (zk/shutdown-inprocess-zookeeper zks#)))))) | ||
| (Zookeeper/shutdownInprocessZookeeper zks#)))))) | ||
|
|
||
| (defn submit-local-topology | ||
| [nimbus storm-name conf topology] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs to be updated similarly to below.