You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "codope (via GitHub)" <gi...@apache.org> on 2023/06/22 05:56:33 UTC

[GitHub] [hudi] codope opened a new pull request, #9036: [HUDI-6412] Handle record index payload update

codope opened a new pull request, #9036:
URL: https://github.com/apache/hudi/pull/9036

   ### Change Logs
   
   After #9021 there is no longer need of validating whether record location has changed while handling metadata payload for record index.
   
   ### Impact
   
   Allow reading record index metadata successfully post clustering or updates.
   
   ### Risk level (write none, low medium or high below)
   
   low
   
   ### 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] codope commented on a diff in pull request #9036: [HUDI-6412] Handle record index payload update

Posted by "codope (via GitHub)" <gi...@apache.org>.
codope commented on code in PR #9036:
URL: https://github.com/apache/hudi/pull/9036#discussion_r1238634368


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -538,6 +538,10 @@ public Map<String, String> stats() {
     return metrics.map(m -> m.getStats(true, metadataMetaClient, this)).orElse(new HashMap<>());
   }
 
+  public long getMetadataPartitionFileGroupCount(MetadataPartitionType partitionType) {

Review Comment:
   i'm gonna move it to test.. it's just for testing



-- 
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 #9036: [HUDI-6412] Handle record index payload update

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9036:
URL: https://github.com/apache/hudi/pull/9036#issuecomment-1603611702

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18051",
       "triggerID" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d25d2c593a51dbb165de1fd76d63ae16169b8315",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18062",
       "triggerID" : "d25d2c593a51dbb165de1fd76d63ae16169b8315",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 72192ab7d1306a4d6c9a48c80dacdcac84405fa1 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18051) 
   * d25d2c593a51dbb165de1fd76d63ae16169b8315 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18062) 
   
   <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 #9036: [HUDI-6412] Handle record index payload update

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9036:
URL: https://github.com/apache/hudi/pull/9036#issuecomment-1603764651

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18051",
       "triggerID" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d25d2c593a51dbb165de1fd76d63ae16169b8315",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d25d2c593a51dbb165de1fd76d63ae16169b8315",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 72192ab7d1306a4d6c9a48c80dacdcac84405fa1 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18051) 
   * d25d2c593a51dbb165de1fd76d63ae16169b8315 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] danny0405 commented on a diff in pull request #9036: [HUDI-6412] Handle record index payload update

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #9036:
URL: https://github.com/apache/hudi/pull/9036#discussion_r1238276302


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieMetadataPayload.java:
##########
@@ -419,16 +419,7 @@ public HoodieMetadataPayload preCombine(HoodieMetadataPayload previousRecord) {
       case METADATA_TYPE_COLUMN_STATS:
         return new HoodieMetadataPayload(key, combineColumnStatsMetadata(previousRecord));
       case METADATA_TYPE_RECORD_INDEX:
-        // TODO: does not work with updates
-        if (previousRecord.recordIndexMetadata.getInstantTime() != recordIndexMetadata.getInstantTime()) {
-          throw new HoodieMetadataException(String.format("InstantTime for %s should not change from %s to %s", previousRecord.key,
-              previousRecord, this));
-        }
-        // TODO: This does not work with clustering
-        if (!previousRecord.getRecordGlobalLocation().equals(getRecordGlobalLocation())) {
-          throw new HoodieMetadataException(String.format("Location for %s should not change from %s to %s", previousRecord.key,
-              previousRecord, this));
-        }
+        // No need to merge with previous record index, always pick the latest payload.
         return this;

Review Comment:
   +1



-- 
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 #9036: [HUDI-6412] Handle record index payload update

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9036:
URL: https://github.com/apache/hudi/pull/9036#issuecomment-1603006577

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 72192ab7d1306a4d6c9a48c80dacdcac84405fa1 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] codope commented on a diff in pull request #9036: [HUDI-6412] Handle record index payload update

Posted by "codope (via GitHub)" <gi...@apache.org>.
codope commented on code in PR #9036:
URL: https://github.com/apache/hudi/pull/9036#discussion_r1239392803


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -538,6 +538,10 @@ public Map<String, String> stats() {
     return metrics.map(m -> m.getStats(true, metadataMetaClient, this)).orElse(new HashMap<>());
   }
 
+  public long getMetadataPartitionFileGroupCount(MetadataPartitionType partitionType) {

Review Comment:
   Reused an existing method `getNumFileGroupsForPartition`.



-- 
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 #9036: [HUDI-6412] Handle record index payload update

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9036:
URL: https://github.com/apache/hudi/pull/9036#issuecomment-1603757251

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 72192ab7d1306a4d6c9a48c80dacdcac84405fa1 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 #9036: [HUDI-6412] Handle record index payload update

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9036:
URL: https://github.com/apache/hudi/pull/9036#issuecomment-1603021226

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18051",
       "triggerID" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 72192ab7d1306a4d6c9a48c80dacdcac84405fa1 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18051) 
   
   <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 #9036: [HUDI-6412] Handle record index payload update

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9036:
URL: https://github.com/apache/hudi/pull/9036#issuecomment-1603587499

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18051",
       "triggerID" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d25d2c593a51dbb165de1fd76d63ae16169b8315",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d25d2c593a51dbb165de1fd76d63ae16169b8315",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 72192ab7d1306a4d6c9a48c80dacdcac84405fa1 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18051) 
   * d25d2c593a51dbb165de1fd76d63ae16169b8315 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 #9036: [HUDI-6412] Handle record index payload update

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9036:
URL: https://github.com/apache/hudi/pull/9036#issuecomment-1603771440

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18051",
       "triggerID" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d25d2c593a51dbb165de1fd76d63ae16169b8315",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18062",
       "triggerID" : "d25d2c593a51dbb165de1fd76d63ae16169b8315",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d25d2c593a51dbb165de1fd76d63ae16169b8315 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18062) 
   
   <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 #9036: [HUDI-6412] Handle record index payload update

Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on code in PR #9036:
URL: https://github.com/apache/hudi/pull/9036#discussion_r1238095962


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -538,6 +538,10 @@ public Map<String, String> stats() {
     return metrics.map(m -> m.getStats(true, metadataMetaClient, this)).orElse(new HashMap<>());
   }
 
+  public long getMetadataPartitionFileGroupCount(MetadataPartitionType partitionType) {

Review Comment:
   why is this change required?  



-- 
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 #9036: [HUDI-6412] Handle record index payload update

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9036:
URL: https://github.com/apache/hudi/pull/9036#issuecomment-1603354296

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18051",
       "triggerID" : "72192ab7d1306a4d6c9a48c80dacdcac84405fa1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 72192ab7d1306a4d6c9a48c80dacdcac84405fa1 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18051) 
   
   <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] codope merged pull request #9036: [HUDI-6412] Handle record index payload update

Posted by "codope (via GitHub)" <gi...@apache.org>.
codope merged PR #9036:
URL: https://github.com/apache/hudi/pull/9036


-- 
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