hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1494477 - /hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java
Date Wed, 19 Jun 2013 07:07:45 GMT
Author: acmurthy
Date: Wed Jun 19 07:07:44 2013
New Revision: 1494477

URL: http://svn.apache.org/r1494477
Log:
Merge -c 1494476 from trunk to branch-2 to fix YARN-553. Replaced YarnClient.getNewApplication
with YarnClient.createApplication which provides a directly usable ApplicationSubmissionContext
to simplify the api. Contributed by Karthik Kambatla.

Modified:
    hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java

Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java?rev=1494477&r1=1494476&r2=1494477&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java
Wed Jun 19 07:07:44 2013
@@ -41,7 +41,6 @@ import org.apache.hadoop.mapreduce.v2.ut
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.token.Token;
 import org.apache.hadoop.yarn.api.ApplicationClientProtocol;
-import org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
@@ -49,6 +48,7 @@ import org.apache.hadoop.yarn.api.record
 import org.apache.hadoop.yarn.api.records.QueueUserACLInfo;
 import org.apache.hadoop.yarn.api.records.YarnClusterMetrics;
 import org.apache.hadoop.yarn.client.api.YarnClient;
+import org.apache.hadoop.yarn.client.api.YarnClientApplication;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.exceptions.YarnException;
 import org.apache.hadoop.yarn.util.ConverterUtils;
@@ -59,7 +59,7 @@ public class ResourceMgrDelegate extends
   private static final Log LOG = LogFactory.getLog(ResourceMgrDelegate.class);
       
   private YarnConfiguration conf;
-  private GetNewApplicationResponse application;
+  private ApplicationSubmissionContext application;
   private ApplicationId applicationId;
   @Private
   @VisibleForTesting
@@ -178,7 +178,7 @@ public class ResourceMgrDelegate extends
 
   public JobID getNewJobID() throws IOException, InterruptedException {
     try {
-      this.application = client.getNewApplication();
+      this.application = client.createApplication().getApplicationSubmissionContext();
       this.applicationId = this.application.getApplicationId();
       return TypeConverter.fromYarn(applicationId);
     } catch (YarnException e) {
@@ -272,9 +272,9 @@ public class ResourceMgrDelegate extends
   }
 
   @Override
-  public GetNewApplicationResponse getNewApplication() throws YarnException,
-      IOException {
-    return client.getNewApplication();
+  public YarnClientApplication createApplication() throws
+      YarnException, IOException {
+    return client.createApplication();
   }
 
   @Override



Mime
View raw message