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