@Override public void setup(AbstractInvokable parent) { this.parent = parent; @SuppressWarnings("unchecked") final GroupCombineFunction<IN, OUT> combiner = BatchTask.instantiateUserCode(this.config, userCodeClassLoader, GroupCombineFunction.class); this.combiner = combiner; FunctionUtils.setFunctionRuntimeContext(combiner, getUdfRuntimeContext()); }
@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 setup(AbstractInvokable parent) { this.parent = parent; @SuppressWarnings("unchecked") final GroupCombineFunction<IN, OUT> combiner = BatchTask.instantiateUserCode(this.config, userCodeClassLoader, GroupCombineFunction.class); this.combiner = combiner; FunctionUtils.setFunctionRuntimeContext(combiner, getUdfRuntimeContext()); }
@Override public void close() { try { sortAndCombine(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
@Override public void setup(AbstractInvokable parent) { this.parent = parent; @SuppressWarnings("unchecked") final GroupCombineFunction<IN, OUT> combiner = BatchTask.instantiateUserCode(this.config, userCodeClassLoader, GroupCombineFunction.class); this.combiner = combiner; FunctionUtils.setFunctionRuntimeContext(combiner, getUdfRuntimeContext()); }
@Override public void close() { try { sortAndCombine(); } catch (Exception e) { throw new ExceptionInChainedStubException(this.taskName, e); } this.outputCollector.close(); }
@Override public void setup(AbstractInvokable parent) { this.parent = parent; @SuppressWarnings("unchecked") final GroupCombineFunction<IN, OUT> combiner = BatchTask.instantiateUserCode(this.config, userCodeClassLoader, GroupCombineFunction.class); this.combiner = combiner; FunctionUtils.setFunctionRuntimeContext(combiner, getUdfRuntimeContext()); }
@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); } }