protected abstract class TextVertexInputFormat.TextVertexReader extends VertexReader<I,V,E>
TextVertexInputFormat.TextVertexReaderFromEachLine. If you need to preprocess each line
first, then extend TextVertexInputFormat.TextVertexReaderFromEachLineProcessed. If you
need common exception handling while preprocessing, then extend
TextVertexInputFormat.TextVertexReaderFromEachLineProcessedHandlingExceptions.| Modifier | Constructor and Description |
|---|---|
protected |
TextVertexReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this
VertexReader to future operations. |
protected org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> |
createLineRecordReader(org.apache.hadoop.mapreduce.InputSplit inputSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
Create the line record reader.
|
protected org.apache.hadoop.mapreduce.TaskAttemptContext |
getContext()
Get the context.
|
float |
getProgress()
How much of the input has the
VertexReader consumed i.e. |
protected org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> |
getRecordReader()
Get the line record reader.
|
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.
|
getCurrentVertex, nextVertexaggregate, getAggregatedValue, getBroadcast, reduce, reduceMerge, setWorkerGlobalCommUsagegetConf, setConfpublic void initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException,
InterruptedException
VertexReaderinitialize in class VertexReader<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>inputSplit - Input split to be used for reading vertices.context - Context from the task.IOExceptionInterruptedExceptionprotected org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> createLineRecordReader(org.apache.hadoop.mapreduce.InputSplit inputSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException,
InterruptedException
inputSplit - the split to readcontext - the context passed to initializeIOException - exception that can be thrown during creationInterruptedException - exception that can be thrown during creationpublic void close()
throws IOException
VertexReaderVertexReader to future operations.close in class VertexReader<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>IOExceptionpublic float getProgress()
throws IOException,
InterruptedException
VertexReaderVertexReader consumed i.e.
has been processed by?getProgress in class VertexReader<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>0.0 to 1.0.IOExceptionInterruptedExceptionprotected org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> getRecordReader()
protected org.apache.hadoop.mapreduce.TaskAttemptContext getContext()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.