TValue - Value typeT - Tuple typepublic abstract class AbstractBlockBasedNodeTupleReader<TValue,T extends AbstractNodeTupleWritable<TValue>>
extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,T>
AbstractLineBasedNodeTupleReader
and AbstractWholeFileNodeTupleReader in that it can only be used by
formats which can be split by lines but reduces the overhead by parsing the
split as a whole rather than as individual lines.
The keys produced are the approximate position in the file at which a tuple was found and the values will be node tuples. Positions are approximate because they are recorded after the point at which the most recent tuple was parsed from the input thus they reflect the approximate position in the stream immediately after which the triple was found.
| Constructor and Description |
|---|
AbstractBlockBasedNodeTupleReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.hadoop.io.LongWritable |
getCurrentKey() |
T |
getCurrentValue() |
float |
getProgress() |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit genericSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context) |
boolean |
nextKeyValue() |
public void initialize(org.apache.hadoop.mapreduce.InputSplit genericSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
initialize in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,T extends AbstractNodeTupleWritable<TValue>>IOExceptionpublic boolean nextKeyValue()
throws IOException
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,T extends AbstractNodeTupleWritable<TValue>>IOExceptionpublic org.apache.hadoop.io.LongWritable getCurrentKey()
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,T extends AbstractNodeTupleWritable<TValue>>public T getCurrentValue()
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,T extends AbstractNodeTupleWritable<TValue>>public float getProgress()
getProgress in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,T extends AbstractNodeTupleWritable<TValue>>public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,T extends AbstractNodeTupleWritable<TValue>>IOExceptionLicenced under the Apache License, Version 2.0