-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-3042] Refactoring clustering executors #4847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,8 @@ | |
| import org.apache.hudi.avro.model.HoodieClusteringPlan; | ||
| import org.apache.hudi.client.WriteStatus; | ||
| import org.apache.hudi.client.common.JavaTaskContextSupplier; | ||
| import org.apache.hudi.common.data.HoodieData; | ||
| import org.apache.hudi.common.data.HoodieList; | ||
| import org.apache.hudi.common.engine.HoodieEngineContext; | ||
| import org.apache.hudi.common.model.ClusteringOperation; | ||
| import org.apache.hudi.common.model.HoodieAvroRecord; | ||
|
|
@@ -71,7 +73,7 @@ | |
| * Clustering strategy for Java engine. | ||
| */ | ||
| public abstract class JavaExecutionStrategy<T extends HoodieRecordPayload<T>> | ||
| extends ClusteringExecutionStrategy<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> { | ||
| extends ClusteringExecutionStrategy<T, HoodieData<HoodieRecord<T>>, HoodieData<HoodieKey>, HoodieData<WriteStatus>> { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this Java-specific class going to be removed as a follow-up?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yihua yes i should make another PR to deal with |
||
|
|
||
| private static final Logger LOG = LogManager.getLogger(JavaExecutionStrategy.class); | ||
|
|
||
|
|
@@ -81,7 +83,7 @@ public JavaExecutionStrategy( | |
| } | ||
|
|
||
| @Override | ||
| public HoodieWriteMetadata<List<WriteStatus>> performClustering( | ||
| public HoodieWriteMetadata<HoodieData<WriteStatus>> performClustering( | ||
| HoodieClusteringPlan clusteringPlan, Schema schema, String instantTime) { | ||
| // execute clustering for each group and collect WriteStatus | ||
| List<WriteStatus> writeStatusList = new ArrayList<>(); | ||
|
|
@@ -90,8 +92,8 @@ public HoodieWriteMetadata<List<WriteStatus>> performClustering( | |
| inputGroup, clusteringPlan.getStrategy().getStrategyParams(), | ||
| Option.ofNullable(clusteringPlan.getPreserveHoodieMetadata()).orElse(false), | ||
| instantTime))); | ||
| HoodieWriteMetadata<List<WriteStatus>> writeMetadata = new HoodieWriteMetadata<>(); | ||
| writeMetadata.setWriteStatuses(writeStatusList); | ||
| HoodieWriteMetadata<HoodieData<WriteStatus>> writeMetadata = new HoodieWriteMetadata<>(); | ||
| writeMetadata.setWriteStatuses(HoodieList.of(writeStatusList)); | ||
| return writeMetadata; | ||
| } | ||
|
|
||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
BaseCommitActionExecutorresponsibilities are a bit confusing, it handles regular writing process such asinsert,upsertand with this pathclustering, then what about thecompaction?Should we make a new base class for table services then ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the goal is to revamp the commit executors and write pipeline altogether later on, so the refactoring here is limited to code reuse. @xushiyan is that the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danny0405 agreed that it looks like some mixed responsibilities there. i'll make clearer separation in https://issues.apache.org/jira/browse/HUDI-2439