public final class EdgeWithDegreesInputFormat extends DelimitedInputFormat
v1,d1|v2,d2\n, where v1 and v2 are the IDs of the first and
second vertex, while d1 and d2 are the vertex degrees.
The result record holds the fields in the sequence (v1, v2, d1, d2).
The delimiters are configurable. The default delimiter between vertex ID and
vertex degree is the comma (,). The default delimiter between the two vertices is
the vertical bar (|).
DelimitedInputFormat.AbstractConfigBuilder<T>, DelimitedInputFormat.ConfigBuilderFileInputFormat.FileBaseStatistics, FileInputFormat.InputSplitOpenThread| Modifier and Type | Field and Description |
|---|---|
static String |
DEGREE_DELIMITER_CHAR |
static String |
VERTEX_DELIMITER_CHAR |
RECORD_DELIMITERfilePath, minSplitSize, numSplits, openTimeout, splitLength, splitStart, stream| Constructor and Description |
|---|
EdgeWithDegreesInputFormat() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Configuration parameters) |
boolean |
readRecord(Record target,
byte[] bytes,
int offset,
int numBytes) |
close, configureDelimitedFormat, getBufferSize, getDelimiter, getLineLengthLimit, getNumLineSamples, getStatistics, loadGloablConfigParams, nextRecord, open, reachedEnd, setBufferSize, setDelimiter, setDelimiter, setDelimiter, setDelimiter, setDelimiter, setLineLengthLimit, setNumLineSamplesconfigureFileFormat, createInputSplits, getFilePath, getFileStats, getInputSplitType, getMinSplitSize, getNumSplits, getOpenTimeout, getSplitLength, getSplitStart, setFilePath, setFilePath, setMinSplitSize, setNumSplits, setOpenTimeout, toStringpublic static final String VERTEX_DELIMITER_CHAR
public static final String DEGREE_DELIMITER_CHAR
public boolean readRecord(Record target, byte[] bytes, int offset, int numBytes)
readRecord in class DelimitedInputFormatpublic void configure(Configuration parameters)
configure in interface InputFormat<Record,FileInputSplit>configure in class DelimitedInputFormat<Record>Copyright © 2013. All rights reserved.