Skip to content
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

update zookeeper from version 3.3.3 to 3.4.5; fix lein compile testing.c... #727

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion storm-core/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
:exclusions [org.slf4j/slf4j-api]]
[clj-time "0.4.1"]
[com.netflix.curator/curator-framework "1.0.1"
:exclusions [log4j/log4j]]
:exclusions [log4j/log4j org.apache.zookeeper/zookeeper]]
[org.apache.zookeeper/zookeeper "3.4.5"
:exclusions [com.sun.jmx/jmxri com.sun.jdmk/jmxtools javax.jms/jms log4j/log4j jline org.slf4j/slf4j-log4j12]]
[backtype/jzmq "2.1.0"]
[com.googlecode.json-simple/json-simple "1.1"]
[compojure "1.1.3"]
Expand All @@ -34,6 +36,7 @@
:test-paths ["test/clj"]
:resource-paths ["../conf"]
:target-path "target"
:jar-exclusions [#".svn" #".DS_Store"]

:profiles {:dev {:resource-paths ["src/dev"]
:dependencies [[org.mockito/mockito-all "1.9.5"]]}
Expand Down
3 changes: 2 additions & 1 deletion storm-core/src/clj/backtype/storm/testing4j.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(ns backtype.storm.testing4j
(:require [backtype.storm.LocalCluster :as LocalCluster])
(:import [java.util Map List Collection ArrayList])
(:import [backtype.storm Config ILocalCluster LocalCluster])
(:import [backtype.storm.generated StormTopology])
Expand Down Expand Up @@ -135,4 +136,4 @@
(let [stream (or (.getStream param) Utils/DEFAULT_STREAM_ID)
component (or (.getComponent param) "component")
fields (.getFields param)]
(test-tuple values :stream stream :component component :fields fields)))))
(test-tuple values :stream stream :component component :fields fields)))))
4 changes: 2 additions & 2 deletions storm-core/src/clj/backtype/storm/zookeeper.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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 (doto (NIOServerCnxnFactory.) (.configure (InetSocketAddress. retport) 0))
(catch BindException e
(when (> (inc retport) (if port port 65535))
(throw (RuntimeException. "No port is available to launch an inprocess zookeeper.")))))]
Expand Down
7 changes: 7 additions & 0 deletions storm-core/src/jvm/backtype/storm/StormSubmitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.thrift7.TException;
import org.json.simple.JSONValue;

Expand Down Expand Up @@ -59,6 +60,12 @@ public static void submitTopology(String name, Map stormConf, StormTopology topo
}
stormConf = new HashMap(stormConf);
stormConf.putAll(Utils.readCommandLineOpts());
for (Object confName : stormConf.keySet()) {
String confValue = String.valueOf(stormConf.get(confName));
if (NumberUtils.isNumber(confValue)) {
stormConf.put(confName, NumberUtils.createNumber(confValue));
}
}
Map conf = Utils.readStormConfig();
conf.putAll(stormConf);
try {
Expand Down