org.apache.pig.piggybank.storage
Class IndexedStorage.IndexedStorageInputFormat.IndexedStorageRecordReader
java.lang.Object
org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
org.apache.pig.piggybank.storage.IndexedStorage.IndexedStorageInputFormat.IndexedStorageRecordReader
- All Implemented Interfaces:
- Closeable
- Enclosing class:
- IndexedStorage.IndexedStorageInputFormat
public static class IndexedStorage.IndexedStorageInputFormat.IndexedStorageRecordReader
- extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
Internal RecordReader class
IndexedStorage.IndexedStorageInputFormat.IndexedStorageRecordReader
public IndexedStorage.IndexedStorageInputFormat.IndexedStorageRecordReader(IndexedStorage.IndexManager im)
toString
public String toString()
- Overrides:
toString
in class Object
initialize
public void initialize(org.apache.hadoop.mapreduce.InputSplit genericSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException,
InterruptedException
- Specified by:
initialize
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
InterruptedException
seek
public void seek(long offset)
throws IOException
- Throws:
IOException
seekNear
public boolean seekNear(Tuple keys)
throws IOException
- Scan the index for given key and seek to appropriate offset in the data
- Parameters:
keys
- to look for
- Returns:
- true if the given key was found, false otherwise
- Throws:
IOException
nextKeyValue
public boolean nextKeyValue()
throws IOException,
InterruptedException
- Specified by:
nextKeyValue
in class org.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 class org.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 class org.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 class org.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 interface Closeable
- Specified by:
close
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
Copyright © ${year} The Apache Software Foundation