hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1166975 - in /hadoop/common/trunk/hadoop-mapreduce-project: CHANGES.txt hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ClientServiceDelegate.java
Date Fri, 09 Sep 2011 03:01:08 GMT
Author: acmurthy
Date: Fri Sep  9 03:01:08 2011
New Revision: 1166975

URL: http://svn.apache.org/viewvc?rev=1166975&view=rev
Log:
MAPREDUCE-2963. Fix hang in TestMRJobs. Contributed by Siddharth Seth.

Modified:
    hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ClientServiceDelegate.java

Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt?rev=1166975&r1=1166974&r2=1166975&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Fri Sep  9 03:01:08 2011
@@ -1251,6 +1251,8 @@ Release 0.23.0 - Unreleased
    incorrectly assume application was gone by making submission synchronous
    for RMAppManager. (Thomas Graves via acmurthy) 
 
+   MAPREDUCE-2963. Fix hang in TestMRJobs. (Siddharth Seth via acmurthy) 
+
 Release 0.22.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ClientServiceDelegate.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/ClientServiceDelegate.java?rev=1166975&r1=1166974&r2=1166975&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ClientServiceDelegate.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ClientServiceDelegate.java
Fri Sep  9 03:01:08 2011
@@ -19,6 +19,7 @@
 package org.apache.hadoop.mapred;
 
 import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.security.PrivilegedAction;
 import java.util.HashMap;
@@ -197,7 +198,7 @@ class ClientServiceDelegate {
     //succeeded.
     if (application.getState() == ApplicationState.SUCCEEDED) {
       LOG.info("Application state is completed. " +
-          "Redirecting to job history server " + serviceAddr);
+          "Redirecting to job history server");
       realProxy = historyServerProxy;
     }
     return realProxy;
@@ -238,8 +239,14 @@ class ClientServiceDelegate {
         LOG.warn("Exception thrown by remote end.");
         LOG.warn(RPCUtil.toString(yre));
         throw yre;
+      } catch (InvocationTargetException e) {
+        //TODO Finite # of errors before giving up?
+        LOG.info("Failed to contact AM/History for job " + jobId
+            + "  Will retry..", e.getTargetException());
+        forceRefresh = true;
       } catch (Exception e) {
-        LOG.info("Failed to contact AM for job " + jobId + "  Will retry..");
+        LOG.info("Failed to contact AM/History for job " + jobId
+            + "  Will retry..", e);
         LOG.debug("Failing to contact application master", e);
         forceRefresh = true;
       }
@@ -306,9 +313,13 @@ class ClientServiceDelegate {
     return TypeConverter.fromYarn(report, jobFile, "");
   }
 
-  org.apache.hadoop.mapreduce.TaskReport[] getTaskReports(JobID jobID, TaskType taskType)
+  org.apache.hadoop.mapreduce.TaskReport[] getTaskReports(JobID oldJobID, TaskType taskType)
        throws YarnRemoteException, YarnRemoteException {
+    org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = 
+      TypeConverter.toYarn(oldJobID);
     GetTaskReportsRequest request = recordFactory.newRecordInstance(GetTaskReportsRequest.class);
+    request.setJobId(jobId);
+    request.setTaskType(TypeConverter.toYarn(taskType));
     
     List<org.apache.hadoop.mapreduce.v2.api.records.TaskReport> taskReports = 
       ((GetTaskReportsResponse) invoke("getTaskReports", GetTaskReportsRequest.class, 



Mime
View raw message