public class RecordOutputCollector extends Object implements Collector<Record>
Records, and emits the pair to a set of Nephele RecordWriters.
The OutputCollector tracks to which writers a deep-copy must be given and which not.| Modifier and Type | Field and Description |
|---|---|
protected RecordWriter<Record>[] |
writers |
| Constructor and Description |
|---|
RecordOutputCollector(List<RecordWriter<Record>> writers)
Initializes the output collector with a set of writers.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addWriter(RecordWriter<Record> writer)
Adds a writer to the OutputCollector.
|
void |
close() |
void |
collect(Record record)
Collects a
Record, and emits it to all writers. |
List<RecordWriter<Record>> |
getWriters()
List of writers that are associated with this output collector
|
protected RecordWriter<Record>[] writers
public RecordOutputCollector(List<RecordWriter<Record>> writers)
List.writers - List of all writers.public void addWriter(RecordWriter<Record> writer)
writer - The writer to add.public void collect(Record record)
Record, and emits it to all writers.
Writers which require a deep-copy are fed with a copy.public List<RecordWriter<Record>> getWriters()
Copyright © 2014 The Apache Software Foundation. All rights reserved.