public class SVMLightRecordWriter extends FileRecordWriter
| Modifier and Type | Field and Description |
|---|---|
static String |
FEATURE_FIRST_COLUMN |
static String |
FEATURE_LAST_COLUMN |
protected int |
featureFirstColumn |
protected int |
featureLastColumn |
static String |
HAS_LABELS |
protected boolean |
hasLabel |
static String |
LABEL_FIRST_COLUMN |
static String |
LABEL_LAST_COLUMN |
protected int |
labelFirstColumn |
protected int |
labelLastColumn |
protected boolean |
multilabel |
static String |
MULTILABEL |
static String |
NAME_SPACE |
static String |
UNLABELED |
static String |
ZERO_BASED_INDEXING |
static String |
ZERO_BASED_LABEL_INDEXING |
protected boolean |
zeroBasedIndexing |
protected boolean |
zeroBasedLabelIndexing |
conf, DEFAULT_CHARSET, encoding, NEW_LINE, out, partitionerAPPEND| Constructor and Description |
|---|
SVMLightRecordWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
setConf(Configuration conf)
Set DataVec configuration
|
boolean |
supportsBatch()
Returns true if this record writer
supports efficient batch writing using
RecordWriter.writeBatch(List) |
PartitionMetaData |
write(List<Writable> record)
Write next record.
|
PartitionMetaData |
writeBatch(List<List<Writable>> batch)
Write a batch of records
|
close, getConf, initialize, initializepublic static final String NAME_SPACE
public static final String FEATURE_FIRST_COLUMN
public static final String FEATURE_LAST_COLUMN
public static final String ZERO_BASED_INDEXING
public static final String ZERO_BASED_LABEL_INDEXING
public static final String HAS_LABELS
public static final String MULTILABEL
public static final String LABEL_FIRST_COLUMN
public static final String LABEL_LAST_COLUMN
public static final String UNLABELED
protected int featureFirstColumn
protected int featureLastColumn
protected boolean zeroBasedIndexing
protected boolean zeroBasedLabelIndexing
protected boolean hasLabel
protected boolean multilabel
protected int labelFirstColumn
protected int labelLastColumn
public void setConf(Configuration conf)
setConf in interface ConfigurablesetConf in class FileRecordWriterconf - public boolean supportsBatch()
RecordWriterRecordWriter.writeBatch(List)public PartitionMetaData write(List<Writable> record) throws IOException
record - IOExceptionpublic PartitionMetaData writeBatch(List<List<Writable>> batch) throws IOException
RecordWriterbatch - the batch to writeIOExceptionCopyright © 2020. All rights reserved.