You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2017/09/14 15:09:52 UTC

hbase git commit: HBASE-18801 Bulk load cleanup may falsely deem file deletion successful

Repository: hbase
Updated Branches:
  refs/heads/master 61d10feff -> c17b49143


HBASE-18801 Bulk load cleanup may falsely deem file deletion successful

Signed-off-by: tedyu <yu...@gmail.com>


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

Branch: refs/heads/master
Commit: c17b49143259bb5a813a551b4eb9fa3e246a9f6e
Parents: 61d10fe
Author: Reid Chan <re...@outlook.com>
Authored: Thu Sep 14 20:28:17 2017 +0800
Committer: tedyu <yu...@gmail.com>
Committed: Thu Sep 14 08:09:42 2017 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/regionserver/SecureBulkLoadManager.java     | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/c17b4914/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java
index 85ccc91..66773d0 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java
@@ -170,7 +170,13 @@ public class SecureBulkLoadManager {
       }
     }
 
-    fs.delete(new Path(request.getBulkToken()), true);
+    Path path = new Path(request.getBulkToken());
+    if (!fs.delete(path, true)) {
+      if (fs.exists(path)) {
+        throw new IOException("Failed to clean up " + path);
+      }
+    }
+    LOG.info("Cleaned up " + path + " successfully.");
   }
 
   public Map<byte[], List<Path>> secureBulkLoadHFiles(final Region region,