T
- The resulting type of preprocessing.X
- The exception type that can be thrown due to preprocessing.protected abstract class TextVertexInputFormat.TextVertexReaderFromEachLineProcessedHandlingExceptions<T,X extends Throwable> extends TextVertexInputFormat.TextVertexReader
Modifier | Constructor and Description |
---|---|
protected |
TextVertexReaderFromEachLineProcessedHandlingExceptions() |
Modifier and Type | Method and Description |
---|---|
Vertex<I,V,E> |
getCurrentVertex()
Get the current vertex.
|
protected abstract Iterable<Edge<I,E>> |
getEdges(T line)
Reads edges from the preprocessed line.
|
protected abstract I |
getId(T line)
Reads vertex id from the preprocessed line.
|
protected abstract V |
getValue(T line)
Reads vertex value from the preprocessed line.
|
protected Vertex<I,V,E> |
handleException(org.apache.hadoop.io.Text line,
T processed,
X e)
Handles exceptions while reading vertex from each line.
|
boolean |
nextVertex() |
protected abstract T |
preprocessLine(org.apache.hadoop.io.Text line)
Preprocess the line so other methods can easily read necessary
information for creating vertex.
|
close, createLineRecordReader, getContext, getProgress, getRecordReader, initialize
aggregate, getAggregatedValue, getBroadcast, reduce, reduceMerge, setWorkerGlobalCommUsage
getConf, setConf
protected TextVertexReaderFromEachLineProcessedHandlingExceptions()
public final boolean nextVertex() throws IOException, InterruptedException
nextVertex
in class VertexReader<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
IOException
InterruptedException
public final Vertex<I,V,E> getCurrentVertex() throws IOException, InterruptedException
VertexReader
getCurrentVertex
in class VertexReader<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
IOException
InterruptedException
protected abstract T preprocessLine(org.apache.hadoop.io.Text line) throws X extends Throwable, IOException
line
- the current line to be readX
- exception that can be thrown while preprocessing the lineIOException
- exception that can be thrown while readingX extends Throwable
protected abstract I getId(T line) throws X extends Throwable, IOException
line
- the object obtained by preprocessing the lineX
- exception that can be thrown while reading the preprocessed
objectIOException
- exception that can be thrown while readingX extends Throwable
protected abstract V getValue(T line) throws X extends Throwable, IOException
line
- the object obtained by preprocessing the lineX
- exception that can be thrown while reading the preprocessed
objectIOException
- exception that can be thrown while readingX extends Throwable
protected abstract Iterable<Edge<I,E>> getEdges(T line) throws X extends Throwable, IOException
line
- the object obtained by preprocessing the lineX
- exception that can be thrown while reading the preprocessed
objectIOException
- exception that can be thrown while readingX extends Throwable
protected Vertex<I,V,E> handleException(org.apache.hadoop.io.Text line, T processed, X e)
line
- the line that was being read when the exception was thrownprocessed
- the object obtained by preprocessing the line. Can be null if
exception was thrown during preprocessing.e
- the exception thrown while reading the lineCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.