public abstract class FileRecordWriter extends Object implements RecordWriter
To set the path and configuration via configuration: writeTo: org.datavec.api.records.writer.path
This is the path used to write to
| Modifier and Type | Field and Description |
|---|---|
protected Configuration |
conf |
static Charset |
DEFAULT_CHARSET |
protected Charset |
encoding |
static String |
NEW_LINE |
protected DataOutputStream |
out |
protected Partitioner |
partitioner |
APPEND| Constructor and Description |
|---|
FileRecordWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the recod reader
|
Configuration |
getConf()
Return the configuration used by this object.
|
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
|
void |
setConf(Configuration conf)
Set the configuration to be used by this object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsupportsBatch, write, writeBatchpublic static final Charset DEFAULT_CHARSET
protected DataOutputStream out
public static final String NEW_LINE
protected Charset encoding
protected Partitioner partitioner
protected Configuration conf
public void initialize(InputSplit inputSplit, Partitioner partitioner) throws Exception
RecordWriterinitialize in interface RecordWriterinputSplit - the input split to initialize withExceptionpublic void initialize(Configuration configuration, InputSplit split, Partitioner partitioner) throws Exception
RecordWriterInputSplitinitialize in interface RecordWriterconfiguration - the configuration to iniailize withsplit - the split to useExceptionpublic void close()
RecordWriterclose in interface Closeableclose in interface AutoCloseableclose in interface RecordWriterpublic void setConf(Configuration conf)
ConfigurablesetConf in interface Configurablepublic Configuration getConf()
ConfigurablegetConf in interface ConfigurableCopyright © 2020. All rights reserved.