在Map或reduce中使用multipleOutput来进行异常存储:123456789try{ ... ... context.write(newKey,newValue);}catch(Exception e){ multipleOutput.write(new Text( null == e.getMessage()? ("error:"): e.getMessage),new Text(value.toString()),"_error/part"); e.printStackTrace();}
MapReduce程序异常捕获存储
------------- The endThanks for reading-------------