private void collectSorted(T record) throws Exception { // try writing to the sorter first if (!sorter.write(record)) { // it didn't succeed; sorter is full // do the actual sorting, combining, and data writing sortAndCombine(); sorter.reset(); // write the value again if (!sorter.write(record)) { throw new IOException("Cannot write record to fresh sort buffer. Record too large."); } } }
private void collectSorted(T record) throws Exception { // try writing to the sorter first if (!sorter.write(record)) { // it didn't succeed; sorter is full // do the actual sorting, combining, and data writing sortAndCombine(); sorter.reset(); // write the value again if (!sorter.write(record)) { throw new IOException("Cannot write record to fresh sort buffer. Record too large."); } } }
private void collectSorted(T record) throws Exception { // try writing to the sorter first if (!sorter.write(record)) { // it didn't succeed; sorter is full // do the actual sorting, combining, and data writing sortAndCombine(); sorter.reset(); // write the value again if (!sorter.write(record)) { throw new IOException("Cannot write record to fresh sort buffer. Record too large."); } } }
private void collectSorted(T record) throws Exception { // try writing to the sorter first if (!sorter.write(record)) { // it didn't succeed; sorter is full // do the actual sorting, combining, and data writing sortAndCombine(); sorter.reset(); // write the value again if (!sorter.write(record)) { throw new IOException("Cannot write record to fresh sort buffer. Record too large."); } } }
@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); } }
private void sortAndCombineAndRetryWrite(IN value) throws Exception { sortAndCombine(); this.sorter.reset(); // write the value again if (!this.sorter.write(value)) { ++oversizedRecordCount; LOG.debug("Cannot write record to fresh sort buffer, record is too large. " + "Oversized record count: {}", oversizedRecordCount); // simply forward the record. We need to pass it through the combine function to convert it Iterable<IN> input = Collections.singleton(value); this.combiner.combine(input, this.output); this.sorter.reset(); } }
private void sortAndCombineAndRetryWrite(IN value) throws Exception { sortAndCombine(); this.sorter.reset(); // write the value again if (!this.sorter.write(value)) { ++oversizedRecordCount; LOG.debug("Cannot write record to fresh sort buffer, record is too large. " + "Oversized record count: {}", oversizedRecordCount); // simply forward the record. We need to pass it through the combine function to convert it Iterable<IN> input = Collections.singleton(value); this.combiner.combine(input, this.output); this.sorter.reset(); } }
private void sortAndCombineAndRetryWrite(IN value) throws Exception { sortAndCombine(); this.sorter.reset(); // write the value again if (!this.sorter.write(value)) { ++oversizedRecordCount; LOG.debug("Cannot write record to fresh sort buffer, record is too large. " + "Oversized record count: {}", oversizedRecordCount); // simply forward the record. We need to pass it through the combine function to convert it Iterable<IN> input = Collections.singleton(value); this.combiner.combine(input, this.output); this.sorter.reset(); } }
private void sortAndCombineAndRetryWrite(IN value) throws Exception { sortAndCombine(); this.sorter.reset(); // write the value again if (!this.sorter.write(value)) { ++oversizedRecordCount; LOG.debug("Cannot write record to fresh sort buffer, record is too large. " + "Oversized record count: {}", oversizedRecordCount); // simply forward the record. We need to pass it through the combine function to convert it Iterable<IN> input = Collections.singleton(value); this.combiner.combine(input, this.output); this.sorter.reset(); } }
@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); } }