You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2014/01/10 17:29:05 UTC

[5/6] git commit: ACCUMULO-2168 log entry in zk is the last element of the file name

ACCUMULO-2168 log entry in zk is the last element of the file name


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/9372608b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/9372608b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/9372608b

Branch: refs/heads/master
Commit: 9372608b16f97a5dcb6e8096fe5cbf4623fe8ff8
Parents: 24e62a0
Author: Eric Newton <er...@gmail.com>
Authored: Fri Jan 10 11:24:53 2014 -0500
Committer: Eric Newton <er...@gmail.com>
Committed: Fri Jan 10 11:24:53 2014 -0500

----------------------------------------------------------------------
 .../org/apache/accumulo/server/util/MetadataTableUtil.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9372608b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
index f61955a..26444e0 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
@@ -607,8 +607,10 @@ public class MetadataTableUtil {
         while (true) {
           try {
             IZooReaderWriter zoo = ZooReaderWriter.getInstance();
-            if (zoo.isLockHeld(zooLock.getLockID()))
-              zoo.recursiveDelete(root + "/" + entry.filename, NodeMissingPolicy.SKIP);
+            if (zoo.isLockHeld(zooLock.getLockID())) {
+              String parts[] = entry.filename.split("/");
+              zoo.recursiveDelete(root + "/" + parts[parts.length - 1], NodeMissingPolicy.SKIP);
+            }
             break;
           } catch (Exception e) {
             log.error(e, e);