public class OutputCollector<T> extends Object implements Collector<T>
RecordWriter
s. The
OutputCollector tracks to which writers a deep-copy must be given and which not.Constructor and Description |
---|
OutputCollector(List<RecordWriter<SerializationDelegate<T>>> writers,
TypeSerializer<T> serializer)
Initializes the output collector with a set of writers.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the collector.
|
void |
collect(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
|
public OutputCollector(List<RecordWriter<SerializationDelegate<T>>> writers, TypeSerializer<T> serializer)
List
.writers
- List of all writers.public void collect(T record)
public void close()
Collector
public List<RecordWriter<SerializationDelegate<T>>> getWriters()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.