public abstract class ClusteringPlanStrategy<T extends HoodieRecordPayload,I,K,O> extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
CLUSTERING_PLAN_VERSION_1 |
| Constructor and Description |
|---|
ClusteringPlanStrategy(HoodieTable table,
HoodieEngineContext engineContext,
HoodieWriteConfig writeConfig) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Double> |
buildMetrics(List<FileSlice> fileSlices)
Generate metrics for the data to be clustered.
|
static String |
checkAndGetClusteringPlanStrategy(HoodieWriteConfig config)
Check if the given class is deprecated.
|
abstract Option<HoodieClusteringPlan> |
generateClusteringPlan()
Generate metadata for grouping eligible files and create a plan.
|
protected HoodieEngineContext |
getEngineContext() |
protected Map<String,String> |
getExtraMetadata()
Returns any specific parameters to be stored as part of clustering metadata.
|
protected static List<HoodieSliceInfo> |
getFileSliceInfo(List<FileSlice> slices)
Transform
FileSlice to HoodieSliceInfo. |
protected Stream<FileSlice> |
getFileSlicesEligibleForClustering(String partition)
Return file slices eligible for clustering.
|
protected HoodieTable<T,I,K,O> |
getHoodieTable() |
protected int |
getPlanVersion()
Version to support future changes for plan.
|
protected abstract Map<String,String> |
getStrategyParams()
Get parameters specific to strategy.
|
protected HoodieWriteConfig |
getWriteConfig() |
public static final int CLUSTERING_PLAN_VERSION_1
public ClusteringPlanStrategy(HoodieTable table, HoodieEngineContext engineContext, HoodieWriteConfig writeConfig)
public static String checkAndGetClusteringPlanStrategy(HoodieWriteConfig config)
config - write configpublic abstract Option<HoodieClusteringPlan> generateClusteringPlan()
protected Stream<FileSlice> getFileSlicesEligibleForClustering(String partition)
protected abstract Map<String,String> getStrategyParams()
protected Map<String,String> getExtraMetadata()
protected int getPlanVersion()
protected static List<HoodieSliceInfo> getFileSliceInfo(List<FileSlice> slices)
FileSlice to HoodieSliceInfo.protected Map<String,Double> buildMetrics(List<FileSlice> fileSlices)
protected HoodieTable<T,I,K,O> getHoodieTable()
protected HoodieEngineContext getEngineContext()
protected HoodieWriteConfig getWriteConfig()
Copyright © 2022 The Apache Software Foundation. All rights reserved.