Author: knoguchi
Date: Thu Oct 10 20:48:29 2024
New Revision: 1921243

URL: http://svn.apache.org/viewvc?rev=1921243&view=rev
Log:
PIG-5460: Allow Tez to be launched from mapreduce job (knoguchi)

Modified:
    pig/trunk/CHANGES.txt
    
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/TezDagBuilder.java

Modified: pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1921243&r1=1921242&r2=1921243&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Thu Oct 10 20:48:29 2024
@@ -23,6 +23,8 @@ Trunk (unreleased changes)
 INCOMPATIBLE CHANGES
  
 IMPROVEMENTS
+PIG-5460: Allow Tez to be launched from mapreduce job (knoguchi)
+
 PIG-5454: Make ParallelGC the default Garbage Collection (knoguchi)
 
 PIG-5438: Update SparkCounter.Accumulator to AccumulatorV2 (knoguchi)

Modified: 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/TezDagBuilder.java
URL: 
http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/TezDagBuilder.java?rev=1921243&r1=1921242&r2=1921243&view=diff
==============================================================================
--- 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/TezDagBuilder.java
 (original)
+++ 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/TezDagBuilder.java
 Thu Oct 10 20:48:29 2024
@@ -242,6 +242,12 @@ public class TezDagBuilder extends TezOp
             }
         }
 
+        String tokenFile = System.getenv("HADOOP_TOKEN_FILE_LOCATION");
+        if(tokenFile != null && 
globalConf.get(MRConfiguration.JOB_CREDENTIALS_BINARY) == null) {
+            globalConf.set(MRConfiguration.JOB_CREDENTIALS_BINARY, tokenFile);
+            globalConf.set("tez.credentials.path", tokenFile);
+        }
+
         // Add credentials from binary token file and get tokens for namenodes
         // specified in mapreduce.job.hdfs-servers
         SecurityHelper.populateTokenCache(globalConf, dag.getCredentials());


Reply via email to