hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject git commit: HBASE-11237 Bulk load initiated by user other than hbase fails
Date Thu, 22 May 2014 22:33:17 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 296714c7d -> 3c90cfa0b


HBASE-11237 Bulk load initiated by user other than hbase fails


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

Branch: refs/heads/0.98
Commit: 3c90cfa0b2f9554f7227545cac6857ecab74374e
Parents: 296714c
Author: Jimmy Xiang <jxiang@cloudera.com>
Authored: Thu May 22 15:27:34 2014 -0700
Committer: Jimmy Xiang <jxiang@cloudera.com>
Committed: Thu May 22 15:31:35 2014 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/security/access/SecureBulkLoadEndpoint.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3c90cfa0/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 7f845cc..1ce5a50 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
@@ -236,7 +236,11 @@ public class SecureBulkLoadEndpoint extends SecureBulkLoadService
         done.run(null);
         return;
       }
-      ugi.addToken(targetfsDelegationToken.getUserToken());
+      Token<?> targetFsToken = targetfsDelegationToken.getUserToken();
+      if (targetFsToken != null && (userToken == null
+          || !targetFsToken.getService().equals(userToken.getService()))) {
+        ugi.addToken(targetFsToken);
+      }
 
       loaded = ugi.doAs(new PrivilegedAction<Boolean>() {
         @Override


Mime
View raw message