hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1171924 - in /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client: hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/ hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hado...
Date Sat, 17 Sep 2011 07:16:47 GMT
Author: acmurthy
Date: Sat Sep 17 07:16:47 2011
New Revision: 1171924

URL: http://svn.apache.org/viewvc?rev=1171924&view=rev
Log:
Fixed broken merge for MAPREDUCE-2987

Modified:
    hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/JobContextImpl.java
    hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java

Modified: hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/JobContextImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/JobContextImpl.java?rev=1171924&r1=1171923&r2=1171924&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/JobContextImpl.java
(original)
+++ hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/JobContextImpl.java
Sat Sep 17 07:16:47 2011
@@ -27,7 +27,6 @@ import org.apache.hadoop.conf.Configurat
 import org.apache.hadoop.conf.Configuration.IntegerRanges;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.RawComparator;
-import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapreduce.InputFormat;
 import org.apache.hadoop.mapreduce.Job;
 import org.apache.hadoop.mapreduce.JobContext;
@@ -61,11 +60,7 @@ public class JobContextImpl implements J
   protected final Credentials credentials;
   
   public JobContextImpl(Configuration conf, JobID jobId) {
-    if (conf instanceof JobConf) {
-      this.conf = (JobConf)conf;
-    } else {
-      this.conf = new org.apache.hadoop.mapred.JobConf(conf);
-    }
+    this.conf = new org.apache.hadoop.mapred.JobConf(conf);
     this.jobId = jobId;
     this.credentials = this.conf.getCredentials();
     try {

Modified: hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java?rev=1171924&r1=1171923&r2=1171924&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java
(original)
+++ hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java
Sat Sep 17 07:16:47 2011
@@ -223,10 +223,23 @@ public class YARNRunner implements Clien
       throw new YarnException(e);
     }
 
+    // XXX Remove
+    Path submitJobDir = new Path(jobSubmitDir);
+    FileContext defaultFS = FileContext.getFileContext(conf);
+    Path submitJobFile =
+      defaultFS.makeQualified(JobSubmissionFiles.getJobConfPath(submitJobDir));
+    FSDataInputStream in = defaultFS.open(submitJobFile);
+    conf.addResource(in);
+    // ---
+
     // Construct necessary information to start the MR AM
     ApplicationSubmissionContext appContext = 
       createApplicationSubmissionContext(conf, jobSubmitDir, ts);
     
+    // XXX Remove
+    in.close();
+    // ---
+    
     // Submit to ResourceManager
     ApplicationId applicationId = resMgrDelegate.submitApplication(appContext);
     



Mime
View raw message