Class OutputCollector<T>
java.lang.Object
org.apache.flink.runtime.operators.shipping.OutputCollector<T>
- All Implemented Interfaces:
org.apache.flink.util.Collector<T>
The OutputCollector collects records, and emits them to the
RecordWriters. The
OutputCollector tracks to which writers a deep-copy must be given and which not.-
Constructor Summary
ConstructorsConstructorDescriptionOutputCollector(List<RecordWriter<SerializationDelegate<T>>> writers, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer) Initializes the output collector with a set of writers. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidCollects a record and emits it to all writers.List of writers that are associated with this output collector
-
Constructor Details
-
OutputCollector
public OutputCollector(List<RecordWriter<SerializationDelegate<T>>> writers, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer) Initializes the output collector with a set of writers. To specify for a writer that it must be fed with a deep-copy, set the bit in the copy flag bit mask to 1 that corresponds to the position of the writer within theList.- Parameters:
writers- List of all writers.
-
-
Method Details
-
collect
Collects a record and emits it to all writers.- Specified by:
collectin interfaceorg.apache.flink.util.Collector<T>
-
close
public void close()- Specified by:
closein interfaceorg.apache.flink.util.Collector<T>
-
getWriters
List of writers that are associated with this output collector- Returns:
- list of writers
-