You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "yihua (via GitHub)" <gi...@apache.org> on 2023/05/20 23:42:19 UTC
[GitHub] [hudi] yihua opened a new pull request, #8771: [HUDI-6245] Automatically downgrade table version of metadata table
yihua opened a new pull request, #8771:
URL: https://github.com/apache/hudi/pull/8771
### Change Logs
Before this PR, the user has to manually downgrade the metadata table from version 5 to 4 (e.g., from 0.13.0 release to 0.11.1 release), when the metadata table is enabled, along with the data table. Otherwise, if the data table is downgraded from version 5 to 4 only, the following exception is thrown when trying to write to the table using an old release (e.g., 0.11.1):
```
org.apache.hudi.exception.HoodieException: Unknown versionCode:5
at org.apache.hudi.common.table.HoodieTableVersion.lambda$versionFromCode$1(HoodieTableVersion.java:58)
at java.util.Optional.orElseThrow(Optional.java:290)
at org.apache.hudi.common.table.HoodieTableVersion.versionFromCode(HoodieTableVersion.java:58)
at org.apache.hudi.common.table.HoodieTableConfig.getTableVersion(HoodieTableConfig.java:465)
at org.apache.hudi.table.upgrade.UpgradeDowngrade.needsUpgradeOrDowngrade(UpgradeDowngrade.java:66)
at org.apache.hudi.client.BaseHoodieWriteClient.tryUpgrade(BaseHoodieWriteClient.java:1554)
at org.apache.hudi.client.BaseHoodieWriteClient.initTable(BaseHoodieWriteClient.java:1457)
at org.apache.hudi.client.BaseHoodieWriteClient.initTable(BaseHoodieWriteClient.java:1490)
at org.apache.hudi.client.SparkRDDWriteClient.upsertPreppedRecords(SparkRDDWriteClient.java:166)
at org.apache.hudi.metadata.SparkHoodieBackedTableMetadataWriter.commit(SparkHoodieBackedTableMetadataWriter.java:166)
at org.apache.hudi.metadata.HoodieBackedTableMetadataWriter.processAndCommit(HoodieBackedTableMetadataWriter.java:803)
at org.apache.hudi.metadata.HoodieBackedTableMetadataWriter.update(HoodieBackedTableMetadataWriter.java:870)
at org.apache.hudi.client.BaseHoodieWriteClient.lambda$writeTableMetadata$0(BaseHoodieWriteClient.java:334)
at org.apache.hudi.common.util.Option.ifPresent(Option.java:97)
at org.apache.hudi.client.BaseHoodieWriteClient.writeTableMetadata(BaseHoodieWriteClient.java:334)
at org.apache.hudi.client.BaseHoodieWriteClient.commit(BaseHoodieWriteClient.java:269)
at org.apache.hudi.client.BaseHoodieWriteClient.commitStats(BaseHoodieWriteClient.java:234)
at org.apache.hudi.client.SparkRDDWriteClient.commit(SparkRDDWriteClient.java:122)
at org.apache.hudi.HoodieSparkSqlWriter$.commitAndPerformPostOperations(HoodieSparkSqlWriter.scala:651)
at org.apache.hudi.HoodieSparkSqlWriter$.write(HoodieSparkSqlWriter.scala:315)
at org.apache.hudi.DefaultSource.createRelation(DefaultSource.scala:171)
```
### Impact
_Describe any public API or user-facing feature change or any performance impact._
### Risk level (write none, low medium or high below)
_If medium or high, explain what verification was done to mitigate the risks._
### Documentation Update
_Describe any necessary documentation update if there is any new feature, config, or user-facing change_
- _The config description must be updated if new configs are added or the default value of the configs are changed_
- _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make
changes to the website._
### Contributor's checklist
- [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI 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] yihua commented on a diff in pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on code in PR #8771:
URL: https://github.com/apache/hudi/pull/8771#discussion_r1199676750
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -252,8 +253,9 @@ private void enablePartition(final MetadataPartitionType partitionType, final Ho
* @param writeConfig {@code HoodieWriteConfig} of the main dataset writer
* @param failedWritesCleaningPolicy Cleaning policy on failed writes
*/
- private HoodieWriteConfig createMetadataWriteConfig(
+ public static HoodieWriteConfig createMetadataWriteConfig(
Review Comment:
It cannot be moved to `HoodieTableMetadataUtil` in `hudi-common` module since some classes in client modules are referenced. I created a new `HoodieMetadataWriteUtils` to which the method is moved.
--
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 diff in pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on code in PR #8771:
URL: https://github.com/apache/hudi/pull/8771#discussion_r1199677002
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngrade.java:
##########
@@ -105,6 +108,25 @@ public boolean needsUpgradeOrDowngrade(HoodieTableVersion toVersion) {
* @param instantTime current instant time that should not be touched.
*/
public void run(HoodieTableVersion toVersion, String instantTime) {
+ // Change metadata table version automatically
+ if (toVersion.versionCode() >= HoodieTableVersion.FOUR.versionCode()) {
+ String metadataTablePath = HoodieTableMetadata.getMetadataTableBasePath(
+ metaClient.getBasePathV2().toString());
+ try {
+ if (metaClient.getFs().exists(new Path(metadataTablePath))) {
+ HoodieTableMetaClient mdtMetaClient = HoodieTableMetaClient.builder()
+ .setConf(metaClient.getHadoopConf()).setBasePath(metadataTablePath).build();
+ HoodieWriteConfig mdtWriteConfig = HoodieBackedTableMetadataWriter.createMetadataWriteConfig(
+ config, HoodieFailedWritesCleaningPolicy.LAZY);
Review Comment:
Yes, the upgrade will also be taken care of. However, that is not a usability issue before this PR, since when writing to a table, before the metadata table writer commits to the timeline, it automatically checks if the metadata table needs to be upgraded first.
--
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 #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8771:
URL: https://github.com/apache/hudi/pull/8771#issuecomment-1556078244
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17243",
"triggerID" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"triggerType" : "PUSH"
}, {
"hash" : "3647baa5b949c0f12c22d50de63c913169c3c5d9",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17244",
"triggerID" : "3647baa5b949c0f12c22d50de63c913169c3c5d9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3647baa5b949c0f12c22d50de63c913169c3c5d9 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17244)
<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] hudi-bot commented on pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8771:
URL: https://github.com/apache/hudi/pull/8771#issuecomment-1558173385
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17243",
"triggerID" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"triggerType" : "PUSH"
}, {
"hash" : "3647baa5b949c0f12c22d50de63c913169c3c5d9",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17244",
"triggerID" : "3647baa5b949c0f12c22d50de63c913169c3c5d9",
"triggerType" : "PUSH"
}, {
"hash" : "da61d395636ceb467f3ae534ecd34edd109ed7a4",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17282",
"triggerID" : "da61d395636ceb467f3ae534ecd34edd109ed7a4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3647baa5b949c0f12c22d50de63c913169c3c5d9 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17244)
* da61d395636ceb467f3ae534ecd34edd109ed7a4 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17282)
<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] hudi-bot commented on pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8771:
URL: https://github.com/apache/hudi/pull/8771#issuecomment-1556057640
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17243",
"triggerID" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"triggerType" : "PUSH"
}, {
"hash" : "3647baa5b949c0f12c22d50de63c913169c3c5d9",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17244",
"triggerID" : "3647baa5b949c0f12c22d50de63c913169c3c5d9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 09768ef6cf15f2655b5ebea4fe7360f98ceebfb4 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17243)
* 3647baa5b949c0f12c22d50de63c913169c3c5d9 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17244)
<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] yihua commented on a diff in pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on code in PR #8771:
URL: https://github.com/apache/hudi/pull/8771#discussion_r1199676834
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngrade.java:
##########
@@ -105,6 +108,25 @@ public boolean needsUpgradeOrDowngrade(HoodieTableVersion toVersion) {
* @param instantTime current instant time that should not be touched.
*/
public void run(HoodieTableVersion toVersion, String instantTime) {
+ // Change metadata table version automatically
+ if (toVersion.versionCode() >= HoodieTableVersion.FOUR.versionCode()) {
+ String metadataTablePath = HoodieTableMetadata.getMetadataTableBasePath(
+ metaClient.getBasePathV2().toString());
+ try {
+ if (metaClient.getFs().exists(new Path(metadataTablePath))) {
+ HoodieTableMetaClient mdtMetaClient = HoodieTableMetaClient.builder()
+ .setConf(metaClient.getHadoopConf()).setBasePath(metadataTablePath).build();
+ HoodieWriteConfig mdtWriteConfig = HoodieBackedTableMetadataWriter.createMetadataWriteConfig(
+ config, HoodieFailedWritesCleaningPolicy.LAZY);
Review Comment:
Upgrade and downgrade do not do any write or cleaning so the `HoodieFailedWritesCleaningPolicy` is not used. For consistency, yeah, I changed it to eager.
--
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 a diff in pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on code in PR #8771:
URL: https://github.com/apache/hudi/pull/8771#discussion_r1199694422
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngrade.java:
##########
@@ -105,6 +108,25 @@ public boolean needsUpgradeOrDowngrade(HoodieTableVersion toVersion) {
* @param instantTime current instant time that should not be touched.
*/
public void run(HoodieTableVersion toVersion, String instantTime) {
+ // Change metadata table version automatically
+ if (toVersion.versionCode() >= HoodieTableVersion.FOUR.versionCode()) {
+ String metadataTablePath = HoodieTableMetadata.getMetadataTableBasePath(
+ metaClient.getBasePathV2().toString());
+ try {
+ if (metaClient.getFs().exists(new Path(metadataTablePath))) {
+ HoodieTableMetaClient mdtMetaClient = HoodieTableMetaClient.builder()
+ .setConf(metaClient.getHadoopConf()).setBasePath(metadataTablePath).build();
+ HoodieWriteConfig mdtWriteConfig = HoodieBackedTableMetadataWriter.createMetadataWriteConfig(
+ config, HoodieFailedWritesCleaningPolicy.LAZY);
Review Comment:
gotcha.
--
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 a diff in pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on code in PR #8771:
URL: https://github.com/apache/hudi/pull/8771#discussion_r1199675883
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -252,8 +253,9 @@ private void enablePartition(final MetadataPartitionType partitionType, final Ho
* @param writeConfig {@code HoodieWriteConfig} of the main dataset writer
* @param failedWritesCleaningPolicy Cleaning policy on failed writes
*/
- private HoodieWriteConfig createMetadataWriteConfig(
+ public static HoodieWriteConfig createMetadataWriteConfig(
Review Comment:
can we move static methods to HoodieTableMetadataUtil ?
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngrade.java:
##########
@@ -105,6 +108,25 @@ public boolean needsUpgradeOrDowngrade(HoodieTableVersion toVersion) {
* @param instantTime current instant time that should not be touched.
*/
public void run(HoodieTableVersion toVersion, String instantTime) {
+ // Change metadata table version automatically
+ if (toVersion.versionCode() >= HoodieTableVersion.FOUR.versionCode()) {
+ String metadataTablePath = HoodieTableMetadata.getMetadataTableBasePath(
+ metaClient.getBasePathV2().toString());
+ try {
+ if (metaClient.getFs().exists(new Path(metadataTablePath))) {
+ HoodieTableMetaClient mdtMetaClient = HoodieTableMetaClient.builder()
+ .setConf(metaClient.getHadoopConf()).setBasePath(metadataTablePath).build();
+ HoodieWriteConfig mdtWriteConfig = HoodieBackedTableMetadataWriter.createMetadataWriteConfig(
+ config, HoodieFailedWritesCleaningPolicy.LAZY);
Review Comment:
So, this takes care of both upgrade and downgrade right. i.e. upgrade will upgrade both data table and mdt table and downgrade will downgrade both ?
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngrade.java:
##########
@@ -105,6 +108,25 @@ public boolean needsUpgradeOrDowngrade(HoodieTableVersion toVersion) {
* @param instantTime current instant time that should not be touched.
*/
public void run(HoodieTableVersion toVersion, String instantTime) {
+ // Change metadata table version automatically
+ if (toVersion.versionCode() >= HoodieTableVersion.FOUR.versionCode()) {
+ String metadataTablePath = HoodieTableMetadata.getMetadataTableBasePath(
+ metaClient.getBasePathV2().toString());
+ try {
+ if (metaClient.getFs().exists(new Path(metadataTablePath))) {
+ HoodieTableMetaClient mdtMetaClient = HoodieTableMetaClient.builder()
+ .setConf(metaClient.getHadoopConf()).setBasePath(metadataTablePath).build();
+ HoodieWriteConfig mdtWriteConfig = HoodieBackedTableMetadataWriter.createMetadataWriteConfig(
+ config, HoodieFailedWritesCleaningPolicy.LAZY);
Review Comment:
why this has to be lazy? we can rollback any pending operations right ?
--
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 pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on PR #8771:
URL: https://github.com/apache/hudi/pull/8771#issuecomment-1558603266
Azure CI is green.
<img width="1628" alt="Screenshot 2023-05-22 at 23 21 37" src="https://github.com/apache/hudi/assets/2497195/1802a267-722f-42f3-84b3-bb46d8146684">
--
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 #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8771:
URL: https://github.com/apache/hudi/pull/8771#issuecomment-1556049326
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17243",
"triggerID" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 09768ef6cf15f2655b5ebea4fe7360f98ceebfb4 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17243)
<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] hudi-bot commented on pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8771:
URL: https://github.com/apache/hudi/pull/8771#issuecomment-1556056526
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17243",
"triggerID" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"triggerType" : "PUSH"
}, {
"hash" : "3647baa5b949c0f12c22d50de63c913169c3c5d9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "3647baa5b949c0f12c22d50de63c913169c3c5d9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 09768ef6cf15f2655b5ebea4fe7360f98ceebfb4 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17243)
* 3647baa5b949c0f12c22d50de63c913169c3c5d9 UNKNOWN
<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] hudi-bot commented on pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8771:
URL: https://github.com/apache/hudi/pull/8771#issuecomment-1556047877
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 09768ef6cf15f2655b5ebea4fe7360f98ceebfb4 UNKNOWN
<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] yihua commented on a diff in pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on code in PR #8771:
URL: https://github.com/apache/hudi/pull/8771#discussion_r1201046443
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieMetadataWriteUtils.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.metadata;
+
+import org.apache.hudi.avro.model.HoodieMetadataRecord;
+import org.apache.hudi.client.FailOnFirstErrorWriteStatus;
+import org.apache.hudi.common.config.HoodieMetadataConfig;
+import org.apache.hudi.common.fs.ConsistencyGuardConfig;
+import org.apache.hudi.common.model.HoodieCleaningPolicy;
+import org.apache.hudi.common.model.HoodieFailedWritesCleaningPolicy;
+import org.apache.hudi.common.model.WriteConcurrencyMode;
+import org.apache.hudi.common.table.HoodieTableConfig;
+import org.apache.hudi.common.table.marker.MarkerType;
+import org.apache.hudi.common.table.timeline.versioning.TimelineLayoutVersion;
+import org.apache.hudi.config.HoodieArchivalConfig;
+import org.apache.hudi.config.HoodieCleanConfig;
+import org.apache.hudi.config.HoodieCompactionConfig;
+import org.apache.hudi.config.HoodieWriteConfig;
+import org.apache.hudi.config.metrics.HoodieMetricsConfig;
+import org.apache.hudi.config.metrics.HoodieMetricsGraphiteConfig;
+import org.apache.hudi.config.metrics.HoodieMetricsJmxConfig;
+import org.apache.hudi.config.metrics.HoodieMetricsPrometheusConfig;
+import org.apache.hudi.exception.HoodieMetadataException;
+import org.apache.hudi.table.action.compact.strategy.UnBoundedCompactionStrategy;
+
+import java.util.Properties;
+
+import static org.apache.hudi.common.config.HoodieMetadataConfig.DEFAULT_METADATA_ASYNC_CLEAN;
+import static org.apache.hudi.common.config.HoodieMetadataConfig.DEFAULT_METADATA_CLEANER_COMMITS_RETAINED;
+import static org.apache.hudi.common.config.HoodieMetadataConfig.DEFAULT_METADATA_POPULATE_META_FIELDS;
+import static org.apache.hudi.metadata.HoodieTableMetadata.METADATA_TABLE_NAME_SUFFIX;
+
+/**
+ * Metadata table write utils.
+ */
+public class HoodieMetadataWriteUtils {
+ // Virtual keys support for metadata table. This Field is
+ // from the metadata payload schema.
+ public static final String RECORD_KEY_FIELD_NAME = HoodieMetadataPayload.KEY_FIELD_NAME;
+
+ /**
+ * Create a {@code HoodieWriteConfig} to use for the Metadata Table. This is used by async
+ * indexer only.
+ *
+ * @param writeConfig {@code HoodieWriteConfig} of the main dataset writer
+ * @param failedWritesCleaningPolicy Cleaning policy on failed writes
+ */
+ public static HoodieWriteConfig createMetadataWriteConfig(
Review Comment:
Yes
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieMetadataWriteUtils.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.metadata;
+
+import org.apache.hudi.avro.model.HoodieMetadataRecord;
+import org.apache.hudi.client.FailOnFirstErrorWriteStatus;
+import org.apache.hudi.common.config.HoodieMetadataConfig;
+import org.apache.hudi.common.fs.ConsistencyGuardConfig;
+import org.apache.hudi.common.model.HoodieCleaningPolicy;
+import org.apache.hudi.common.model.HoodieFailedWritesCleaningPolicy;
+import org.apache.hudi.common.model.WriteConcurrencyMode;
+import org.apache.hudi.common.table.HoodieTableConfig;
+import org.apache.hudi.common.table.marker.MarkerType;
+import org.apache.hudi.common.table.timeline.versioning.TimelineLayoutVersion;
+import org.apache.hudi.config.HoodieArchivalConfig;
+import org.apache.hudi.config.HoodieCleanConfig;
+import org.apache.hudi.config.HoodieCompactionConfig;
+import org.apache.hudi.config.HoodieWriteConfig;
+import org.apache.hudi.config.metrics.HoodieMetricsConfig;
+import org.apache.hudi.config.metrics.HoodieMetricsGraphiteConfig;
+import org.apache.hudi.config.metrics.HoodieMetricsJmxConfig;
+import org.apache.hudi.config.metrics.HoodieMetricsPrometheusConfig;
+import org.apache.hudi.exception.HoodieMetadataException;
+import org.apache.hudi.table.action.compact.strategy.UnBoundedCompactionStrategy;
+
+import java.util.Properties;
+
+import static org.apache.hudi.common.config.HoodieMetadataConfig.DEFAULT_METADATA_ASYNC_CLEAN;
+import static org.apache.hudi.common.config.HoodieMetadataConfig.DEFAULT_METADATA_CLEANER_COMMITS_RETAINED;
+import static org.apache.hudi.common.config.HoodieMetadataConfig.DEFAULT_METADATA_POPULATE_META_FIELDS;
+import static org.apache.hudi.metadata.HoodieTableMetadata.METADATA_TABLE_NAME_SUFFIX;
+
+/**
+ * Metadata table write utils.
+ */
+public class HoodieMetadataWriteUtils {
+ // Virtual keys support for metadata table. This Field is
+ // from the metadata payload schema.
+ public static final String RECORD_KEY_FIELD_NAME = HoodieMetadataPayload.KEY_FIELD_NAME;
+
+ /**
+ * Create a {@code HoodieWriteConfig} to use for the Metadata Table. This is used by async
+ * indexer only.
+ *
+ * @param writeConfig {@code HoodieWriteConfig} of the main dataset writer
+ * @param failedWritesCleaningPolicy Cleaning policy on failed writes
+ */
+ public static HoodieWriteConfig createMetadataWriteConfig(
Review Comment:
Yes, no changes to the 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] yihua merged pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua merged PR #8771:
URL: https://github.com/apache/hudi/pull/8771
--
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 #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8771:
URL: https://github.com/apache/hudi/pull/8771#issuecomment-1558164950
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17243",
"triggerID" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"triggerType" : "PUSH"
}, {
"hash" : "3647baa5b949c0f12c22d50de63c913169c3c5d9",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17244",
"triggerID" : "3647baa5b949c0f12c22d50de63c913169c3c5d9",
"triggerType" : "PUSH"
}, {
"hash" : "da61d395636ceb467f3ae534ecd34edd109ed7a4",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "da61d395636ceb467f3ae534ecd34edd109ed7a4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3647baa5b949c0f12c22d50de63c913169c3c5d9 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17244)
* da61d395636ceb467f3ae534ecd34edd109ed7a4 UNKNOWN
<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] hudi-bot commented on pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8771:
URL: https://github.com/apache/hudi/pull/8771#issuecomment-1558443009
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17243",
"triggerID" : "09768ef6cf15f2655b5ebea4fe7360f98ceebfb4",
"triggerType" : "PUSH"
}, {
"hash" : "3647baa5b949c0f12c22d50de63c913169c3c5d9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17244",
"triggerID" : "3647baa5b949c0f12c22d50de63c913169c3c5d9",
"triggerType" : "PUSH"
}, {
"hash" : "da61d395636ceb467f3ae534ecd34edd109ed7a4",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17282",
"triggerID" : "da61d395636ceb467f3ae534ecd34edd109ed7a4",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* da61d395636ceb467f3ae534ecd34edd109ed7a4 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=17282)
<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] nsivabalan commented on a diff in pull request #8771: [HUDI-6245] Automatically downgrade table version of metadata table
Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on code in PR #8771:
URL: https://github.com/apache/hudi/pull/8771#discussion_r1199694621
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieMetadataWriteUtils.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.metadata;
+
+import org.apache.hudi.avro.model.HoodieMetadataRecord;
+import org.apache.hudi.client.FailOnFirstErrorWriteStatus;
+import org.apache.hudi.common.config.HoodieMetadataConfig;
+import org.apache.hudi.common.fs.ConsistencyGuardConfig;
+import org.apache.hudi.common.model.HoodieCleaningPolicy;
+import org.apache.hudi.common.model.HoodieFailedWritesCleaningPolicy;
+import org.apache.hudi.common.model.WriteConcurrencyMode;
+import org.apache.hudi.common.table.HoodieTableConfig;
+import org.apache.hudi.common.table.marker.MarkerType;
+import org.apache.hudi.common.table.timeline.versioning.TimelineLayoutVersion;
+import org.apache.hudi.config.HoodieArchivalConfig;
+import org.apache.hudi.config.HoodieCleanConfig;
+import org.apache.hudi.config.HoodieCompactionConfig;
+import org.apache.hudi.config.HoodieWriteConfig;
+import org.apache.hudi.config.metrics.HoodieMetricsConfig;
+import org.apache.hudi.config.metrics.HoodieMetricsGraphiteConfig;
+import org.apache.hudi.config.metrics.HoodieMetricsJmxConfig;
+import org.apache.hudi.config.metrics.HoodieMetricsPrometheusConfig;
+import org.apache.hudi.exception.HoodieMetadataException;
+import org.apache.hudi.table.action.compact.strategy.UnBoundedCompactionStrategy;
+
+import java.util.Properties;
+
+import static org.apache.hudi.common.config.HoodieMetadataConfig.DEFAULT_METADATA_ASYNC_CLEAN;
+import static org.apache.hudi.common.config.HoodieMetadataConfig.DEFAULT_METADATA_CLEANER_COMMITS_RETAINED;
+import static org.apache.hudi.common.config.HoodieMetadataConfig.DEFAULT_METADATA_POPULATE_META_FIELDS;
+import static org.apache.hudi.metadata.HoodieTableMetadata.METADATA_TABLE_NAME_SUFFIX;
+
+/**
+ * Metadata table write utils.
+ */
+public class HoodieMetadataWriteUtils {
+ // Virtual keys support for metadata table. This Field is
+ // from the metadata payload schema.
+ public static final String RECORD_KEY_FIELD_NAME = HoodieMetadataPayload.KEY_FIELD_NAME;
+
+ /**
+ * Create a {@code HoodieWriteConfig} to use for the Metadata Table. This is used by async
+ * indexer only.
+ *
+ * @param writeConfig {@code HoodieWriteConfig} of the main dataset writer
+ * @param failedWritesCleaningPolicy Cleaning policy on failed writes
+ */
+ public static HoodieWriteConfig createMetadataWriteConfig(
Review Comment:
I assume there are no changes in here, just moving the 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