public class HBaseKeyValueStateIterator<K,V> extends BaseBinaryStateIterator<K,V>
An iterator over HBaseKeyValueState.
| Constructor and Description |
|---|
HBaseKeyValueStateIterator(String namespace,
byte[] columnFamily,
HBaseClient hbaseClient,
Iterator<Map.Entry<byte[],byte[]>> pendingPrepareIterator,
Iterator<Map.Entry<byte[],byte[]>> pendingCommitIterator,
int chunkSize,
Serializer<K> keySerializer,
Serializer<V> valueSerializer)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected K |
decodeKey(byte[] key)
Decode key to convert byte array to state key type.
|
protected V |
decodeValue(byte[] value)
Decode value to convert byte array to state value type.
|
protected boolean |
isEndOfDataFromStorage()
Check whether end of data is reached from storage state KVs.
|
protected boolean |
isTombstoneValue(byte[] value)
Check whether the value is tombstone (deletion mark) value.
|
protected Iterator<Map.Entry<byte[],byte[]>> |
loadChunkFromStateStorage()
Load some part of state KVs from storage and returns iterator of cached data from storage.
|
hasNext, next, removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic HBaseKeyValueStateIterator(String namespace, byte[] columnFamily, HBaseClient hbaseClient, Iterator<Map.Entry<byte[],byte[]>> pendingPrepareIterator, Iterator<Map.Entry<byte[],byte[]>> pendingCommitIterator, int chunkSize, Serializer<K> keySerializer, Serializer<V> valueSerializer)
Constructor.
namespace - The namespace of StatecolumnFamily - The column family of statehbaseClient - The instance of HBaseClientpendingPrepareIterator - The iterator of pendingPreparependingCommitIterator - The iterator of pendingCommitchunkSize - The size of chunk to get entries from HBasekeySerializer - The serializer of keyvalueSerializer - The serializer of valueprotected Iterator<Map.Entry<byte[],byte[]>> loadChunkFromStateStorage()
BaseBinaryStateIteratorLoad some part of state KVs from storage and returns iterator of cached data from storage.
loadChunkFromStateStorage in class BaseBinaryStateIterator<K,V>protected boolean isEndOfDataFromStorage()
BaseBinaryStateIteratorCheck whether end of data is reached from storage state KVs.
isEndOfDataFromStorage in class BaseBinaryStateIterator<K,V>protected K decodeKey(byte[] key)
BaseBinaryStateIteratorDecode key to convert byte array to state key type.
decodeKey in class BaseBinaryStateIterator<K,V>key - byte array encoded keyprotected V decodeValue(byte[] value)
BaseBinaryStateIteratorDecode value to convert byte array to state value type.
decodeValue in class BaseBinaryStateIterator<K,V>value - byte array encoded valueprotected boolean isTombstoneValue(byte[] value)
BaseBinaryStateIteratorCheck whether the value is tombstone (deletion mark) value.
isTombstoneValue in class BaseBinaryStateIterator<K,V>value - the value to checkCopyright © 2021 The Apache Software Foundation. All rights reserved.