tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject git commit: TEZ-630. When running an MR job, MR AM resource settings should be honored. (sseth)
Date Wed, 20 Nov 2013 18:32:19 GMT
Updated Branches:
  refs/heads/master 1885b9ed2 -> aa3e937fe


TEZ-630. When running an MR job, MR AM resource settings should be
honored. (sseth)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tez/commit/aa3e937f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tez/tree/aa3e937f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tez/diff/aa3e937f

Branch: refs/heads/master
Commit: aa3e937fe98059d74036bacf9d2f17ae3ea04236
Parents: 1885b9e
Author: Siddharth Seth <sseth@apache.org>
Authored: Wed Nov 20 10:32:03 2013 -0800
Committer: Siddharth Seth <sseth@apache.org>
Committed: Wed Nov 20 10:32:03 2013 -0800

----------------------------------------------------------------------
 .../java/org/apache/tez/mapreduce/client/YARNRunner.java    | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/aa3e937f/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/client/YARNRunner.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/client/YARNRunner.java b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/client/YARNRunner.java
index 1d09055..371c551 100644
--- a/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/client/YARNRunner.java
+++ b/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/client/YARNRunner.java
@@ -583,9 +583,18 @@ public class YARNRunner implements ClientProtocol {
     try {
       dagAMConf.set(TezConfiguration.TEZ_AM_STAGING_DIR,
           jobSubmitDir);
+      
+      // Set Tez parameters based on MR parameters.
       String queueName = jobConf.get(JobContext.QUEUE_NAME,
           YarnConfiguration.DEFAULT_QUEUE_NAME);
       dagAMConf.set(TezConfiguration.TEZ_QUEUE_NAME, queueName);
+      
+      int amMemMB = jobConf.getInt(MRJobConfig.MR_AM_VMEM_MB, MRJobConfig.DEFAULT_MR_AM_VMEM_MB);
+      int amCores = jobConf.getInt(MRJobConfig.MR_AM_CPU_VCORES, MRJobConfig.DEFAULT_MR_AM_CPU_VCORES);
+      dagAMConf.setInt(TezConfiguration.TEZ_AM_RESOURCE_MEMORY_MB, amMemMB);
+      dagAMConf.setInt(TezConfiguration.TEZ_AM_RESOURCE_CPU_VCORES, amCores);
+
+      
       AMConfiguration amConfig = new AMConfiguration(
           environment,
           jobLocalResources, dagAMConf, ts);


Mime
View raw message