hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1494476 - /hadoop/common/trunk/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:06:54 GMT
Author: acmurthy
Date: Wed Jun 19 07:06:54 2013
New Revision: 1494476

URL: http://svn.apache.org/r1494476
Log:
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/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java

Modified: hadoop/common/trunk/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/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java?rev=1494476&r1=1494475&r2=1494476&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java
Wed Jun 19 07:06:54 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