hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r525231 - in /lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop: ipc/Client.java mapred/Task.java mapred/TaskUmbilicalProtocol.java
Date Tue, 03 Apr 2007 18:19:41 GMT
Author: cutting
Date: Tue Apr  3 11:19:40 2007
New Revision: 525231

URL: http://svn.apache.org/viewvc?view=rev&rev=525231
Log:
HADOOP-1191.  Merge -r 524928:524929 from trunk to 0.12 branch.

Modified:
    lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/ipc/Client.java
    lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/mapred/Task.java
    lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/mapred/TaskUmbilicalProtocol.java

Modified: lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/ipc/Client.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/ipc/Client.java?view=diff&rev=525231&r1=525230&r2=525231
==============================================================================
--- lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/ipc/Client.java (original)
+++ lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/ipc/Client.java Tue Apr
 3 11:19:40 2007
@@ -454,16 +454,14 @@
    * <code>address</code>, returning the value.  Throws exceptions if there are
    * network problems or if the remote code threw an exception. */
   public Writable call(Writable param, InetSocketAddress address)
-    throws IOException {
+    throws InterruptedException, IOException {
     Connection connection = getConnection(address);
     Call call = new Call(param);
     synchronized (call) {
       connection.sendParam(call);                 // send the parameter
       long wait = timeout;
       do {
-        try {
-          call.wait(wait);                       // wait for the result
-        } catch (InterruptedException e) {}
+        call.wait(wait);                       // wait for the result
         wait = timeout - (System.currentTimeMillis() - call.lastActivity);
       } while (!call.done && wait > 0);
 

Modified: lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/mapred/Task.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/mapred/Task.java?view=diff&rev=525231&r1=525230&r2=525231
==============================================================================
--- lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/mapred/Task.java (original)
+++ lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/mapred/Task.java Tue Apr
 3 11:19:40 2007
@@ -205,6 +205,8 @@
         String status = taskProgress.toString();
         try {
           umbilical.progress(getTaskId(), progress, status, phase, counters);
+        } catch (InterruptedException ie) {
+          Thread.currentThread().interrupt();     // interrupt ourself
         } catch (IOException ie) {
           LOG.warn(StringUtils.stringifyException(ie));
         }
@@ -219,9 +221,13 @@
       try {
         if (needProgress) {
           // send a final status report
-          umbilical.progress(getTaskId(), taskProgress.get(), 
-                             taskProgress.toString(), phase, counters);
-          needProgress = false;
+          try {
+            umbilical.progress(getTaskId(), taskProgress.get(), 
+                               taskProgress.toString(), phase, counters);
+            needProgress = false;
+          } catch (InterruptedException ie) {
+            Thread.currentThread().interrupt();       // interrupt ourself
+          }
         }
         umbilical.done(getTaskId());
         return;

Modified: lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/mapred/TaskUmbilicalProtocol.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/mapred/TaskUmbilicalProtocol.java?view=diff&rev=525231&r1=525230&r2=525231
==============================================================================
--- lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/mapred/TaskUmbilicalProtocol.java
(original)
+++ lucene/hadoop/branches/branch-0.12/src/java/org/apache/hadoop/mapred/TaskUmbilicalProtocol.java
Tue Apr  3 11:19:40 2007
@@ -19,6 +19,7 @@
 package org.apache.hadoop.mapred;
 
 import java.io.IOException;
+import java.lang.InterruptedException;
 
 import org.apache.hadoop.ipc.VersionedProtocol;
 
@@ -42,7 +43,7 @@
    */
   void progress(String taskid, float progress, String state, 
                 TaskStatus.Phase phase, Counters counters)
-    throws IOException;
+    throws IOException, InterruptedException;
 
   /** Report error messages back to parent.  Calls should be sparing, since all
    *  such messages are held in the job tracker.



Mime
View raw message