incubator-crunch-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Dinu <>
Subject Exceptions throw in code
Date Tue, 07 Aug 2012 16:02:37 GMT

I am curious as to how exceptions get handled inside the Crunch runtime.  I am trying to do
some input/output error checking and throwing the appropriate exceptions.  The exceptions
in my code are getting throw but seem to be eaten by Crunch and instead of my Exception (throw
in a MapFn) bubbling up to the console, a Crunch runtime exception is throw instead: No files found
to materialize at: /tmp/crunch72870282/p3

Is there anyway to break out of a parallelDo or a way gracefully handle things such as bad
data formats encountered?  Or do I need to just catch my exceptions and give Crunch an appropriate

I tried throwing a RuntimeException in my run() method as well as the MapFn's map() but both
of those do not seem to stop Crunch from trying to materialize the collection and subsequently
throw a Crunch RuntimeException.  Any help is greatly appreciated.

View raw message