@InterfaceAudience.Private public class KeyValueUtil extends Object
Constructor and Description |
---|
KeyValueUtil() |
Modifier and Type | Method and Description |
---|---|
protected static int |
appendKeyToByteArrayWithoutValue(Cell cell,
byte[] output,
int offset) |
static int |
appendToByteArray(Cell cell,
byte[] output,
int offset)
copy key and value
|
static void |
appendToByteBuffer(ByteBuffer bb,
KeyValue kv,
boolean includeMvccVersion) |
static ByteBuffer |
copyKeyToNewByteBuffer(Cell cell) |
static byte[] |
copyToNewByteArray(Cell cell) |
static ByteBuffer |
copyToNewByteBuffer(Cell cell) |
static KeyValue |
copyToNewKeyValue(Cell cell)
copy key only
|
static KeyValue |
createFirstKeyInIncrementedRow(Cell in)
Increment the row bytes and clear the other fields
|
static KeyValue |
createFirstKeyInNextRow(Cell in)
Append single byte 0x00 to the end of the input row key
|
static KeyValue |
ensureKeyValue(Cell cell) |
static List<KeyValue> |
ensureKeyValues(List<Cell> cells) |
static int |
keyLength(Cell cell) |
static int |
length(Cell cell)
length
|
static int |
lengthWithMvccVersion(KeyValue kv,
boolean includeMvccVersion) |
static KeyValue |
nextShallowCopy(ByteBuffer bb,
boolean includesMvccVersion,
boolean includesTags)
Creates a new KeyValue object positioned in the supplied ByteBuffer and sets the ByteBuffer's
position to the start of the next KeyValue.
|
static KeyValue |
previousKey(KeyValue in)
Decrement the timestamp.
|
static int |
totalLengthWithMvccVersion(Iterable<? extends KeyValue> kvs,
boolean includeMvccVersion) |
public static int length(Cell cell)
public static int keyLength(Cell cell)
public static int lengthWithMvccVersion(KeyValue kv, boolean includeMvccVersion)
public static int totalLengthWithMvccVersion(Iterable<? extends KeyValue> kvs, boolean includeMvccVersion)
public static ByteBuffer copyKeyToNewByteBuffer(Cell cell)
public static byte[] copyToNewByteArray(Cell cell)
protected static int appendKeyToByteArrayWithoutValue(Cell cell, byte[] output, int offset)
public static int appendToByteArray(Cell cell, byte[] output, int offset)
public static ByteBuffer copyToNewByteBuffer(Cell cell)
public static void appendToByteBuffer(ByteBuffer bb, KeyValue kv, boolean includeMvccVersion)
public static KeyValue nextShallowCopy(ByteBuffer bb, boolean includesMvccVersion, boolean includesTags)
bb
- includesMvccVersion
- includesTags
- public static KeyValue createFirstKeyInNextRow(Cell in)
public static KeyValue createFirstKeyInIncrementedRow(Cell in)
public static KeyValue previousKey(KeyValue in)
in
- Copyright © 2014 The Apache Software Foundation. All Rights Reserved.