storm-commits mailing list archives

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


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

Branch: refs/heads/master
Commit: d6b7f32f892d2ecd75fa1c71f40eeb9204c344c9
Parents: fa846f1
Author: Jungtaek Lim <kabhwan@gmail.com>
Authored: Wed May 17 23:45:42 2017 +0900
Committer: Arun Mahadevan <arunm@apache.org>
Committed: Thu May 18 13:32:47 2017 +0530

----------------------------------------------------------------------
 .../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/d6b7f32f/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 5601ea4..95de41b 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
@@ -113,7 +113,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