Updated Branches:
  refs/heads/master 5578d5e8b -> a8828d190

CRUNCH-201: Handle checked exception in TrevniKeyTarget. 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/a8828d19
Tree: http://git-wip-us.apache.org/repos/asf/crunch/tree/a8828d19
Diff: http://git-wip-us.apache.org/repos/asf/crunch/diff/a8828d19

Branch: refs/heads/master
Commit: a8828d19089512cf16fec1a4279f2b9db3638fe8
Parents: 5578d5e
Author: Josh Wills <[email protected]>
Authored: Wed May 1 18:27:05 2013 -0700
Committer: Josh Wills <[email protected]>
Committed: Wed May 1 18:27:05 2013 -0700

----------------------------------------------------------------------
 .../crunch/io/avro/trevni/TrevniKeyTarget.java     |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/crunch/blob/a8828d19/crunch-core/src/main/java/org/apache/crunch/io/avro/trevni/TrevniKeyTarget.java
----------------------------------------------------------------------
diff --git 
a/crunch-core/src/main/java/org/apache/crunch/io/avro/trevni/TrevniKeyTarget.java
 
b/crunch-core/src/main/java/org/apache/crunch/io/avro/trevni/TrevniKeyTarget.java
index 555aaf4..44d259b 100644
--- 
a/crunch-core/src/main/java/org/apache/crunch/io/avro/trevni/TrevniKeyTarget.java
+++ 
b/crunch-core/src/main/java/org/apache/crunch/io/avro/trevni/TrevniKeyTarget.java
@@ -112,7 +112,11 @@ public class TrevniKeyTarget extends FileTargetImpl {
 
       //Set value which will be ignored but should get past the 
FileOutputFormat.checkOutputSpecs(..)
       //which requires the "mapred.output.dir" value to be set.
-      FileOutputFormat.setOutputPath(job, outputPath);
+      try{
+        FileOutputFormat.setOutputPath(job, outputPath);
+      } catch(Exception ioe){
+          throw new RuntimeException(ioe);
+      }
 
       CrunchOutputs.addNamedOutput(job, name,
           bundle,

Reply via email to