@ProcessElement public void processElement(ProcessContext c) { c.output(c.element().getValue()); } }
@Override public void flatMap( WindowedValue<ValueWithRecordId<T>> value, Collector<WindowedValue<T>> collector) throws Exception { collector.collect(value.withValue(value.getValue().getValue())); } }
@Override public void flatMap( WindowedValue<ValueWithRecordId<T>> value, Collector<WindowedValue<T>> collector) throws Exception { collector.collect(value.withValue(value.getValue().getValue())); } }
@ProcessElement public void processElement(ProcessContext c) { c.output(c.element().getValue().getValue()); } }));
@Override public void flatMap(WindowedValue<ValueWithRecordId<T>> value, Collector<WindowedValue<T>> collector) throws Exception { collector.collect(value.withValue(value.getValue().getValue())); }
@Override public void collect(StreamRecord<WindowedValue<ValueWithRecordId<T>>> record) { emittedElements.add(record.getValue().getValue().getValue()); count++; if (count >= elementsToConsumeLimit) { throw new SuccessException(); } }
@Override public void collect(StreamRecord<WindowedValue<ValueWithRecordId<T>>> record) { emittedElements.add(record.getValue().getValue().getValue()); count++; if (count >= elementsToConsumeLimit) { throw new SuccessException(); } }
@Override public void processElement( StreamRecord<WindowedValue<ValueWithRecordId<T>>> streamRecord) throws Exception { ByteBuffer currentKey = keyedStateBackend.getCurrentKey(); int groupIndex = keyedStateBackend.getCurrentKeyGroupIndex(); if (shouldOutput(groupIndex, currentKey)) { WindowedValue<ValueWithRecordId<T>> value = streamRecord.getValue(); output.collect(streamRecord.replace(value.withValue(value.getValue().getValue()))); } }
@Override public void processElement(StreamRecord<WindowedValue<ValueWithRecordId<T>>> streamRecord) throws Exception { ValueState<Long> dedupingState = getPartitionedState(dedupingStateDescriptor); Long lastSeenTimestamp = dedupingState.value(); if (lastSeenTimestamp == null) { // we have never seen this, emit WindowedValue<ValueWithRecordId<T>> value = streamRecord.getValue(); output.collect(streamRecord.replace(value.withValue(value.getValue().getValue()))); } long currentProcessingTime = timerService.currentProcessingTime(); dedupingState.update(currentProcessingTime); timerService.registerProcessingTimeTimer( VoidNamespace.INSTANCE, currentProcessingTime + MAX_RETENTION_SINCE_ACCESS); }
@Override public void processElement(StreamRecord<WindowedValue<ValueWithRecordId<T>>> streamRecord) throws Exception { ValueState<Long> dedupingState = getPartitionedState(dedupingStateDescriptor); Long lastSeenTimestamp = dedupingState.value(); if (lastSeenTimestamp == null) { // we have never seen this, emit WindowedValue<ValueWithRecordId<T>> value = streamRecord.getValue(); output.collect(streamRecord.replace(value.withValue(value.getValue().getValue()))); } long currentProcessingTime = timerService.currentProcessingTime(); dedupingState.update(currentProcessingTime); timerService.registerProcessingTimeTimer( VoidNamespace.INSTANCE, currentProcessingTime + MAX_RETENTION_SINCE_ACCESS); }