How to handle exception in MapReduceFlow of Cascading

606 Views Asked by At

I have written cascade flow which executes MapReduce flow containg both Mapper and Reducer. In reduce() method, it throwsIllegalArgumentException. How to handle this exception ? I have written catch block in class where I created JobConf for the same and added it into MapReduceFlow constructor.

1

There are 1 best solutions below

7
On

In your Cascading job, you can use failure traps to do this. From the example on the link, it's something like:

flowDef.addTrap( "assertions", trap );