public class BSTIndex.BSTIndexReader extends Object implements OrderIndexReader, Closeable
Constructor and Description |
---|
BSTIndex.BSTIndexReader(org.apache.hadoop.fs.Path fileName) |
BSTIndex.BSTIndexReader(org.apache.hadoop.fs.Path fileName,
Schema keySchema,
TupleComparator comparator) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
find(Tuple key)
Find the offset corresponding to key which is equal to a given key.
|
long |
find(Tuple key,
boolean nextKey)
Find the offset corresponding to key which is equal to or greater than
a given key.
|
TupleComparator |
getComparator() |
Tuple |
getFirstKey() |
Schema |
getKeySchema() |
Tuple |
getLastKey() |
boolean |
isCurInMemory() |
long |
next()
Return the next offset from the latest find or next offset
|
void |
open() |
String |
toString() |
public BSTIndex.BSTIndexReader(org.apache.hadoop.fs.Path fileName, Schema keySchema, TupleComparator comparator) throws IOException
fileName
- keySchema
- comparator
- IOException
public BSTIndex.BSTIndexReader(org.apache.hadoop.fs.Path fileName) throws IOException
IOException
public Schema getKeySchema()
public TupleComparator getComparator()
public void open() throws IOException
IOException
public long find(Tuple key) throws IOException
IndexReader
find
in interface IndexReader
IOException
public long find(Tuple key, boolean nextKey) throws IOException
OrderIndexReader
find
in interface OrderIndexReader
key
- to findIOException
public long next() throws IOException
OrderIndexReader
next
in interface OrderIndexReader
IOException
public boolean isCurInMemory()
public Tuple getFirstKey()
public Tuple getLastKey()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.