This is an automated email from the ASF dual-hosted git repository.

abstractdog pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tez.git


The following commit(s) were added to refs/heads/master by this push:
     new 7e65a9e  TEZ-3727: When using HDFS federation, token of 
tez.simple.history.logging.dir is not added, causing AM to fail (contributed by 
Xi Chen, reviewed by László Bodor, Jonathan Turner Eagles)
7e65a9e is described below

commit 7e65a9eafd775574db740075968bdce82ea0b7ca
Author: László Bodor <[email protected]>
AuthorDate: Tue Feb 25 11:21:21 2020 +0100

    TEZ-3727: When using HDFS federation, token of 
tez.simple.history.logging.dir is not added, causing AM to fail (contributed by 
Xi Chen, reviewed by László Bodor, Jonathan Turner Eagles)
    
    Signed-off-by: Laszlo Bodor <[email protected]>
---
 tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java 
b/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java
index db1bc0c..8850ca7 100644
--- a/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java
+++ b/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java
@@ -713,6 +713,15 @@ public class TezClientUtils {
     // Setup security tokens
     Credentials amLaunchCredentials = new Credentials();
 
+    // Add SimpleHistoryLoggingService logDir creds to the list of session 
credentials
+    // If it is on HDFS
+    String simpleHistoryLogDir = 
conf.get(TezConfiguration.TEZ_SIMPLE_HISTORY_LOGGING_DIR);
+    if (simpleHistoryLogDir != null && !simpleHistoryLogDir.isEmpty()) {
+      Path simpleHistoryLogDirPath = new Path(simpleHistoryLogDir);
+      TokenCache.obtainTokensForFileSystems(sessionCreds, new Path[] { 
simpleHistoryLogDirPath },
+          conf);
+    }
+
     // Add Staging dir creds to the list of session credentials.
     TokenCache.obtainTokensForFileSystems(sessionCreds, new Path[] 
{binaryConfPath }, conf);
 

Reply via email to