Interface HashFunctionProvider<T>
-
- Type Parameters:
T- the type of given element
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultDataChangeEventHashFunctionProvider,FlussHashFunctionProvider,ForwardHashFunctionProvider,MaxComputeHashFunctionProvider,PaimonHashFunctionProvider,TableIdHashFunctionProvider
@Internal public interface HashFunctionProvider<T> extends Serializable
Provider that providesHashFunctionto helpPrePartitionOperatorto shuffle event to designated subtask. This is usually beneficial for load balancing, when writing to different partitions/buckets inDataSink, add custom implementation to further improve efficiency.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HashFunction<T>getHashFunction(TableId tableId, Schema schema)Gets a hash function based on the given table ID and schema, to helpPrePartitionOperatorto shuffleDataChangeEventto designated subtask.
-
-
-
Method Detail
-
getHashFunction
HashFunction<T> getHashFunction(@Nullable TableId tableId, Schema schema)
Gets a hash function based on the given table ID and schema, to helpPrePartitionOperatorto shuffleDataChangeEventto designated subtask.- Parameters:
tableId- table IDschema- flink table schema- Returns:
- hash function based on the given table ID and schema
-
-