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 void
close()
org.apache.hadoop.io.LongWritable
getCurrentKey()
org.apache.hadoop.io.Text
getCurrentValue()
float
getProgress()
void
initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.mapreduce.TaskAttemptContext taskAttemptContext)
boolean
nextKeyValue()
void
setReader(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:
initialize
in classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
InterruptedException
-
nextKeyValue
public boolean nextKeyValue() throws IOException, InterruptedException
- Specified by:
nextKeyValue
in classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
InterruptedException
-
getCurrentKey
public org.apache.hadoop.io.LongWritable getCurrentKey() throws IOException, InterruptedException
- Specified by:
getCurrentKey
in classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
InterruptedException
-
getCurrentValue
public org.apache.hadoop.io.Text getCurrentValue() throws IOException, InterruptedException
- Specified by:
getCurrentValue
in classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
InterruptedException
-
getProgress
public float getProgress() throws IOException, InterruptedException
- Specified by:
getProgress
in classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
InterruptedException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
-
-