Created
April 8, 2014 15:23
-
-
Save gianm/10141960 to your computer and use it in GitHub Desktop.
Storm ZK patches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/storm-core/project.clj | |
+++ b/storm-core/project.clj | |
@@ -8,7 +8,7 @@ | |
[storm/libthrift7 "0.7.0-2" | |
:exclusions [org.slf4j/slf4j-api]] | |
[clj-time "0.4.1"] | |
- [com.netflix.curator/curator-framework "1.0.1" | |
+ [com.netflix.curator/curator-framework "1.2.3" | |
:exclusions [log4j/log4j]] | |
[backtype/jzmq "2.1.0"] | |
[com.googlecode.json-simple/json-simple "1.1"] | |
--- a/storm-core/src/clj/backtype/storm/zookeeper.clj | |
+++ b/storm-core/src/clj/backtype/storm/zookeeper.clj | |
@@ -6,7 +6,7 @@ | |
ZooDefs ZooDefs$Ids CreateMode WatchedEvent Watcher$Event Watcher$Event$KeeperState | |
Watcher$Event$EventType KeeperException$NodeExistsException]) | |
(:import [org.apache.zookeeper.data Stat]) | |
- (:import [org.apache.zookeeper.server ZooKeeperServer NIOServerCnxn$Factory]) | |
+ (:import [org.apache.zookeeper.server ZooKeeperServer NIOServerCnxnFactory]) | |
(:import [java.net InetSocketAddress BindException]) | |
(:import [java.io File]) | |
(:import [backtype.storm.utils Utils ZookeeperAuthInfo]) | |
@@ -141,7 +141,7 @@ | |
(let [localfile (File. localdir) | |
zk (ZooKeeperServer. localfile localfile 2000) | |
[retport factory] (loop [retport (if port port 2000)] | |
- (if-let [factory-tmp (try-cause (NIOServerCnxn$Factory. (InetSocketAddress. retport)) | |
+ (if-let [factory-tmp (try-cause (NIOServerCnxnFactory/createFactory retport 60) | |
(catch BindException e | |
(when (> (inc retport) (if port port 65535)) | |
(throw (RuntimeException. "No port is available to launch an inprocess zookeeper.")))))] | |
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java | |
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java | |
@@ -331,7 +331,7 @@ public class Utils { | |
builder = builder.authorization(auth.scheme, auth.payload); | |
} | |
return builder.build(); | |
- } catch (IOException e) { | |
+ } catch (Exception e) { | |
throw new RuntimeException(e); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment