This is an automated email from the ASF dual-hosted git repository.
abstractdog pushed a commit to branch branch-0.9
in repository https://gitbox.apache.org/repos/asf/tez.git
The following commit(s) were added to refs/heads/branch-0.9 by this push:
new eb5975f 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)
eb5975f is described below
commit eb5975f1a9af030c84eb3bc17fb38c44e14546c6
Author: László Bodor <[email protected]>
AuthorDate: Tue Feb 25 11:26:26 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 | 8 ++++++++
1 file changed, 8 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 ae4f4a9..3fa2f93 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
@@ -493,6 +493,14 @@ public class TezClientUtils {
amLaunchCredentials.addAll(amConfig.getCredentials());
}
+ // 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);