hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject git commit: HBASE-11896 LoadIncrementalHFiles fails in secure mode if the namespace is specified (Ashish Singhi and Ted Yu)
Date Sat, 06 Sep 2014 13:22:44 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 686cecc86 -> 5360fa252


HBASE-11896 LoadIncrementalHFiles fails in secure mode if the namespace is specified (Ashish
Singhi and Ted Yu)


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

Branch: refs/heads/branch-1
Commit: 5360fa2529d551bc8f3317e01fe7ea5ba3f45ef4
Parents: 686cecc
Author: Ted Yu <tedyu@apache.org>
Authored: Sat Sep 6 13:22:34 2014 +0000
Committer: Ted Yu <tedyu@apache.org>
Committed: Sat Sep 6 13:22:34 2014 +0000

----------------------------------------------------------------------
 .../hadoop/hbase/security/access/SecureBulkLoadEndpoint.java  | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/5360fa25/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
index 07d5bf5..b240545 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
@@ -174,7 +174,6 @@ public class SecureBulkLoadEndpoint extends SecureBulkLoadService
       getAccessController().preCleanupBulkLoad(env);
       fs.delete(createStagingDir(baseStagingDir,
           getActiveUser(),
-          env.getRegion().getTableDesc().getTableName(),
           new Path(request.getBulkToken()).getName()),
           true);
       done.run(CleanupBulkLoadResponse.newBuilder().build());
@@ -291,14 +290,14 @@ public class SecureBulkLoadEndpoint extends SecureBulkLoadService
   private Path createStagingDir(Path baseDir,
                                 User user,
                                 TableName tableName) throws IOException {
-    String randomDir = user.getShortName()+"__"+ tableName +"__"+
+    String tblName = tableName.getNameAsString().replace(":", "_");
+    String randomDir = user.getShortName()+"__"+ tblName +"__"+
         (new BigInteger(RANDOM_WIDTH, random).toString(RANDOM_RADIX));
-    return createStagingDir(baseDir, user, tableName, randomDir);
+    return createStagingDir(baseDir, user, randomDir);
   }
 
   private Path createStagingDir(Path baseDir,
                                 User user,
-                                TableName tableName,
                                 String randomDir) throws IOException {
     Path p = new Path(baseDir, randomDir);
     fs.mkdirs(p, PERM_ALL_ACCESS);


Mime
View raw message