public class RocksDBIncrementalCheckpointUtils extends Object
Constructor and Description |
---|
RocksDBIncrementalCheckpointUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
beforeThePrefixBytes(byte[] bytes,
byte[] prefixBytes)
check whether the bytes is before prefixBytes in the character order.
|
static KeyedStateHandle |
chooseTheBestStateHandleForInitial(Collection<KeyedStateHandle> restoreStateHandles,
KeyGroupRange targetKeyGroupRange,
double overlapFractionThreshold)
Choose the best state handle according to the
stateHandleEvaluator(KeyedStateHandle,
KeyGroupRange, double) to init the initial db. |
static void |
clipDBWithKeyGroupRange(org.rocksdb.RocksDB db,
List<org.rocksdb.ColumnFamilyHandle> columnFamilyHandles,
KeyGroupRange targetKeyGroupRange,
KeyGroupRange currentKeyGroupRange,
int keyGroupPrefixBytes)
The method to clip the db instance according to the target key group range using the
RocksDB.delete(ColumnFamilyHandle, byte[]) . |
public static void clipDBWithKeyGroupRange(@Nonnull org.rocksdb.RocksDB db, @Nonnull List<org.rocksdb.ColumnFamilyHandle> columnFamilyHandles, @Nonnull KeyGroupRange targetKeyGroupRange, @Nonnull KeyGroupRange currentKeyGroupRange, @Nonnegative int keyGroupPrefixBytes) throws org.rocksdb.RocksDBException
RocksDB.delete(ColumnFamilyHandle, byte[])
.db
- the RocksDB instance to be clipped.columnFamilyHandles
- the column families in the db instance.targetKeyGroupRange
- the target key group range.currentKeyGroupRange
- the key group range of the db instance.keyGroupPrefixBytes
- Number of bytes required to prefix the key groups.org.rocksdb.RocksDBException
public static boolean beforeThePrefixBytes(@Nonnull byte[] bytes, @Nonnull byte[] prefixBytes)
@Nullable public static KeyedStateHandle chooseTheBestStateHandleForInitial(@Nonnull Collection<KeyedStateHandle> restoreStateHandles, @Nonnull KeyGroupRange targetKeyGroupRange, double overlapFractionThreshold)
stateHandleEvaluator(KeyedStateHandle,
KeyGroupRange, double)
to init the initial db.restoreStateHandles
- The candidate state handles.targetKeyGroupRange
- The target key group range.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.