@Override public void close() { try { sortAndReduce(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
@Override public void close() { try { sortAndReduce(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
@Override public void close() { try { sortAndReduce(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
@Override public void close() { try { sortAndReduce(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
@Override public void collect(IN record) { numRecordsIn.inc(); // try writing to the sorter first try { if (this.sorter.write(record)) { return; } // do the actual sorting sortAndReduce(); this.sorter.reset(); if (!this.sorter.write(record)) { throw new IOException("Cannot write record to fresh sort buffer. Record too large."); } } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } }
@Override public void collect(IN record) { numRecordsIn.inc(); // try writing to the sorter first try { if (this.sorter.write(record)) { return; } // do the actual sorting sortAndReduce(); this.sorter.reset(); if (!this.sorter.write(record)) { throw new IOException("Cannot write record to fresh sort buffer. Record too large."); } } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } }
@Override public void collect(IN record) { numRecordsIn.inc(); // try writing to the sorter first try { if (this.sorter.write(record)) { return; } // do the actual sorting sortAndReduce(); this.sorter.reset(); if (!this.sorter.write(record)) { throw new IOException("Cannot write record to fresh sort buffer. Record too large."); } } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } }
@Override public void collect(IN record) { numRecordsIn.inc(); // try writing to the sorter first try { if (this.sorter.write(record)) { return; } // do the actual sorting sortAndReduce(); this.sorter.reset(); if (!this.sorter.write(record)) { throw new IOException("Cannot write record to fresh sort buffer. Record too large."); } } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } }