public static class IndexedStorage.IndexedStorageInputFormat.IndexedStorageRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
| Modifier and Type | Class and Description |
|---|---|
static class |
IndexedStorage.IndexedStorageInputFormat.IndexedStorageRecordReader.IndexedStorageLineReader |
static class |
IndexedStorage.IndexedStorageInputFormat.IndexedStorageRecordReader.IndexedStorageRecordReaderComparator
Class to compare record readers using underlying indexes
|
| Constructor and Description |
|---|
IndexedStorageRecordReader(IndexedStorage.IndexManager im) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.hadoop.io.LongWritable |
getCurrentKey() |
org.apache.hadoop.io.Text |
getCurrentValue() |
float |
getProgress() |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit genericSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context) |
boolean |
nextKeyValue() |
void |
seek(long offset) |
boolean |
seekNear(Tuple keys)
Scan the index for given key and seek to appropriate offset in the data
|
String |
toString() |
public IndexedStorageRecordReader(IndexedStorage.IndexManager im)
public void initialize(org.apache.hadoop.mapreduce.InputSplit genericSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException,
InterruptedException
initialize in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionInterruptedExceptionpublic void seek(long offset)
throws IOException
IOExceptionpublic boolean seekNear(Tuple keys) throws IOException
keys - to look forIOExceptionpublic boolean nextKeyValue()
throws IOException,
InterruptedException
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionInterruptedExceptionpublic org.apache.hadoop.io.LongWritable getCurrentKey()
throws IOException,
InterruptedException
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionInterruptedExceptionpublic org.apache.hadoop.io.Text getCurrentValue()
throws IOException,
InterruptedException
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionInterruptedExceptionpublic float getProgress()
throws IOException,
InterruptedException
getProgress in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionInterruptedExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionCopyright © 2007-2017 The Apache Software Foundation