|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.hfile.HFile.Reader.Scanner
protected static class HFile.Reader.Scanner
Field Summary | |
---|---|
int |
blockFetches
|
Constructor Summary | |
---|---|
HFile.Reader.Scanner(HFile.Reader r,
boolean cacheBlocks,
boolean pread)
|
Method Summary | |
---|---|
ByteBuffer |
getKey()
Gets a buffer view to the current key. |
String |
getKeyString()
Convenience method to get a copy of the key as a string - interpreting the bytes as UTF8. |
KeyValue |
getKeyValue()
|
HFile.Reader |
getReader()
|
ByteBuffer |
getValue()
Gets a buffer view to the current value. |
String |
getValueString()
Convenience method to get a copy of the value as a string - interpreting the bytes as UTF8. |
boolean |
isSeeked()
|
boolean |
next()
Scans to the next entry in the file. |
boolean |
seekBefore(byte[] key)
Consider the key stream of all the keys in the file, k[0] .. |
boolean |
seekBefore(byte[] key,
int offset,
int length)
|
boolean |
seekTo()
Positions this scanner at the start of the file. |
int |
seekTo(byte[] key)
SeekTo or just before the passed key . |
int |
seekTo(byte[] key,
int offset,
int length)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int blockFetches
Constructor Detail |
---|
public HFile.Reader.Scanner(HFile.Reader r, boolean cacheBlocks, boolean pread)
Method Detail |
---|
public KeyValue getKeyValue()
getKeyValue
in interface HFileScanner
KeyValue
.public ByteBuffer getKey()
HFileScanner
HFileScanner.seekTo(byte[])
before this method.
getKey
in interface HFileScanner
public ByteBuffer getValue()
HFileScanner
HFileScanner.seekTo(byte[])
before this method.
getValue
in interface HFileScanner
public boolean next() throws IOException
HFileScanner
next
in interface HFileScanner
IOException
public int seekTo(byte[] key) throws IOException
HFileScanner
key
. Examine the return
code to figure whether we found the key or not.
Consider the key stream of all the keys in the file,
k[0] .. k[n]
, where there are n keys in the file.
seekTo
in interface HFileScanner
key
- Key to find.
IOException
public int seekTo(byte[] key, int offset, int length) throws IOException
seekTo
in interface HFileScanner
IOException
public boolean seekBefore(byte[] key) throws IOException
HFileScanner
k[0] .. k[n]
, where there are n keys in the file.
seekBefore
in interface HFileScanner
key
- Key to find
IOException
public boolean seekBefore(byte[] key, int offset, int length) throws IOException
seekBefore
in interface HFileScanner
IOException
public String getKeyString()
HFileScanner
HFileScanner.seekTo(byte[])
before this method.
getKeyString
in interface HFileScanner
public String getValueString()
HFileScanner
HFileScanner.seekTo(byte[])
before this method.
getValueString
in interface HFileScanner
public HFile.Reader getReader()
getReader
in interface HFileScanner
public boolean isSeeked()
isSeeked
in interface HFileScanner
HFileScanner.seekBefore(byte[])
or HFileScanner.seekTo()
or HFileScanner.seekTo(byte[])
.
Otherwise returns false.public boolean seekTo() throws IOException
HFileScanner
seekTo
in interface HFileScanner
IOException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |