You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "linliu-code (via GitHub)" <gi...@apache.org> on 2024/11/18 19:30:47 UTC

[PR] [HUDI-8521] Use merge mode to enable processing time merge for Compactor [hudi]

linliu-code opened a new pull request, #12285:
URL: https://github.com/apache/hudi/pull/12285

   ### Change Logs
   
   _Describe context and summary for this change. Highlight if any code was copied._
   
   ### 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. If not, put "none"._
   
   - _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


Re: [PR] [HUDI-8521] Use merge mode to enable processing time merge for Compactor [hudi]

Posted by "linliu-code (via GitHub)" <gi...@apache.org>.
linliu-code closed pull request #12285: [HUDI-8521] Use merge mode to enable processing time merge for Compactor
URL: https://github.com/apache/hudi/pull/12285


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


Re: [PR] [HUDI-8521] Use merge mode to enable processing time merge for Compactor [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "c7c6fee5ee9060388bf68e31e117081f94a6352e",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1731",
       "triggerID" : "c7c6fee5ee9060388bf68e31e117081f94a6352e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76d40b9ab4dacd863626736053a97b67345820a8",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "76d40b9ab4dacd863626736053a97b67345820a8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c7c6fee5ee9060388bf68e31e117081f94a6352e Azure: [CANCELED](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1731) 
   * 76d40b9ab4dacd863626736053a97b67345820a8 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


Re: [PR] [HUDI-8521] Use merge mode to enable processing time merge for Compactor [hudi]

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

   We have different fixes for this problem. Abandon this one.


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


Re: [PR] [HUDI-8521] Use merge mode to enable processing time merge for Compactor [hudi]

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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieMergedLogRecordScanner.java:
##########
@@ -242,17 +245,25 @@ protected <T> void processNextRecord(HoodieRecord<T> newRecord) throws IOExcepti
     String key = newRecord.getRecordKey();
     HoodieRecord<T> prevRecord = records.get(key);
     if (prevRecord != null) {
-      // Merge and store the combined record
-      HoodieRecord<T> combinedRecord = (HoodieRecord<T>) recordMerger.merge(prevRecord, readerSchema,
-          newRecord, readerSchema, this.getPayloadProps()).get().getLeft();
-      // If pre-combine returns existing record, no need to update it
-      if (combinedRecord.getData() != prevRecord.getData()) {
-        HoodieRecord latestHoodieRecord = getLatestHoodieRecord(newRecord, combinedRecord, key);
-
-        // NOTE: Record have to be cloned here to make sure if it holds low-level engine-specific
-        //       payload pointing into a shared, mutable (underlying) buffer we get a clean copy of
-        //       it since these records will be put into records(Map).
-        records.put(key, latestHoodieRecord.copy());
+      switch (mergeMode) {
+        case OVERWRITE_WITH_LATEST:

Review Comment:
   There are some responsibility overlapping with the specific payload class: `OverriteWithLatestAvroPayload`, we should clarify how the merge mode/merger/payload class cooperate here.
   
   And should we call this `PROC_TIME_ORDERING` akka to `EVENT_TIME_ORDERING` ?



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


Re: [PR] [HUDI-8521] Use merge mode to enable processing time merge for Compactor [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "c7c6fee5ee9060388bf68e31e117081f94a6352e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1731",
       "triggerID" : "c7c6fee5ee9060388bf68e31e117081f94a6352e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76d40b9ab4dacd863626736053a97b67345820a8",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "76d40b9ab4dacd863626736053a97b67345820a8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c7c6fee5ee9060388bf68e31e117081f94a6352e Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1731) 
   * 76d40b9ab4dacd863626736053a97b67345820a8 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


Re: [PR] [HUDI-8521] Use merge mode to enable processing time merge for Compactor [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "c7c6fee5ee9060388bf68e31e117081f94a6352e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1731",
       "triggerID" : "c7c6fee5ee9060388bf68e31e117081f94a6352e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c7c6fee5ee9060388bf68e31e117081f94a6352e Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1731) 
   
   <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


Re: [PR] [HUDI-8521] Use merge mode to enable processing time merge for Compactor [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "c7c6fee5ee9060388bf68e31e117081f94a6352e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "c7c6fee5ee9060388bf68e31e117081f94a6352e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c7c6fee5ee9060388bf68e31e117081f94a6352e 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


Re: [PR] [HUDI-8521] Use merge mode to enable processing time merge for Compactor [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "c7c6fee5ee9060388bf68e31e117081f94a6352e",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1731",
       "triggerID" : "c7c6fee5ee9060388bf68e31e117081f94a6352e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76d40b9ab4dacd863626736053a97b67345820a8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1733",
       "triggerID" : "76d40b9ab4dacd863626736053a97b67345820a8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c7c6fee5ee9060388bf68e31e117081f94a6352e Azure: [CANCELED](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1731) 
   * 76d40b9ab4dacd863626736053a97b67345820a8 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1733) 
   
   <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


Re: [PR] [HUDI-8521] Use merge mode to enable processing time merge for Compactor [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "c7c6fee5ee9060388bf68e31e117081f94a6352e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1731",
       "triggerID" : "c7c6fee5ee9060388bf68e31e117081f94a6352e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76d40b9ab4dacd863626736053a97b67345820a8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1733",
       "triggerID" : "76d40b9ab4dacd863626736053a97b67345820a8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 76d40b9ab4dacd863626736053a97b67345820a8 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=1733) 
   
   <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