|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.io.file.tfile.TFile.Reader.Scanner.Entry
public class TFile.Reader.Scanner.Entry
Entry to a <Key, Value> pair.
Constructor Summary | |
---|---|
TFile.Reader.Scanner.Entry()
|
Method Summary | |
---|---|
int |
compareTo(byte[] buf)
Compare the entry key to another key. |
int |
compareTo(byte[] buf,
int offset,
int length)
Compare the entry key to another key. |
int |
compareTo(RawComparable key)
Compare an entry with a RawComparable object. |
boolean |
equals(Object other)
Compare whether this and other points to the same key value. |
void |
get(BytesWritable key,
BytesWritable value)
Copy the key and value in one shot into BytesWritables. |
int |
getKey(byte[] buf)
Copy the key into user supplied buffer. |
int |
getKey(byte[] buf,
int offset)
Copy the key into user supplied buffer. |
int |
getKey(BytesWritable key)
Copy the key into BytesWritable. |
int |
getKeyLength()
Get the length of the key. |
DataInputStream |
getKeyStream()
Streaming access to the key. |
int |
getValue(byte[] buf)
Copy value into user-supplied buffer. |
int |
getValue(byte[] buf,
int offset)
Copy value into user-supplied buffer. |
long |
getValue(BytesWritable value)
Copy the value into BytesWritable. |
int |
getValueLength()
Get the length of the value. |
DataInputStream |
getValueStream()
Stream access to value. |
int |
hashCode()
|
boolean |
isValueLengthKnown()
Check whether it is safe to call getValueLength(). |
int |
writeKey(OutputStream out)
Writing the key to the output stream. |
long |
writeValue(OutputStream out)
Writing the value to the output stream. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TFile.Reader.Scanner.Entry()
Method Detail |
---|
public int getKeyLength()
public void get(BytesWritable key, BytesWritable value) throws IOException
key
- BytesWritable to hold key.value
- BytesWritable to hold value
IOException
public int getKey(BytesWritable key) throws IOException
key
- BytesWritable to hold the key.
IOException
public long getValue(BytesWritable value) throws IOException
value
-
IOException
public int writeKey(OutputStream out) throws IOException
out
- The output stream
IOException
public long writeValue(OutputStream out) throws IOException
out
- The output stream
IOException
public int getKey(byte[] buf) throws IOException
buf
- The buffer supplied by user. The length of the buffer must
not be shorter than the key length.
IOException
public int getKey(byte[] buf, int offset) throws IOException
buf
- The buffer supplied by user.offset
- The starting offset of the user buffer where we should copy
the key into. Requiring the key-length + offset no greater
than the buffer length.
IOException
public DataInputStream getKeyStream()
public int getValueLength()
public int getValue(byte[] buf) throws IOException
getValue(byte[])
, getValue(byte[], int)
,
getValueStream()
.
IOException
public int getValue(byte[] buf, int offset) throws IOException
getValue(byte[])
, getValue(byte[], int)
,
getValueStream()
.
IOException
public DataInputStream getValueStream() throws IOException
getValue(byte[])
,
getValue(byte[], int)
, getValueStream()
.
IOException
public boolean isValueLengthKnown()
public int compareTo(byte[] buf)
buf
- The key buffer.
public int compareTo(byte[] buf, int offset, int length)
buf
- The key bufferoffset
- offset into the key buffer.length
- the length of the key.
public int compareTo(RawComparable key)
compareTo
in interface Comparable<RawComparable>
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |