TValue - Value typeT - Tuple typepublic abstract class AbstractWholeFileNodeTupleReader<TValue,T extends AbstractNodeTupleWritable<TValue>>
extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,T>
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.
You should also be aware that with whole file formats syntax compressions in the format may mean that there are multiple triples produced with the same position and thus key.
| Constructor and Description |
|---|
AbstractWholeFileNodeTupleReader() |
| 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