-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-1089] Refactor hudi-client to support multi-engine #1827
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 3 commits
b67ee14
cd5d75e
6a79819
7e33f73
9d7a51d
137da2b
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 |
|---|---|---|
|
|
@@ -30,6 +30,7 @@ | |
| import org.apache.hudi.common.table.timeline.HoodieTimeline; | ||
| import org.apache.hudi.config.HoodieCompactionConfig; | ||
| import org.apache.hudi.config.HoodieWriteConfig; | ||
| import org.apache.hudi.table.HoodieSparkTable; | ||
| import org.apache.hudi.table.HoodieTimelineArchiveLog; | ||
|
|
||
| import org.junit.jupiter.api.AfterEach; | ||
|
|
@@ -92,8 +93,9 @@ public void init() throws Exception { | |
| metaClient.getActiveTimeline().reload().getAllCommitsTimeline().filterCompletedInstants(); | ||
|
|
||
| // archive | ||
| HoodieTimelineArchiveLog archiveLog = new HoodieTimelineArchiveLog(cfg, hadoopConf); | ||
| archiveLog.archiveIfRequired(jsc); | ||
| HoodieSparkTable table = HoodieSparkTable.create(cfg, context, metaClient); | ||
|
Member
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. can we replace more of the code to direclty just use
Contributor
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.
yes, make sense |
||
| HoodieTimelineArchiveLog archiveLog = new HoodieTimelineArchiveLog(cfg, table); | ||
| archiveLog.archiveIfRequired(context); | ||
| } | ||
|
|
||
| @AfterEach | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ | |
| import org.apache.hudi.cli.HoodieTableHeaderFields; | ||
| import org.apache.hudi.cli.TableHeader; | ||
| import org.apache.hudi.cli.testutils.AbstractShellIntegrationTest; | ||
| import org.apache.hudi.client.HoodieWriteClient; | ||
| import org.apache.hudi.client.AbstractHoodieWriteClient; | ||
| import org.apache.hudi.common.model.HoodieTableType; | ||
| import org.apache.hudi.common.table.HoodieTableMetaClient; | ||
| import org.apache.hudi.common.table.timeline.HoodieActiveTimeline; | ||
|
|
@@ -90,7 +90,7 @@ public void init() throws Exception { | |
| HoodieWriteConfig config = HoodieWriteConfig.newBuilder().withPath(tablePath) | ||
| .withIndexConfig(HoodieIndexConfig.newBuilder().withIndexType(HoodieIndex.IndexType.INMEMORY).build()).build(); | ||
|
|
||
| try (HoodieWriteClient client = getHoodieWriteClient(config)) { | ||
| try (AbstractHoodieWriteClient client = getHoodieWriteClient(config)) { | ||
|
Member
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. just like this, we should try to use the abstract class as much as we can |
||
| // Rollback inflight commit3 and commit2 | ||
| client.rollback("102"); | ||
| client.rollback("101"); | ||
|
|
||
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.
Actually, I am thinking
hudi-spark-clientandhudi-client-spark, which is better? Given there is a module namedhudi-client-common. wdyt? @vinothchandarThere 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.
cc @wangxianghu probably
hudi-client-sparkis easier on the eyes?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 am ok with both of them :) let's rename it to
hudi-client-sparkUh oh!
There was an error while loading. Please reload this page.
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.
So, will we keep
hudi-spark-client? We have had ahudi-sparkmodule. IMHO, this naming may not seem so clear.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.
@vinothchandar @yanghua I have filed a pr to rename
hudi-spark-clienttohudi-client-spark: #2139please take a look when free