|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TableScanner
Scanner interface allows application to scan a range of rows of a table. It is the caller's responsibility to close() the scanner after finishing using it. Scanner allows one to fetch the key without fetching the value to allow underlying implementation to instantiating tuple objects (Row) lazily.
Method Summary | |
---|---|
boolean |
advance()
Advance cursor to the next Row. |
boolean |
atEnd()
Test whether the cursor is at the end of the scan range. |
void |
getKey(org.apache.hadoop.io.BytesWritable key)
Get the row key. |
String |
getProjection()
|
Schema |
getSchema()
Get the projection's schema |
void |
getValue(Tuple row)
Get the row. |
boolean |
seekTo(org.apache.hadoop.io.BytesWritable key)
Seek to the key that is greater or equal to the provided key, or we reach the end. |
void |
seekToEnd()
Seek to the end of the scan range. |
Methods inherited from interface java.io.Closeable |
---|
close |
Method Detail |
---|
boolean atEnd() throws IOException
IOException
boolean advance() throws IOException
IOException
void getKey(org.apache.hadoop.io.BytesWritable key) throws IOException
key
- The output parameter to hold the result.
IOException
void getValue(Tuple row) throws IOException
row
- The output parameter to hold the result. It must conform to the
schema that the scanner is aware of.
IOException
getSchema()
boolean seekTo(org.apache.hadoop.io.BytesWritable key) throws IOException
key
- The input key.
IOException
void seekToEnd() throws IOException
IOException
String getProjection()
Schema getSchema()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |