You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by dl...@apache.org on 2016/08/23 14:10:47 UTC
[1/2] accumulo git commit: ACCUMULO-4163: change exception handling
Repository: accumulo
Updated Branches:
refs/heads/1.7 a226233d7 -> ffd50280b
ACCUMULO-4163: change exception handling
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/82f17349
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/82f17349
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/82f17349
Branch: refs/heads/1.7
Commit: 82f173496b2d71b9cc586b4870169ca64f89cdd6
Parents: 7efbbd5
Author: Dave Marion <dl...@apache.org>
Authored: Mon Aug 22 18:42:56 2016 -0400
Committer: Dave Marion <dl...@apache.org>
Committed: Mon Aug 22 18:42:56 2016 -0400
----------------------------------------------------------------------
.../org/apache/accumulo/server/util/ZooZap.java | 27 ++++++++++++--------
1 file changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/82f17349/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java b/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java
index f9bb208..5a8f8bd 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java
@@ -24,6 +24,7 @@ import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
import org.apache.accumulo.server.cli.ClientOpts;
import org.apache.accumulo.server.zookeeper.ZooLock;
import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.zookeeper.KeeperException;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
@@ -61,7 +62,11 @@ public class ZooZap {
if (opts.zapMaster) {
String masterLockPath = Constants.ZROOT + "/" + iid + Constants.ZMASTER_LOCK;
- zapDirectory(zoo, masterLockPath, opts);
+ try {
+ zapDirectory(zoo, masterLockPath, opts);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
if (opts.zapTservers) {
@@ -89,20 +94,20 @@ public class ZooZap {
if (opts.zapTracers) {
String path = Constants.ZROOT + "/" + iid + Constants.ZTRACERS;
- zapDirectory(zoo, path, opts);
+ try {
+ zapDirectory(zoo, path, opts);
+ } catch (Exception e) {
+ // do nothing if the /tracers node does not exist.
+ }
}
}
- private static void zapDirectory(IZooReaderWriter zoo, String path, Opts opts) {
- try {
- List<String> children = zoo.getChildren(path);
- for (String child : children) {
- message("Deleting " + path + "/" + child + " from zookeeper", opts);
- zoo.recursiveDelete(path + "/" + child, NodeMissingPolicy.SKIP);
- }
- } catch (Exception e) {
- e.printStackTrace();
+ private static void zapDirectory(IZooReaderWriter zoo, String path, Opts opts) throws KeeperException, InterruptedException {
+ List<String> children = zoo.getChildren(path);
+ for (String child : children) {
+ message("Deleting " + path + "/" + child + " from zookeeper", opts);
+ zoo.recursiveDelete(path + "/" + child, NodeMissingPolicy.SKIP);
}
}
}
[2/2] accumulo git commit: Merge branch '1.6' into 1.7
Posted by dl...@apache.org.
Merge branch '1.6' into 1.7
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/ffd50280
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/ffd50280
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/ffd50280
Branch: refs/heads/1.7
Commit: ffd50280b12139ab15b3f2d68018c21f30575209
Parents: a226233 82f1734
Author: Dave Marion <dl...@apache.org>
Authored: Tue Aug 23 09:56:35 2016 -0400
Committer: Dave Marion <dl...@apache.org>
Committed: Tue Aug 23 09:56:35 2016 -0400
----------------------------------------------------------------------
.../org/apache/accumulo/server/util/ZooZap.java | 27 ++++++++++++--------
1 file changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/ffd50280/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java
----------------------------------------------------------------------
diff --cc server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java
index f3a9bdc,5a8f8bd..296f7b6
--- a/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java
@@@ -26,11 -22,9 +26,12 @@@ import org.apache.accumulo.core.conf.Si
import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
import org.apache.accumulo.server.cli.ClientOpts;
+import org.apache.accumulo.server.security.SecurityUtil;
import org.apache.accumulo.server.zookeeper.ZooLock;
import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+ import org.apache.zookeeper.KeeperException;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
@@@ -106,8 -93,12 +111,12 @@@ public class ZooZap
}
if (opts.zapTracers) {
- String path = Constants.ZROOT + "/" + iid + Constants.ZTRACERS;
+ String path = opts.getTraceZKPath();
- zapDirectory(zoo, path, opts);
+ try {
+ zapDirectory(zoo, path, opts);
+ } catch (Exception e) {
+ // do nothing if the /tracers node does not exist.
+ }
}
}