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:29:40 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 3054c3b9b -> 26387cbf1


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/26387cbf
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/26387cbf
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/26387cbf

Branch: refs/heads/master
Commit: 26387cbf186635c6ccb3fdaf113861e2a05dce5c
Parents: 3054c3b
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:27:34 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/26387cbf/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 b85aa21..7f9fcc9 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