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