public abstract class BaseConsistentHashingBucketClusteringPlanStrategy<T extends HoodieRecordPayload,I,K,O> extends PartitionAwareClusteringPlanStrategy<T,I,K,O>
| Modifier and Type | Field and Description |
|---|---|
static String |
METADATA_CHILD_NODE_KEY |
static String |
METADATA_PARTITION_KEY |
static String |
METADATA_SEQUENCE_NUMBER_KEY |
CLUSTERING_PLAN_VERSION_1, hoodieTable| Constructor and Description |
|---|
BaseConsistentHashingBucketClusteringPlanStrategy(HoodieTable table,
HoodieEngineContext engineContext,
HoodieWriteConfig writeConfig) |
| Modifier and Type | Method and Description |
|---|---|
protected Stream<HoodieClusteringGroup> |
buildClusteringGroupsForPartition(String partitionPath,
List<FileSlice> fileSlices)
Generate cluster group based on split, merge and sort rules
|
protected Triple<List<HoodieClusteringGroup>,Integer,List<FileSlice>> |
buildMergeClusteringGroup(ConsistentBucketIdentifier identifier,
List<FileSlice> fileSlices,
int mergeSlot)
Generate clustering group according to merge rules
|
protected Triple<List<HoodieClusteringGroup>,Integer,List<FileSlice>> |
buildSplitClusteringGroups(ConsistentBucketIdentifier identifier,
List<FileSlice> fileSlices,
int splitSlot)
Generate clustering groups according to split rules.
|
boolean |
checkPrecondition()
TODO maybe add force config to schedule the clustering.
|
protected Stream<FileSlice> |
getFileSlicesEligibleForClustering(String partition)
Generate candidate clustering file slices of the given partition.
|
protected Map<String,String> |
getStrategyParams()
Get parameters specific to strategy.
|
protected boolean |
isBucketClusteringMergeEnabled()
Whether enable buckets merged when using consistent hashing bucket index.
|
protected boolean |
isBucketClusteringSortEnabled()
Whether generate regular sort clustering plans for buckets that are not involved in merge or split.
|
filterPartitionPaths, generateClusteringPlan, getNumberOfOutputFileGroups, getRegexPatternMatchedPartitionsbuildMetrics, checkAndGetClusteringPlanStrategy, getEngineContext, getExtraMetadata, getFileSliceInfo, getHoodieTable, getPlanVersion, getWriteConfigpublic static final String METADATA_PARTITION_KEY
public static final String METADATA_CHILD_NODE_KEY
public static final String METADATA_SEQUENCE_NUMBER_KEY
public BaseConsistentHashingBucketClusteringPlanStrategy(HoodieTable table, HoodieEngineContext engineContext, HoodieWriteConfig writeConfig)
public boolean checkPrecondition()
checkPrecondition in class ClusteringPlanStrategy<T extends HoodieRecordPayload,I,K,O>protected Stream<HoodieClusteringGroup> buildClusteringGroupsForPartition(String partitionPath, List<FileSlice> fileSlices)
buildClusteringGroupsForPartition in class PartitionAwareClusteringPlanStrategy<T extends HoodieRecordPayload,I,K,O>protected boolean isBucketClusteringMergeEnabled()
protected boolean isBucketClusteringSortEnabled()
protected Stream<FileSlice> getFileSlicesEligibleForClustering(String partition)
getFileSlicesEligibleForClustering in class ClusteringPlanStrategy<T extends HoodieRecordPayload,I,K,O>protected Map<String,String> getStrategyParams()
ClusteringPlanStrategygetStrategyParams in class ClusteringPlanStrategy<T extends HoodieRecordPayload,I,K,O>protected Triple<List<HoodieClusteringGroup>,Integer,List<FileSlice>> buildSplitClusteringGroups(ConsistentBucketIdentifier identifier, List<FileSlice> fileSlices, int splitSlot)
identifier - bucket identifierfileSlices - file slice candidate to be built as split clustering groupssplitSlot - number of new bucket allowed to produce, in order to constrain the upper bound of the total number of bucketprotected Triple<List<HoodieClusteringGroup>,Integer,List<FileSlice>> buildMergeClusteringGroup(ConsistentBucketIdentifier identifier, List<FileSlice> fileSlices, int mergeSlot)
identifier - bucket identifierfileSlices - file slice candidates to be built as merge clustering groupsmergeSlot - number of bucket allowed to be merged, in order to guarantee the lower bound of the total number of bucketCopyright © 2024 The Apache Software Foundation. All rights reserved.