public interface RecordWriter extends Closeable, Configurable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the recod reader
|
void |
initialize(Configuration configuration,
InputSplit split,
Partitioner partitioner)
Initialize the record reader with the given configuration
and
InputSplit |
void |
initialize(InputSplit inputSplit,
Partitioner partitioner)
Initialize a record writer with the given input split
|
boolean |
supportsBatch()
Returns true if this record writer
supports efficient batch writing using
writeBatch(List) |
PartitionMetaData |
write(List<Writable> record)
Write a record
|
PartitionMetaData |
writeBatch(List<List<Writable>> batch)
Write a batch of records
|
getConf, setConfstatic final String APPEND
boolean supportsBatch()
writeBatch(List)void initialize(InputSplit inputSplit, Partitioner partitioner) throws Exception
inputSplit - the input split to initialize withpartitioner - Exceptionvoid initialize(Configuration configuration, InputSplit split, Partitioner partitioner) throws Exception
InputSplitconfiguration - the configuration to iniailize withsplit - the split to usepartitioner - ExceptionPartitionMetaData write(List<Writable> record) throws IOException
record - the record to writeIOExceptionPartitionMetaData writeBatch(List<List<Writable>> batch) throws IOException
batch - the batch to writeIOExceptionvoid close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2019. All rights reserved.