@Override public void open() throws Exception { super.open(); collector = new TimestampedCollector<>(output); }
timestampedCollector.setAbsoluteTimestamp(streamRecordResult.getTimestamp()); } else { timestampedCollector.eraseTimestamp(); timestampedCollector.collect(result);
@Override public void processElement2(StreamRecord<IN2> element) throws Exception { collector.setTimestamp(element); userFunction.flatMap2(element.getValue(), collector); }
private void collect(T1 left, T2 right, long leftTimestamp, long rightTimestamp) throws Exception { final long resultTimestamp = Math.max(leftTimestamp, rightTimestamp); collector.setAbsoluteTimestamp(resultTimestamp); context.updateTimestamps(leftTimestamp, rightTimestamp, resultTimestamp); userFunction.processElement(left, right, context, collector); }
collector = new TimestampedCollector<>(output); collector.eraseTimestamp();
@Override public void onProcessingTime(InternalTimer<K, VoidNamespace> timer) throws Exception { collector.eraseTimestamp(); invokeUserFunction(TimeDomain.PROCESSING_TIME, timer); }
public void collectResult(BaseRow row, long times) { times = times < 0 ? -times : times; for (long i = 0; i < times; ++i) { collector.collect(row); } } }
private void setTimestamp(long timestamp) { if (!isProcessingTime) { collector.setAbsoluteTimestamp(timestamp); } context.setTimestamp(timestamp); }
@Override public void onProcessingTime(InternalTimer<K, VoidNamespace> timer) throws Exception { collector.eraseTimestamp(); invokeUserFunction(TimeDomain.PROCESSING_TIME, timer); }
public void collectResult(BaseRow row) { collector.collect(row); }
@Override public void open() throws Exception { super.open(); collector = new TimestampedCollector<OUT>(output); }
timestampedCollector.setAbsoluteTimestamp(streamRecordResult.getTimestamp()); } else { timestampedCollector.eraseTimestamp(); timestampedCollector.collect(result);
@Override public void onEventTime(InternalTimer<K, VoidNamespace> timer) throws Exception { collector.setAbsoluteTimestamp(timer.getTimestamp()); invokeUserFunction(TimeDomain.EVENT_TIME, timer); }
@Override public void processElement1(StreamRecord<IN1> element) throws Exception { collector.setTimestamp(element); context.element = element; userFunction.processElement1(element.getValue(), context, collector); context.element = null; }
@Override public void onProcessingTime(InternalTimer<KS, VoidNamespace> timer) throws Exception { collector.eraseTimestamp(); onTimerContext.timeDomain = TimeDomain.PROCESSING_TIME; onTimerContext.timer = timer; userFunction.onTimer(timer.getTimestamp(), onTimerContext, collector); onTimerContext.timeDomain = null; onTimerContext.timer = null; }
private void collectResult(BaseRow row) { collector.collect(row); } }
@Override public void open() throws Exception { super.open(); collector = new TimestampedCollector<>(output); context = new ContextImpl(userFunction); internalTimerService = getInternalTimerService(CLEANUP_TIMER_NAME, StringSerializer.INSTANCE, this); }
timestampedCollector.setAbsoluteTimestamp(streamRecordResult.getTimestamp()); } else { timestampedCollector.eraseTimestamp(); timestampedCollector.collect(result);
/** * Emits the contents of the given window using the {@link InternalWindowFunction}. */ @SuppressWarnings("unchecked") private void emitWindowContents(W window, ACC contents) throws Exception { timestampedCollector.setAbsoluteTimestamp(window.maxTimestamp()); processContext.window = window; userFunction.process(triggerContext.key, window, processContext, contents, timestampedCollector); }
@Override public void processElement(StreamRecord<IN> element) throws Exception { collector.setTimestamp(element); context.element = element; userFunction.processElement(element.getValue(), context, collector); context.element = null; }