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 2015/08/05 22:46:45 UTC
[1/3] storm git commit: STORM-913:Use Curator's
delete().deletingChildrenIfNeeded() instead of zk/delete-recursive
Repository: storm
Updated Branches:
refs/heads/master 7f181188b -> 938f03d83
STORM-913:Use Curator's delete().deletingChildrenIfNeeded() instead of zk/delete-recursive
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/fa370b54
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/fa370b54
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/fa370b54
Branch: refs/heads/master
Commit: fa370b540cdc91cefea6ccda166525ba4e6aa15c
Parents: 30df970
Author: caofangkun <ca...@gmail.com>
Authored: Fri Jul 3 14:29:57 2015 +0800
Committer: caofangkun <ca...@gmail.com>
Committed: Fri Jul 3 14:29:57 2015 +0800
----------------------------------------------------------------------
storm-core/src/clj/backtype/storm/cluster.clj | 2 +-
storm-core/src/clj/backtype/storm/zookeeper.clj | 25 +++++++-------------
2 files changed, 9 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/fa370b54/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 1a13f7b..63e385f 100644
--- a/storm-core/src/clj/backtype/storm/cluster.clj
+++ b/storm-core/src/clj/backtype/storm/cluster.clj
@@ -107,7 +107,7 @@
(delete-node
[this path]
- (zk/delete-recursive zk path))
+ (zk/delete-node zk path))
(get-data
[this path watch?]
http://git-wip-us.apache.org/repos/asf/storm/blob/fa370b54/storm-core/src/clj/backtype/storm/zookeeper.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/zookeeper.clj b/storm-core/src/clj/backtype/storm/zookeeper.clj
index eea71be..390b20b 100644
--- a/storm-core/src/clj/backtype/storm/zookeeper.clj
+++ b/storm-core/src/clj/backtype/storm/zookeeper.clj
@@ -88,7 +88,7 @@
([^CuratorFramework zk ^String path ^bytes data mode acls]
(let [mode (zk-create-modes mode)]
(try
- (.. zk (create) (withMode mode) (withACL acls) (forPath (normalize-path path) data))
+ (.. zk (create) (creatingParentsIfNeeded) (withMode mode) (withACL acls) (forPath (normalize-path path) data))
(catch Exception e (throw (wrap-in-runtime e))))))
([^CuratorFramework zk ^String path ^bytes data acls]
(create-node zk path data :persistent acls)))
@@ -103,11 +103,13 @@
(catch Exception e (throw (wrap-in-runtime e))))))
(defnk delete-node
- [^CuratorFramework zk ^String path :force false]
- (try-cause (.. zk (delete) (forPath (normalize-path path)))
- (catch KeeperException$NoNodeException e
- (when-not force (throw e)))
- (catch Exception e (throw (wrap-in-runtime e)))))
+ [^CuratorFramework zk ^String path]
+ (let [path (normalize-path path)]
+ (when (exists-node? zk path false)
+ (try-cause (.. zk (delete) (deletingChildrenIfNeeded) (forPath (normalize-path path)))
+ (catch KeeperException$NoNodeException e
+ ;; do nothing)
+ (catch Exception e (throw (wrap-in-runtime e)))))))
(defn mkdirs
[^CuratorFramework zk ^String path acls]
@@ -177,17 +179,6 @@
[^CuratorFramework zk ^String path watch?]
(exists-node? zk path watch?))
-(defn delete-recursive
- [^CuratorFramework zk ^String path]
- (let [path (normalize-path path)]
- (when (exists-node? zk path false)
- (let [children (try-cause
- (get-children zk path false)
- (catch KeeperException$NoNodeException e []))]
- (doseq [c children]
- (delete-recursive zk (full-path path c)))
- (delete-node zk path :force true)))))
-
(defnk mk-inprocess-zookeeper
[localdir :port nil]
(let [localfile (File. localdir)
[3/3] storm git commit: Merge branch 'storm-913-1' of
https://github.com/caofangkun/apache-storm into STORM-913
Posted by bo...@apache.org.
Merge branch 'storm-913-1' of https://github.com/caofangkun/apache-storm into STORM-913
STORM-913: Use Curator's delete().deletingChildrenIfNeeded() instead of zk/delete-recursive
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/938f03d8
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/938f03d8
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/938f03d8
Branch: refs/heads/master
Commit: 938f03d8357a87b121389222805e843610702c56
Parents: 7f18118 0d79feb
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Wed Aug 5 15:39:51 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Wed Aug 5 15:39:51 2015 -0500
----------------------------------------------------------------------
storm-core/src/clj/backtype/storm/cluster.clj | 2 +-
storm-core/src/clj/backtype/storm/zookeeper.clj | 26 +++++++-------------
2 files changed, 10 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
[2/3] storm git commit: STORM-913: modify zookeeper.clj fix EOF
exception
Posted by bo...@apache.org.
STORM-913: modify zookeeper.clj fix EOF exception
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/0d79febc
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/0d79febc
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/0d79febc
Branch: refs/heads/master
Commit: 0d79febc05f02603ac8be0512ff791b53b896905
Parents: fa370b5
Author: caofangkun <ca...@gmail.com>
Authored: Fri Jul 3 15:36:45 2015 +0800
Committer: caofangkun <ca...@gmail.com>
Committed: Fri Jul 3 15:36:45 2015 +0800
----------------------------------------------------------------------
storm-core/src/clj/backtype/storm/zookeeper.clj | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/0d79febc/storm-core/src/clj/backtype/storm/zookeeper.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/zookeeper.clj b/storm-core/src/clj/backtype/storm/zookeeper.clj
index 390b20b..f38abcc 100644
--- a/storm-core/src/clj/backtype/storm/zookeeper.clj
+++ b/storm-core/src/clj/backtype/storm/zookeeper.clj
@@ -108,7 +108,8 @@
(when (exists-node? zk path false)
(try-cause (.. zk (delete) (deletingChildrenIfNeeded) (forPath (normalize-path path)))
(catch KeeperException$NoNodeException e
- ;; do nothing)
+ ;; do nothing
+ )
(catch Exception e (throw (wrap-in-runtime e)))))))
(defn mkdirs