You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by ma...@apache.org on 2012/11/30 22:56:02 UTC

svn commit: r1415867 - in /giraph/trunk: CHANGELOG giraph/src/main/java/org/apache/giraph/utils/ProgressableUtils.java

Author: maja
Date: Fri Nov 30 21:56:01 2012
New Revision: 1415867

URL: http://svn.apache.org/viewvc?rev=1415867&view=rev
Log:
GIRAPH-440: ProgressableUtils - TimeoutException from future.get shouldn't be rethrown

Modified:
    giraph/trunk/CHANGELOG
    giraph/trunk/giraph/src/main/java/org/apache/giraph/utils/ProgressableUtils.java

Modified: giraph/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/giraph/trunk/CHANGELOG?rev=1415867&r1=1415866&r2=1415867&view=diff
==============================================================================
--- giraph/trunk/CHANGELOG (original)
+++ giraph/trunk/CHANGELOG Fri Nov 30 21:56:01 2012
@@ -1,6 +1,9 @@
 Giraph Change Log
 
 Release 0.2.0 - unreleased
+  GIRAPH-440: ProgressableUtils - TimeoutException from future.get shouldn't 
+  be rethrown (majakabiljo)
+
   GIRAPH-438: When checkpointing is disable, fast fail (aching)
 
   GIRAPH-437: Missing progress calls when stopping Netty server (majakabiljo)

Modified: giraph/trunk/giraph/src/main/java/org/apache/giraph/utils/ProgressableUtils.java
URL: http://svn.apache.org/viewvc/giraph/trunk/giraph/src/main/java/org/apache/giraph/utils/ProgressableUtils.java?rev=1415867&r1=1415866&r2=1415867&view=diff
==============================================================================
--- giraph/trunk/giraph/src/main/java/org/apache/giraph/utils/ProgressableUtils.java (original)
+++ giraph/trunk/giraph/src/main/java/org/apache/giraph/utils/ProgressableUtils.java Fri Nov 30 21:56:01 2012
@@ -131,9 +131,6 @@ public class ProgressableUtils {
       } catch (ExecutionException e) {
         throw new IllegalStateException("waitFor: " +
             "ExecutionException occurred while waiting for " + waitable, e);
-      } catch (TimeoutException e) {
-        throw new IllegalStateException("waitFor: " +
-            "TimeoutException occurred while waiting for " + waitable, e);
       }
       if (LOG.isInfoEnabled()) {
         LOG.info("waitFor: Waiting for " + waitable);
@@ -157,8 +154,7 @@ public class ProgressableUtils {
      *
      * @param msecs Number of milliseconds to wait.
      */
-    void waitFor(int msecs) throws InterruptedException, ExecutionException,
-        TimeoutException;
+    void waitFor(int msecs) throws InterruptedException, ExecutionException;
 
     /**
      * Check if waitable is finished.
@@ -218,8 +214,14 @@ public class ProgressableUtils {
 
     @Override
     public void waitFor(int msecs) throws InterruptedException,
-        ExecutionException, TimeoutException {
-      future.get(msecs, TimeUnit.MILLISECONDS);
+        ExecutionException {
+      try {
+        future.get(msecs, TimeUnit.MILLISECONDS);
+      } catch (TimeoutException e) {
+        if (LOG.isInfoEnabled()) {
+          LOG.info("waitFor: Future result not ready yet " + future);
+        }
+      }
     }
 
     @Override