Package org.apache.druid.frame.key
Class RowKey
- java.lang.Object
-
- org.apache.druid.frame.key.RowKey
-
public class RowKey extends Object
Represents a specific sorting or hashing key. Instances of this class wrap a byte array in row-based frame format. Following is the layout of the RowKey with n fields Header section byte[1..4] - End of field 1 byte[5..8] - End of field 2 ... byte[4(n-1)..4n] - End of field n Key section byte[headerEnd+1..headerEnd+1+fieldSize1] - Data of field1
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]array()Get the backing array for this key (not a copy).static RowKeyempty()booleanequals(Object o)intestimatedObjectSizeBytes()Estimate number of bytes taken by the key array.inthashCode()longlongHashCode()StringtoString()static RowKeywrap(byte[] row)Create a key from a byte array.
-
-
-
Method Detail
-
wrap
public static RowKey wrap(byte[] row)
Create a key from a byte array. The array will be owned by the resulting key object.
-
empty
public static RowKey empty()
-
array
public byte[] array()
Get the backing array for this key (not a copy).
-
longHashCode
public long longHashCode()
-
estimatedObjectSizeBytes
public int estimatedObjectSizeBytes()
Estimate number of bytes taken by the key array. Only returns an estimate and does not account for platform or JVM specific implementation.
-
-