protected class JsonBase64VertexInputFormat.JsonBase64VertexReader extends TextVertexInputFormat.TextVertexReaderFromEachLineProcessed<org.json.JSONObject>
JsonBase64VertexInputFormat
Modifier | Constructor and Description |
---|---|
protected |
JsonBase64VertexReader() |
Modifier and Type | Method and Description |
---|---|
protected Iterable<Edge<I,E>> |
getEdges(org.json.JSONObject vertexObject)
Reads edges from the preprocessed line.
|
protected I |
getId(org.json.JSONObject vertexObject)
Reads vertex id from the preprocessed line.
|
protected V |
getValue(org.json.JSONObject vertexObject)
Reads vertex value from the preprocessed line.
|
void |
initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
Use the input split and context to setup reading the vertices.
|
protected org.json.JSONObject |
preprocessLine(org.apache.hadoop.io.Text line)
Preprocess the line so other methods can easily read necessary
information for creating vertex.
|
getCurrentVertex, nextVertex
close, createLineRecordReader, getContext, getProgress, getRecordReader
aggregate, getAggregatedValue, getBroadcast, reduce, reduceMerge, setWorkerGlobalCommUsage
getConf, setConf
public void initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
VertexReader
initialize
in class TextVertexInputFormat.TextVertexReader
inputSplit
- Input split to be used for reading vertices.context
- Context from the task.IOException
InterruptedException
protected org.json.JSONObject preprocessLine(org.apache.hadoop.io.Text line)
TextVertexInputFormat.TextVertexReaderFromEachLineProcessed
preprocessLine
in class TextVertexInputFormat.TextVertexReaderFromEachLineProcessed<org.json.JSONObject>
line
- the current line to be readprotected I getId(org.json.JSONObject vertexObject) throws IOException
TextVertexInputFormat.TextVertexReaderFromEachLineProcessed
getId
in class TextVertexInputFormat.TextVertexReaderFromEachLineProcessed<org.json.JSONObject>
vertexObject
- the object obtained by preprocessing the lineIOException
- exception that can be thrown while readingprotected V getValue(org.json.JSONObject vertexObject) throws IOException
TextVertexInputFormat.TextVertexReaderFromEachLineProcessed
getValue
in class TextVertexInputFormat.TextVertexReaderFromEachLineProcessed<org.json.JSONObject>
vertexObject
- the object obtained by preprocessing the lineIOException
- exception that can be thrown while readingprotected Iterable<Edge<I,E>> getEdges(org.json.JSONObject vertexObject) throws IOException
TextVertexInputFormat.TextVertexReaderFromEachLineProcessed
getEdges
in class TextVertexInputFormat.TextVertexReaderFromEachLineProcessed<org.json.JSONObject>
vertexObject
- the object obtained by preprocessing the lineIOException
- exception that can be thrown while readingCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.