public ExceptionInChainedStubException(String taskName, Exception wrappedException) { super("Exception in chained task '" + taskName + "'", exceptionUnwrap(wrappedException)); this.taskName = taskName; this.exception = wrappedException; }
public static Exception exceptionUnwrap(Exception e) { if (e instanceof ExceptionInChainedStubException) { return exceptionUnwrap(((ExceptionInChainedStubException) e).getWrappedException()); } return e; } }
@Override public void collect(T record) { try { switch (strategy) { case SORTED_PARTIAL_REDUCE: collectSorted(record); break; case HASHED_PARTIAL_REDUCE: collectHashed(record); break; } } catch (Exception ex) { throw new ExceptionInChainedStubException(taskName, ex); } }
@Override public void close() { try { sortAndReduce(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
@Override public void close() { try { sortAndCombine(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
/** * @return the last output collector in the collector chain */ @SuppressWarnings("unchecked") protected Collector<OT> getLastOutputCollector() { int numChained = this.chainedTasks.size(); return (numChained == 0) ? output : (Collector<OT>) chainedTasks.get(numChained - 1).getOutputCollector(); }
@Override public void collect(T record) { try { switch (strategy) { case SORTED_PARTIAL_REDUCE: collectSorted(record); break; case HASHED_PARTIAL_REDUCE: collectHashed(record); break; } } catch (Exception ex) { throw new ExceptionInChainedStubException(taskName, ex); } }
public static Exception exceptionUnwrap(Exception e) { if (e instanceof ExceptionInChainedStubException) { return exceptionUnwrap(((ExceptionInChainedStubException) e).getWrappedException()); } return e; } }
@Override public void close() { try { sortAndReduce(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
@Override public void close() { try { sortAndCombine(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
public ExceptionInChainedStubException(String taskName, Exception wrappedException) { super("Exception in chained task '" + taskName + "'", exceptionUnwrap(wrappedException)); this.taskName = taskName; this.exception = wrappedException; }
/** * @return the last output collector in the collector chain */ @SuppressWarnings("unchecked") protected Collector<OT> getLastOutputCollector() { int numChained = this.chainedTasks.size(); return (numChained == 0) ? output : (Collector<OT>) chainedTasks.get(numChained - 1).getOutputCollector(); }
@Override public void collect(T record) { try { switch (strategy) { case SORTED_PARTIAL_REDUCE: collectSorted(record); break; case HASHED_PARTIAL_REDUCE: collectHashed(record); break; } } catch (Exception ex) { throw new ExceptionInChainedStubException(taskName, ex); } }
public static Exception exceptionUnwrap(Exception e) { if (e instanceof ExceptionInChainedStubException) { return exceptionUnwrap(((ExceptionInChainedStubException) e).getWrappedException()); } return e; } }
@Override public void close() { try { sortAndReduce(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
@Override public void close() { try { sortAndCombine(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
@Override public void collect(T record) { try { switch (strategy) { case SORTED_PARTIAL_REDUCE: collectSorted(record); break; case HASHED_PARTIAL_REDUCE: collectHashed(record); break; } } catch (Exception ex) { throw new ExceptionInChainedStubException(taskName, ex); } }
public static Exception exceptionUnwrap(Exception e) { if (e instanceof ExceptionInChainedStubException) { return exceptionUnwrap(((ExceptionInChainedStubException) e).getWrappedException()); } return e; } }
@Override public void close() { try { sortAndReduce(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
@Override public void close() { try { sortAndCombine(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }