Package org.apache.giraph.io.formats
Class FileRecordReader
- java.lang.Object
-
- org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
-
- org.apache.giraph.io.formats.FileRecordReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class FileRecordReader extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
-
-
Constructor Summary
Constructors Constructor Description FileRecordReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()org.apache.hadoop.io.LongWritablegetCurrentKey()org.apache.hadoop.io.TextgetCurrentValue()floatgetProgress()voidinitialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.mapreduce.TaskAttemptContext taskAttemptContext)booleannextKeyValue()voidsetReader(BufferedReader reader)
-
-
-
Method Detail
-
setReader
public void setReader(BufferedReader reader)
-
initialize
public void initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.mapreduce.TaskAttemptContext taskAttemptContext) throws IOException, InterruptedException- Specified by:
initializein classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>- Throws:
IOExceptionInterruptedException
-
nextKeyValue
public boolean nextKeyValue() throws IOException, InterruptedException- Specified by:
nextKeyValuein classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>- Throws:
IOExceptionInterruptedException
-
getCurrentKey
public org.apache.hadoop.io.LongWritable getCurrentKey() throws IOException, InterruptedException- Specified by:
getCurrentKeyin classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>- Throws:
IOExceptionInterruptedException
-
getCurrentValue
public org.apache.hadoop.io.Text getCurrentValue() throws IOException, InterruptedException- Specified by:
getCurrentValuein classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>- Throws:
IOExceptionInterruptedException
-
getProgress
public float getProgress() throws IOException, InterruptedException- Specified by:
getProgressin classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>- Throws:
IOExceptionInterruptedException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>- Throws:
IOException
-
-