Updated Branches:
  refs/heads/master 4983a0ca8 -> 21cf6d37f

CRUNCH-233: Handled InterruptedException thrown in hadoop2. Contributed by 
Micah Whitacre.


Project: http://git-wip-us.apache.org/repos/asf/crunch/repo
Commit: http://git-wip-us.apache.org/repos/asf/crunch/commit/21cf6d37
Tree: http://git-wip-us.apache.org/repos/asf/crunch/tree/21cf6d37
Diff: http://git-wip-us.apache.org/repos/asf/crunch/diff/21cf6d37

Branch: refs/heads/master
Commit: 21cf6d37f74d0813667c9e129c959cdd1556f0d1
Parents: 4983a0c
Author: Josh Wills <[email protected]>
Authored: Wed Jul 3 09:03:57 2013 -0700
Committer: Josh Wills <[email protected]>
Committed: Wed Jul 3 09:03:57 2013 -0700

----------------------------------------------------------------------
 .../apache/crunch/impl/mr/exec/CrunchJobHooks.java  | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/crunch/blob/21cf6d37/crunch-core/src/main/java/org/apache/crunch/impl/mr/exec/CrunchJobHooks.java
----------------------------------------------------------------------
diff --git 
a/crunch-core/src/main/java/org/apache/crunch/impl/mr/exec/CrunchJobHooks.java 
b/crunch-core/src/main/java/org/apache/crunch/impl/mr/exec/CrunchJobHooks.java
index dee80f1..07d1cea 100644
--- 
a/crunch-core/src/main/java/org/apache/crunch/impl/mr/exec/CrunchJobHooks.java
+++ 
b/crunch-core/src/main/java/org/apache/crunch/impl/mr/exec/CrunchJobHooks.java
@@ -79,13 +79,17 @@ public final class CrunchJobHooks {
     }
 
     private synchronized void handleMultiPaths() throws IOException {
-      if (job.isSuccessful() && !multiPaths.isEmpty()) {
-        // Need to handle moving the data from the output directory of the
-        // job to the output locations specified in the paths.
-        FileSystem srcFs = workingPath.getFileSystem(job.getConfiguration());
-        for (Map.Entry<Integer, PathTarget> entry : multiPaths.entrySet()) {
-          entry.getValue().handleOutputs(job.getConfiguration(), workingPath, 
entry.getKey(), mapOnlyJob);
+      try {
+        if (job.isSuccessful() && !multiPaths.isEmpty()) {
+          // Need to handle moving the data from the output directory of the
+          // job to the output locations specified in the paths.
+          FileSystem srcFs = workingPath.getFileSystem(job.getConfiguration());
+          for (Map.Entry<Integer, PathTarget> entry : multiPaths.entrySet()) {
+            entry.getValue().handleOutputs(job.getConfiguration(), 
workingPath, entry.getKey(), mapOnlyJob);
+          }
         }
+      } catch(InterruptedException ie) {
+        throw new IOException(ie);
       }
     }
   }

Reply via email to