You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by ab...@apache.org on 2020/02/25 10:23:18 UTC

[tez] branch master updated: 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)

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 <bo...@gmail.com>
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 <bo...@gmail.com>
---
 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);