Java Code Examples for org.apache.flink.streaming.api.operators.Output#collect()
The following examples show how to use
org.apache.flink.streaming.api.operators.Output#collect() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CopyingDirectedOutput.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Override public void collect(StreamRecord<OUT> record) { Set<Output<StreamRecord<OUT>>> selectedOutputs = selectOutputs(record); if (selectedOutputs.isEmpty()) { return; } Iterator<Output<StreamRecord<OUT>>> it = selectedOutputs.iterator(); while (true) { Output<StreamRecord<OUT>> out = it.next(); if (it.hasNext()) { // we don't have the last output // perform a shallow copy StreamRecord<OUT> shallowCopy = record.copy(record.getValue()); out.collect(shallowCopy); } else { // this is the last output out.collect(record); break; } } }
Example 2
Source File: CopyingDirectedOutput.java From flink with Apache License 2.0 | 6 votes |
@Override public void collect(StreamRecord<OUT> record) { Set<Output<StreamRecord<OUT>>> selectedOutputs = selectOutputs(record); if (selectedOutputs.isEmpty()) { return; } Iterator<Output<StreamRecord<OUT>>> it = selectedOutputs.iterator(); while (true) { Output<StreamRecord<OUT>> out = it.next(); if (it.hasNext()) { // we don't have the last output // perform a shallow copy StreamRecord<OUT> shallowCopy = record.copy(record.getValue()); out.collect(shallowCopy); } else { // this is the last output out.collect(record); break; } } }
Example 3
Source File: CopyingDirectedOutput.java From flink with Apache License 2.0 | 6 votes |
@Override public void collect(StreamRecord<OUT> record) { Set<Output<StreamRecord<OUT>>> selectedOutputs = selectOutputs(record); if (selectedOutputs.isEmpty()) { return; } Iterator<Output<StreamRecord<OUT>>> it = selectedOutputs.iterator(); while (true) { Output<StreamRecord<OUT>> out = it.next(); if (it.hasNext()) { // we don't have the last output // perform a shallow copy StreamRecord<OUT> shallowCopy = record.copy(record.getValue()); out.collect(shallowCopy); } else { // this is the last output out.collect(record); break; } } }
Example 4
Source File: OperatorChain.java From flink with Apache License 2.0 | 5 votes |
@Override public <X> void collect(OutputTag<X> outputTag, StreamRecord<X> record) { for (int i = 0; i < outputs.length - 1; i++) { Output<StreamRecord<T>> output = outputs[i]; StreamRecord<X> shallowCopy = record.copy(record.getValue()); output.collect(outputTag, shallowCopy); } if (outputs.length > 0) { // don't copy for the last output outputs[outputs.length - 1].collect(outputTag, record); } }
Example 5
Source File: DirectedOutput.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public void collect(StreamRecord<OUT> record) { Set<Output<StreamRecord<OUT>>> selectedOutputs = selectOutputs(record); for (Output<StreamRecord<OUT>> out : selectedOutputs) { out.collect(record); } }
Example 6
Source File: OperatorChain.java From flink with Apache License 2.0 | 5 votes |
@Override public void collect(StreamRecord<T> record) { for (int i = 0; i < outputs.length - 1; i++) { Output<StreamRecord<T>> output = outputs[i]; StreamRecord<T> shallowCopy = record.copy(record.getValue()); output.collect(shallowCopy); } if (outputs.length > 0) { // don't copy for the last output outputs[outputs.length - 1].collect(record); } }
Example 7
Source File: DirectedOutput.java From flink with Apache License 2.0 | 5 votes |
@Override public void collect(StreamRecord<OUT> record) { Set<Output<StreamRecord<OUT>>> selectedOutputs = selectOutputs(record); for (Output<StreamRecord<OUT>> out : selectedOutputs) { out.collect(record); } }
Example 8
Source File: OperatorChain.java From flink with Apache License 2.0 | 5 votes |
@Override public <X> void collect(OutputTag<X> outputTag, StreamRecord<X> record) { for (int i = 0; i < outputs.length - 1; i++) { Output<StreamRecord<T>> output = outputs[i]; StreamRecord<X> shallowCopy = record.copy(record.getValue()); output.collect(outputTag, shallowCopy); } if (outputs.length > 0) { // don't copy for the last output outputs[outputs.length - 1].collect(outputTag, record); } }
Example 9
Source File: OperatorChain.java From flink with Apache License 2.0 | 5 votes |
@Override public void collect(StreamRecord<T> record) { for (int i = 0; i < outputs.length - 1; i++) { Output<StreamRecord<T>> output = outputs[i]; StreamRecord<T> shallowCopy = record.copy(record.getValue()); output.collect(shallowCopy); } if (outputs.length > 0) { // don't copy for the last output outputs[outputs.length - 1].collect(record); } }
Example 10
Source File: DirectedOutput.java From flink with Apache License 2.0 | 5 votes |
@Override public void collect(StreamRecord<OUT> record) { Set<Output<StreamRecord<OUT>>> selectedOutputs = selectOutputs(record); for (Output<StreamRecord<OUT>> out : selectedOutputs) { out.collect(record); } }
Example 11
Source File: OperatorChain.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public <X> void collect(OutputTag<X> outputTag, StreamRecord<X> record) { for (int i = 0; i < outputs.length - 1; i++) { Output<StreamRecord<T>> output = outputs[i]; StreamRecord<X> shallowCopy = record.copy(record.getValue()); output.collect(outputTag, shallowCopy); } if (outputs.length > 0) { // don't copy for the last output outputs[outputs.length - 1].collect(outputTag, record); } }
Example 12
Source File: OperatorChain.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public void collect(StreamRecord<T> record) { for (int i = 0; i < outputs.length - 1; i++) { Output<StreamRecord<T>> output = outputs[i]; StreamRecord<T> shallowCopy = record.copy(record.getValue()); output.collect(shallowCopy); } if (outputs.length > 0) { // don't copy for the last output outputs[outputs.length - 1].collect(record); } }
Example 13
Source File: OperatorChain.java From flink with Apache License 2.0 | 4 votes |
@Override public <X> void collect(OutputTag<X> outputTag, StreamRecord<X> record) { for (Output<StreamRecord<T>> output : outputs) { output.collect(outputTag, record); } }
Example 14
Source File: OperatorChain.java From flink with Apache License 2.0 | 4 votes |
@Override public void collect(StreamRecord<T> record) { for (Output<StreamRecord<T>> output : outputs) { output.collect(record); } }
Example 15
Source File: OperatorChain.java From flink with Apache License 2.0 | 4 votes |
@Override public void collect(StreamRecord<T> record) { for (Output<StreamRecord<T>> output : outputs) { output.collect(record); } }
Example 16
Source File: OperatorChain.java From flink with Apache License 2.0 | 4 votes |
@Override public <X> void collect(OutputTag<X> outputTag, StreamRecord<X> record) { for (Output<StreamRecord<T>> output : outputs) { output.collect(outputTag, record); } }
Example 17
Source File: OperatorChain.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override public <X> void collect(OutputTag<X> outputTag, StreamRecord<X> record) { for (Output<StreamRecord<T>> output : outputs) { output.collect(outputTag, record); } }
Example 18
Source File: OperatorChain.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override public void collect(StreamRecord<T> record) { for (Output<StreamRecord<T>> output : outputs) { output.collect(record); } }