You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/10/11 08:06:57 UTC
[GitHub] [hudi] SteNicholas opened a new pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
SteNicholas opened a new pull request #3779:
URL: https://github.com/apache/hudi/pull/3779
## What is the purpose of the pull request
*The strategy interface for conflict resolution with multiple writers is introduced and the `SparkRDDWriteClient` has integrated with the `ConflictResolutionStrategy`. `HoodieFlinkWriteClient` should also support to allow parallel writing to tables using Locking service based on `ConflictResolutionStrategy`.*
## Brief change log
- *`HoodieFlinkWriteClient` adds the integration with `ConflictResolutionStrategy` in the `preCommit()` method.*
## Verify this pull request
- *Added the `TestHoodieClientMultiWriter` to verify whether `HoodieFlinkWriteClient` supports to allow parallel writing to tables using Locking service.*
## Committer checklist
- [ ] Has a corresponding JIRA in PR title & commit
- [ ] Commit message is descriptive of the change
- [ ] CI is green
- [ ] Necessary doc changes done or have another open PR
- [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot removed a comment on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-939811204
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2579",
"triggerID" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3629ead17fe47a09bb849a76b201200e07f1072c Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2579)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] SteNicholas edited a comment on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
SteNicholas edited a comment on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-942881620
> stored
@danny0405 , IMO, I could do some work to share the flink index which is stored in the state for this pull request.
What do you think about?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot removed a comment on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-939811204
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2579",
"triggerID" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3629ead17fe47a09bb849a76b201200e07f1072c Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2579)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yihua commented on a change in pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
yihua commented on a change in pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#discussion_r728254087
##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -257,6 +260,11 @@ protected void preWrite(String instantTime, WriteOperationType writeOperationTyp
@Override
protected void preCommit(String instantTime, HoodieCommitMetadata metadata) {
+ // Create a Hoodie table after startTxn which encapsulated the commits and files visible.
+ // Important to create this after the lock to ensure latest commits show up in the timeline without need for reload
+ HoodieTable<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> table = createTable(config, hadoopConf);
+ TransactionUtils.resolveWriteConflictIfAny(table, this.txnManager.getCurrentTransactionOwner(),
Review comment:
Specifically, most differences between Spark and Flink are around JavaRDD vs List, which HoodieData abstracts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] leesf commented on a change in pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
leesf commented on a change in pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#discussion_r727089132
##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -412,8 +421,21 @@ private void writeTableMetadata(HoodieTable<T, List<HoodieRecord<T>>, List<Hoodi
@Override
protected HoodieTable<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> getTableAndInitCtx(WriteOperationType operationType, String instantTime) {
HoodieTableMetaClient metaClient = createMetaClient(true);
- new UpgradeDowngrade(metaClient, config, context, FlinkUpgradeDowngradeHelper.getInstance())
- .run(HoodieTableVersion.current(), instantTime);
+ UpgradeDowngrade upgradeDowngrade = new UpgradeDowngrade(metaClient, config, context, FlinkUpgradeDowngradeHelper.getInstance());
Review comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] nonggialiang commented on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
nonggialiang commented on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-1019817884
>
@SteNicholas Any discussion thread or jira from which i can learn the idea of 'sharing the flink index', please?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] SteNicholas commented on a change in pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on a change in pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#discussion_r727107543
##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -412,8 +421,21 @@ private void writeTableMetadata(HoodieTable<T, List<HoodieRecord<T>>, List<Hoodi
@Override
protected HoodieTable<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> getTableAndInitCtx(WriteOperationType operationType, String instantTime) {
HoodieTableMetaClient metaClient = createMetaClient(true);
- new UpgradeDowngrade(metaClient, config, context, FlinkUpgradeDowngradeHelper.getInstance())
- .run(HoodieTableVersion.current(), instantTime);
+ UpgradeDowngrade upgradeDowngrade = new UpgradeDowngrade(metaClient, config, context, FlinkUpgradeDowngradeHelper.getInstance());
Review comment:
@leesf , `HoodieJavaWriteClient` has no `BaseUpgradeDowngradeHelper` implementation, therefore it could be duplicated here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot removed a comment on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-939811204
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2579",
"triggerID" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3629ead17fe47a09bb849a76b201200e07f1072c Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2579)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yihua commented on a change in pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
yihua commented on a change in pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#discussion_r727640936
##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -257,6 +260,11 @@ protected void preWrite(String instantTime, WriteOperationType writeOperationTyp
@Override
protected void preCommit(String instantTime, HoodieCommitMetadata metadata) {
+ // Create a Hoodie table after startTxn which encapsulated the commits and files visible.
+ // Important to create this after the lock to ensure latest commits show up in the timeline without need for reload
+ HoodieTable<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> table = createTable(config, hadoopConf);
+ TransactionUtils.resolveWriteConflictIfAny(table, this.txnManager.getCurrentTransactionOwner(),
Review comment:
I'm okay with this PR going in first.
In general, if there are other write logic we'd like to add in Flink to make them on par with Spark, let me know so I can add them during the refactoring and reduce the efforts.
##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -257,6 +260,11 @@ protected void preWrite(String instantTime, WriteOperationType writeOperationTyp
@Override
protected void preCommit(String instantTime, HoodieCommitMetadata metadata) {
+ // Create a Hoodie table after startTxn which encapsulated the commits and files visible.
+ // Important to create this after the lock to ensure latest commits show up in the timeline without need for reload
+ HoodieTable<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> table = createTable(config, hadoopConf);
+ TransactionUtils.resolveWriteConflictIfAny(table, this.txnManager.getCurrentTransactionOwner(),
Review comment:
To my point, I've introduced `HoodieData` abstraction as the data structure for passing records, keys, write status, etc., which provides general transformation APIs like map, flatMap to hide engine-specific logic. The related PR is here: https://github.com/apache/hudi/pull/3741. At high level, in that way, we should be able to extract common logic from `SparkRDDWriteClient`, `HoodieFlinkWriteClient` and any new write actions and logic can be added to the common super class, supporting all engines, without the need of adding same logic to each engine client. And Java write client class can override the logic in the subclass if needed. I'm thinking that any future changes to this class beyond parallel writing by adding the same logic from Spark could be potential duplicate work.
##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -257,6 +260,11 @@ protected void preWrite(String instantTime, WriteOperationType writeOperationTyp
@Override
protected void preCommit(String instantTime, HoodieCommitMetadata metadata) {
+ // Create a Hoodie table after startTxn which encapsulated the commits and files visible.
+ // Important to create this after the lock to ensure latest commits show up in the timeline without need for reload
+ HoodieTable<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> table = createTable(config, hadoopConf);
+ TransactionUtils.resolveWriteConflictIfAny(table, this.txnManager.getCurrentTransactionOwner(),
Review comment:
Specifically, most differences between Spark and Flink are around JavaRDD vs List, which HoodieData abstracts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] SteNicholas commented on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-1019656976
> @danny0405 @SteNicholas : I don't see much activity in recent times. can we please follow up on the PR and see how to proceed and take it home.
@nsivabalan, I'm working for the sharing the flink index which is stored in the state.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-939811204
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2579",
"triggerID" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3629ead17fe47a09bb849a76b201200e07f1072c Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2579)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 commented on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
danny0405 commented on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-942105218
Please do not merge before we can share the flink index which is stored in the state.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] leesf commented on a change in pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
leesf commented on a change in pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#discussion_r727088305
##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -257,6 +260,11 @@ protected void preWrite(String instantTime, WriteOperationType writeOperationTyp
@Override
protected void preCommit(String instantTime, HoodieCommitMetadata metadata) {
+ // Create a Hoodie table after startTxn which encapsulated the commits and files visible.
+ // Important to create this after the lock to ensure latest commits show up in the timeline without need for reload
+ HoodieTable<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> table = createTable(config, hadoopConf);
+ TransactionUtils.resolveWriteConflictIfAny(table, this.txnManager.getCurrentTransactionOwner(),
Review comment:
these are duplicate code with SparkRDDWriteClient, we would move them to super class. cc @yihua is refactoring code
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] SteNicholas commented on a change in pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on a change in pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#discussion_r727103868
##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -257,6 +260,11 @@ protected void preWrite(String instantTime, WriteOperationType writeOperationTyp
@Override
protected void preCommit(String instantTime, HoodieCommitMetadata metadata) {
+ // Create a Hoodie table after startTxn which encapsulated the commits and files visible.
+ // Important to create this after the lock to ensure latest commits show up in the timeline without need for reload
+ HoodieTable<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> table = createTable(config, hadoopConf);
+ TransactionUtils.resolveWriteConflictIfAny(table, this.txnManager.getCurrentTransactionOwner(),
Review comment:
@leesf , IMO, the duplicate code is only duplicated with the `SparkRDDWriteClient`, but the `HoodieJavaWriteClient` has no support to allow parallel writing to tables using Locking service. Therefore in this pull request, there is no need to move the duplicate code to super class. What's more, @yihua could refactoring after this pull request, otherwise this has conflict.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yanghua commented on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
yanghua commented on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-940722695
@SteNicholas Check the azure CI?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] nsivabalan commented on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
nsivabalan commented on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-1019651564
@danny0405 @SteNicholas : I don't see much activity in recent times. can we follow up on the PR and see how to proceed and take it home.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-961588530
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-939811204
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3629ead17fe47a09bb849a76b201200e07f1072c UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] SteNicholas commented on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-942881620
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-939811204
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2579",
"triggerID" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3629ead17fe47a09bb849a76b201200e07f1072c Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2579)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yihua commented on a change in pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
yihua commented on a change in pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#discussion_r728253119
##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -257,6 +260,11 @@ protected void preWrite(String instantTime, WriteOperationType writeOperationTyp
@Override
protected void preCommit(String instantTime, HoodieCommitMetadata metadata) {
+ // Create a Hoodie table after startTxn which encapsulated the commits and files visible.
+ // Important to create this after the lock to ensure latest commits show up in the timeline without need for reload
+ HoodieTable<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> table = createTable(config, hadoopConf);
+ TransactionUtils.resolveWriteConflictIfAny(table, this.txnManager.getCurrentTransactionOwner(),
Review comment:
To my point, I've introduced `HoodieData` abstraction as the data structure for passing records, keys, write status, etc., which provides general transformation APIs like map, flatMap to hide engine-specific logic. The related PR is here: https://github.com/apache/hudi/pull/3741. At high level, in that way, we should be able to extract common logic from `SparkRDDWriteClient`, `HoodieFlinkWriteClient` and any new write actions and logic can be added to the common super class, supporting all engines, without the need of adding same logic to each engine client. And Java write client class can override the logic in the subclass if needed. I'm thinking that any future changes to this class beyond parallel writing by adding the same logic from Spark could be potential duplicate work.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] SteNicholas removed a comment on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
SteNicholas removed a comment on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-942881691
> stored
@danny0405 , IMO, I could do some work to share the flink index which is stored in the state for this pull request.
What do you think about?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-961588530
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2579",
"triggerID" : "3629ead17fe47a09bb849a76b201200e07f1072c",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3629ead17fe47a09bb849a76b201200e07f1072c Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2579)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] SteNicholas commented on a change in pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on a change in pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#discussion_r727643723
##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -257,6 +260,11 @@ protected void preWrite(String instantTime, WriteOperationType writeOperationTyp
@Override
protected void preCommit(String instantTime, HoodieCommitMetadata metadata) {
+ // Create a Hoodie table after startTxn which encapsulated the commits and files visible.
+ // Important to create this after the lock to ensure latest commits show up in the timeline without need for reload
+ HoodieTable<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> table = createTable(config, hadoopConf);
+ TransactionUtils.resolveWriteConflictIfAny(table, this.txnManager.getCurrentTransactionOwner(),
Review comment:
@yihua , IMO, I didn't know the point mentioned above and I could also refactor the client module for this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] SteNicholas removed a comment on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
SteNicholas removed a comment on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-942881620
> stored
@danny0405 , IMO, I could do some work to share the flink index which is stored in the state for this pull request.
What do you think about?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] SteNicholas commented on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-942881963
> Please do not merge before we can share the flink index which is stored in the state.
@danny0405 , IMO, I could do some work to share the flink index which is stored in the state for this pull request.
What do you think about?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 commented on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
danny0405 commented on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-942105218
Please do not merge before we can share the flink index which is stored in the state.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yihua commented on a change in pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
yihua commented on a change in pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#discussion_r727640936
##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -257,6 +260,11 @@ protected void preWrite(String instantTime, WriteOperationType writeOperationTyp
@Override
protected void preCommit(String instantTime, HoodieCommitMetadata metadata) {
+ // Create a Hoodie table after startTxn which encapsulated the commits and files visible.
+ // Important to create this after the lock to ensure latest commits show up in the timeline without need for reload
+ HoodieTable<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> table = createTable(config, hadoopConf);
+ TransactionUtils.resolveWriteConflictIfAny(table, this.txnManager.getCurrentTransactionOwner(),
Review comment:
I'm okay with this PR going in first.
In general, if there are other write logic we'd like to add in Flink to make them on par with Spark, let me know so I can add them during the refactoring and reduce the efforts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] SteNicholas commented on a change in pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on a change in pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#discussion_r727643723
##########
File path: hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -257,6 +260,11 @@ protected void preWrite(String instantTime, WriteOperationType writeOperationTyp
@Override
protected void preCommit(String instantTime, HoodieCommitMetadata metadata) {
+ // Create a Hoodie table after startTxn which encapsulated the commits and files visible.
+ // Important to create this after the lock to ensure latest commits show up in the timeline without need for reload
+ HoodieTable<T, List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> table = createTable(config, hadoopConf);
+ TransactionUtils.resolveWriteConflictIfAny(table, this.txnManager.getCurrentTransactionOwner(),
Review comment:
@yihua , IMO, I didn't know the point mentioned above and I could also refactor the client module for this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] SteNicholas commented on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-940736007
> @SteNicholas Check the azure CI?
@yanghua , I have checked the result of the azure CI and the Flink client tests are passed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] nsivabalan edited a comment on pull request #3779: [HUDI-2503] HoodieFlinkWriteClient supports to allow parallel writing to tables using Locking service
Posted by GitBox <gi...@apache.org>.
nsivabalan edited a comment on pull request #3779:
URL: https://github.com/apache/hudi/pull/3779#issuecomment-1019651564
@danny0405 @SteNicholas : I don't see much activity in recent times. can we please follow up on the PR and see how to proceed and take it home.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org