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 org.apache.flink.runtime.state.KeyedStateHandle |
chooseTheBestStateHandleForInitial(Collection<org.apache.flink.runtime.state.KeyedStateHandle> restoreStateHandles,
org.apache.flink.runtime.state.KeyGroupRange targetKeyGroupRange)
Choose the best state handle according to the
STATE_HANDLE_EVALUATOR
to init the initial db. |
static void |
clipDBWithKeyGroupRange(org.rocksdb.RocksDB db,
List<org.rocksdb.ColumnFamilyHandle> columnFamilyHandles,
org.apache.flink.runtime.state.KeyGroupRange targetKeyGroupRange,
org.apache.flink.runtime.state.KeyGroupRange currentKeyGroupRange,
int keyGroupPrefixBytes,
long writeBatchSize)
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 org.apache.flink.runtime.state.KeyGroupRange targetKeyGroupRange, @Nonnull org.apache.flink.runtime.state.KeyGroupRange currentKeyGroupRange, @Nonnegative int keyGroupPrefixBytes, @Nonnegative long writeBatchSize) 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.RocksDBExceptionpublic static boolean beforeThePrefixBytes(@Nonnull byte[] bytes, @Nonnull byte[] prefixBytes)
@Nullable public static org.apache.flink.runtime.state.KeyedStateHandle chooseTheBestStateHandleForInitial(@Nonnull Collection<org.apache.flink.runtime.state.KeyedStateHandle> restoreStateHandles, @Nonnull org.apache.flink.runtime.state.KeyGroupRange targetKeyGroupRange)
STATE_HANDLE_EVALUATOR
to init the initial db.restoreStateHandles - The candidate state handles.targetKeyGroupRange - The target key group range.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.