org.apache.hadoop.hive.ql.io
Class RCFile.KeyBuffer
java.lang.Object
org.apache.hadoop.hive.ql.io.RCFile.KeyBuffer
- All Implemented Interfaces:
- Comparable, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable
- Enclosing class:
- RCFile
public static class RCFile.KeyBuffer
- extends Object
- implements org.apache.hadoop.io.WritableComparable
KeyBuffer is the key of each record in RCFile. Its on-disk layout is as
below:
- record length in bytes,it is the sum of bytes used to store the key
part and the value part.
- Key length in bytes, it is how many bytes used by the key part.
- number_of_rows_in_this_record(vint),
- column_1_ondisk_length(vint),
- column_1_row_1_value_plain_length,
- column_1_row_2_value_plain_length,
- ....
- column_2_ondisk_length(vint),
- column_2_row_1_value_plain_length,
- column_2_row_2_value_plain_length,
- .... .
- {the end of the key part}
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RCFile.KeyBuffer
@Deprecated
public RCFile.KeyBuffer()
- Deprecated.
getColumnNumber
public int getColumnNumber()
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
getSize
public int getSize()
throws IOException
- get number of bytes to store the keyBuffer.
- Returns:
- number of bytes used to store this KeyBuffer on disk
- Throws:
IOException
compareTo
public int compareTo(Object arg0)
- Specified by:
compareTo
in interface Comparable
Copyright © 2013 The Apache Software Foundation