storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject [1/3] storm git commit: STORM-2520 AutoHDFS should prefer cluster-wise hdfs kerberos principal to global hdfs kerberos principal
Date Thu, 18 May 2017 08:12:25 GMT
Repository: storm
Updated Branches:
  refs/heads/1.x-branch fa48720e5 -> c6caa4563


STORM-2520 AutoHDFS should prefer cluster-wise hdfs kerberos principal to global hdfs kerberos
principal


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

Branch: refs/heads/1.x-branch
Commit: 7a749a1051d77e5b267c0801e83f169961ee90d1
Parents: 4058623
Author: Jungtaek Lim <kabhwan@gmail.com>
Authored: Wed May 17 23:45:42 2017 +0900
Committer: Jungtaek Lim <kabhwan@gmail.com>
Committed: Wed May 17 23:45:42 2017 +0900

----------------------------------------------------------------------
 .../src/main/java/org/apache/storm/hdfs/security/AutoHDFS.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/7a749a10/external/storm-autocreds/src/main/java/org/apache/storm/hdfs/security/AutoHDFS.java
----------------------------------------------------------------------
diff --git a/external/storm-autocreds/src/main/java/org/apache/storm/hdfs/security/AutoHDFS.java
b/external/storm-autocreds/src/main/java/org/apache/storm/hdfs/security/AutoHDFS.java
index e1e8512..bd7ea0a 100644
--- a/external/storm-autocreds/src/main/java/org/apache/storm/hdfs/security/AutoHDFS.java
+++ b/external/storm-autocreds/src/main/java/org/apache/storm/hdfs/security/AutoHDFS.java
@@ -117,7 +117,11 @@ public class AutoHDFS extends AbstractAutoCreds {
                             FileSystem fileSystem = FileSystem.get(nameNodeURI, configuration);
                             Credentials credential= proxyUser.getCredentials();
 
-                            fileSystem.addDelegationTokens(hdfsPrincipal, credential);
+                            if (configuration.get(STORM_USER_NAME_KEY) == null) {
+                                configuration.set(STORM_USER_NAME_KEY, hdfsPrincipal);
+                            }
+
+                            fileSystem.addDelegationTokens(configuration.get(STORM_USER_NAME_KEY),
credential);
                             LOG.info("Delegation tokens acquired for user {}", topologySubmitterUser);
                             return credential;
                         } catch (IOException e) {


Mime
View raw message