hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-18801 Bulk load cleanup may falsely deem file deletion successful
Date Thu, 14 Sep 2017 15:09:52 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 61d10feff -> c17b49143


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

Signed-off-by: tedyu <yuzhihong@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 <reidddchan@outlook.com>
Authored: Thu Sep 14 20:28:17 2017 +0800
Committer: tedyu <yuzhihong@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,


Mime
View raw message