Class OutputCollector<T>
- java.lang.Object
-
- org.apache.flink.runtime.operators.shipping.OutputCollector<T>
-
- All Implemented Interfaces:
org.apache.flink.util.Collector<T>
public class OutputCollector<T> extends Object implements org.apache.flink.util.Collector<T>
The OutputCollector collects records, and emits them to theRecordWriters. The OutputCollector tracks to which writers a deep-copy must be given and which not.
-
-
Constructor Summary
Constructors Constructor Description OutputCollector(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcollect(T record)Collects a record and emits it to all writers.List<RecordWriter<SerializationDelegate<T>>>getWriters()List of writers that are associated with this output collector
-
-
-
Constructor Detail
-
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 Detail
-
collect
public void collect(T record)
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
public List<RecordWriter<SerializationDelegate<T>>> getWriters()
List of writers that are associated with this output collector- Returns:
- list of writers
-
-