Fixing merge issues.
Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/8241146d Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/8241146d Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/8241146d Branch: refs/heads/nimbus-ha-branch Commit: 8241146d95ea353acc8c5f3e581d938187b09c86 Parents: 1dccc1b Author: Parth Brahmbhatt <[email protected]> Authored: Wed Dec 17 11:13:56 2014 -0800 Committer: Parth Brahmbhatt <[email protected]> Committed: Wed Dec 17 11:13:56 2014 -0800 ---------------------------------------------------------------------- storm-core/src/clj/backtype/storm/cluster.clj | 4 ++-- storm-core/src/clj/backtype/storm/daemon/nimbus.clj | 2 +- storm-core/src/clj/backtype/storm/ui/core.clj | 2 +- .../jvm/backtype/storm/torrent/BitTorrentCodeDistributor.java | 2 +- storm-core/src/jvm/backtype/storm/utils/Utils.java | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/8241146d/storm-core/src/clj/backtype/storm/cluster.clj ---------------------------------------------------------------------- diff --git a/storm-core/src/clj/backtype/storm/cluster.clj b/storm-core/src/clj/backtype/storm/cluster.clj index 840575b..572fc96 100644 --- a/storm-core/src/clj/backtype/storm/cluster.clj +++ b/storm-core/src/clj/backtype/storm/cluster.clj @@ -432,8 +432,8 @@ (setup-code-distributor! [this storm-id info] - (mkdirs cluster-state (code-distributor-path storm-id) acl) - (mkdirs cluster-state (str (code-distributor-path storm-id) "/" info) acl)) + (mkdirs cluster-state (code-distributor-path storm-id) acls) + (mkdirs cluster-state (str (code-distributor-path storm-id) "/" info) acls)) (remove-storm! [this storm-id] http://git-wip-us.apache.org/repos/asf/storm/blob/8241146d/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 9f5b1a6..fbe8e77 100644 --- a/storm-core/src/clj/backtype/storm/daemon/nimbus.clj +++ b/storm-core/src/clj/backtype/storm/daemon/nimbus.clj @@ -349,7 +349,7 @@ (let [min-replication-count (conf MIN-REPLICATION-COUNT) max-replication-wait-time (conf MAX-REPLICATION-WAIT-TIME-SEC) total-wait-time (atom 0) - current-replication-count (atom (.getReplicationCount (:bt-tracker nimbus) storm-id))] + current-replication-count (atom (if (:bt-tracker nimbus) (.getReplicationCount (:bt-tracker nimbus) storm-id) 0))] (if (:bt-tracker nimbus) (while (and (> min-replication-count @current-replication-count) (or (= -1 max-replication-wait-time) http://git-wip-us.apache.org/repos/asf/storm/blob/8241146d/storm-core/src/clj/backtype/storm/ui/core.clj ---------------------------------------------------------------------- diff --git a/storm-core/src/clj/backtype/storm/ui/core.clj b/storm-core/src/clj/backtype/storm/ui/core.clj index 12a396e..5c699a5 100644 --- a/storm-core/src/clj/backtype/storm/ui/core.clj +++ b/storm-core/src/clj/backtype/storm/ui/core.clj @@ -908,7 +908,7 @@ (let [user (.getUserName http-creds-handler servlet-request)] (assert-authorized-user servlet-request "getClusterInfo") (json-response (cluster-summary user) (:callback m)))) - (GET "/api/v1/nimbus/summary" [& m] + (GET "/api/v1/nimbus/summary" [:as {:keys [cookies servlet-request]} & m] (assert-authorized-user servlet-request "getClusterInfo") (json-response (nimbus-summary) (:callback m))) (GET "/api/v1/supervisor/summary" [:as {:keys [cookies servlet-request]} & m] http://git-wip-us.apache.org/repos/asf/storm/blob/8241146d/storm-core/src/jvm/backtype/storm/torrent/BitTorrentCodeDistributor.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/torrent/BitTorrentCodeDistributor.java b/storm-core/src/jvm/backtype/storm/torrent/BitTorrentCodeDistributor.java index f4512b4..a0d2fc8 100644 --- a/storm-core/src/jvm/backtype/storm/torrent/BitTorrentCodeDistributor.java +++ b/storm-core/src/jvm/backtype/storm/torrent/BitTorrentCodeDistributor.java @@ -138,7 +138,7 @@ public class BitTorrentCodeDistributor implements ICodeDistributor { } } - throw new RuntimeException("No valid InetAddress could be obtained, something really wrong with network configuration.") + throw new RuntimeException("No valid InetAddress could be obtained, something really wrong with network configuration."); } @Override http://git-wip-us.apache.org/repos/asf/storm/blob/8241146d/storm-core/src/jvm/backtype/storm/utils/Utils.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/utils/Utils.java b/storm-core/src/jvm/backtype/storm/utils/Utils.java index d392397..1c4c567 100644 --- a/storm-core/src/jvm/backtype/storm/utils/Utils.java +++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java @@ -260,13 +260,13 @@ public class Utils { download(client, file, localFile); } - public static void downloadFromHost(Map conf, String file, String localFile, String host, int port) throws IOException, TException { + public static void downloadFromHost(Map conf, String file, String localFile, String host, int port) throws IOException, TException, AuthorizationException { //TODO : instead of null as last arg we probably need some real timeout, check what is the default and if its ok to reuse. NimbusClient client = new NimbusClient (conf, host, port, null); download(client, file, localFile); } - private static void download(NimbusClient client, String file, String localFile) throws IOException, TException { + private static void download(NimbusClient client, String file, String localFile) throws IOException, TException, AuthorizationException { String id = client.getClient().beginFileDownload(file); WritableByteChannel out = Channels.newChannel(new FileOutputStream(localFile)); while(true) {
