You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "sampan-s-nayak (via GitHub)" <gi...@apache.org> on 2024/03/19 17:11:38 UTC

[PR] [HUDI-7517] Add ability to reset the checkpoint for kafka source [hudi]

sampan-s-nayak opened a new pull request, #10890:
URL: https://github.com/apache/hudi/pull/10890

   ### 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-7517] Add ability to reset the checkpoint for kafka source [hudi]

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

   hey @sampan-s-nayak : we already support resetting checkpoint by just setting --checkpoint in deltastreamer top level config. may I know why that does not 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


Re: [PR] [HUDI-7517] Add ability to reset the checkpoint for kafka source [hudi]

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

   I get it now, thanks! 
   


-- 
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-7517] Add ability to reset the checkpoint for kafka source [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9cdd961e7583a51d8e94f78f22ff357b2d864516",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9cdd961e7583a51d8e94f78f22ff357b2d864516",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 71941da6eb713bc672a28f4c81ff814f2106acb2 UNKNOWN
   * 9cdd961e7583a51d8e94f78f22ff357b2d864516 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-7517] Add ability to reset the checkpoint for kafka source [hudi]

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

   > hey @sampan-s-nayak : we already support resetting checkpoint by just setting --checkpoint in deltastreamer top level config. may I know why that does not work ?
   
   @nsivabalan lets sync offline on why there is a gap. 


-- 
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-7517] Add ability to reset the checkpoint for kafka source [hudi]

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


##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/sources/helpers/TestKafkaOffsetGen.java:
##########
@@ -119,6 +122,28 @@ public void testGetNextOffsetRangesFromCheckpoint() {
     assertEquals(750, nextOffsetRanges[0].untilOffset());
   }
 
+  @ParameterizedTest
+  @ValueSource(strings = {"latest","earliest"})
+  public void testGetNextOffsetRangesWhenUsingResetCheckpoint(String autoOffsetResetConfig) {
+    String resetCheckpoint = String.format("%s:reset-%s",testTopicName, Instant.now().toEpochMilli());

Review Comment:
   Can you test the following scenario:
   - Ingest 1 commit to topic name A
   - Reset checkpoint with change to topic name B
   - Ingest 1 commit with topic name B



-- 
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-7517] Add ability to reset the checkpoint for kafka source [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9cdd961e7583a51d8e94f78f22ff357b2d864516",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22960",
       "triggerID" : "9cdd961e7583a51d8e94f78f22ff357b2d864516",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b543450ae480698daae48f48fa2c16dacad10d7",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9b543450ae480698daae48f48fa2c16dacad10d7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 71941da6eb713bc672a28f4c81ff814f2106acb2 UNKNOWN
   * 9cdd961e7583a51d8e94f78f22ff357b2d864516 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22960) 
   * 9b543450ae480698daae48f48fa2c16dacad10d7 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-7517] Add ability to reset the checkpoint for kafka source [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9cdd961e7583a51d8e94f78f22ff357b2d864516",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22960",
       "triggerID" : "9cdd961e7583a51d8e94f78f22ff357b2d864516",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b543450ae480698daae48f48fa2c16dacad10d7",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22962",
       "triggerID" : "9b543450ae480698daae48f48fa2c16dacad10d7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 71941da6eb713bc672a28f4c81ff814f2106acb2 UNKNOWN
   * 9cdd961e7583a51d8e94f78f22ff357b2d864516 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22960) 
   * 9b543450ae480698daae48f48fa2c16dacad10d7 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22962) 
   
   <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-7517] Add ability to reset the checkpoint for kafka source [hudi]

Posted by "sampan-s-nayak (via GitHub)" <gi...@apache.org>.
sampan-s-nayak commented on PR #10890:
URL: https://github.com/apache/hudi/pull/10890#issuecomment-2014352156

   > hey @sampan-s-nayak : we already support resetting checkpoint by just setting --checkpoint in deltastreamer top level config. may I know why that does not work ?
   
   @nsivabalan as per my understanding when using --checkpoint we need to specify an exact checkpoint. but this is not feasible as we see that if we set the earliest checkpoint and data expires in the cluster the stream starts to fail. By resetting checkpoint we can fallback to the other configs which can be used to reset to earliest/ latest checkpoint.
   
   I am talking about this config: ` hoodie.deltastreamer.checkpoint`


-- 
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-7517] Add ability to reset the checkpoint for kafka source [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9cdd961e7583a51d8e94f78f22ff357b2d864516",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22960",
       "triggerID" : "9cdd961e7583a51d8e94f78f22ff357b2d864516",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 71941da6eb713bc672a28f4c81ff814f2106acb2 UNKNOWN
   * 9cdd961e7583a51d8e94f78f22ff357b2d864516 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22960) 
   
   <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-7517] Add ability to reset the checkpoint for kafka source [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 71941da6eb713bc672a28f4c81ff814f2106acb2 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-7517] Add ability to reset the checkpoint for kafka source [hudi]

Posted by "sampan-s-nayak (via GitHub)" <gi...@apache.org>.
sampan-s-nayak commented on code in PR #10890:
URL: https://github.com/apache/hudi/pull/10890#discussion_r1535049167


##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/sources/helpers/TestKafkaOffsetGen.java:
##########
@@ -119,6 +122,28 @@ public void testGetNextOffsetRangesFromCheckpoint() {
     assertEquals(750, nextOffsetRanges[0].untilOffset());
   }
 
+  @ParameterizedTest
+  @ValueSource(strings = {"latest","earliest"})
+  public void testGetNextOffsetRangesWhenUsingResetCheckpoint(String autoOffsetResetConfig) {
+    String resetCheckpoint = String.format("%s:reset-%s",testTopicName, Instant.now().toEpochMilli());

Review Comment:
   waiting for commits seems to be hard to implement so skipping this based on an offline discussion



-- 
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-7517] Add ability to reset the checkpoint for kafka source [hudi]

Posted by "sampan-s-nayak (via GitHub)" <gi...@apache.org>.
sampan-s-nayak commented on PR #10890:
URL: https://github.com/apache/hudi/pull/10890#issuecomment-2048953246

   Closing this, will raise another PR to solve this more generally


-- 
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-7517] Add ability to reset the checkpoint for kafka source [hudi]

Posted by "sampan-s-nayak (via GitHub)" <gi...@apache.org>.
sampan-s-nayak closed pull request #10890: [HUDI-7517] Add ability to reset the checkpoint for kafka source
URL: https://github.com/apache/hudi/pull/10890


-- 
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-7517] Add ability to reset the checkpoint for kafka source [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9cdd961e7583a51d8e94f78f22ff357b2d864516",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22960",
       "triggerID" : "9cdd961e7583a51d8e94f78f22ff357b2d864516",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 71941da6eb713bc672a28f4c81ff814f2106acb2 UNKNOWN
   * 9cdd961e7583a51d8e94f78f22ff357b2d864516 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22960) 
   
   <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-7517] Add ability to reset the checkpoint for kafka source [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "71941da6eb713bc672a28f4c81ff814f2106acb2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9cdd961e7583a51d8e94f78f22ff357b2d864516",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22960",
       "triggerID" : "9cdd961e7583a51d8e94f78f22ff357b2d864516",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b543450ae480698daae48f48fa2c16dacad10d7",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22962",
       "triggerID" : "9b543450ae480698daae48f48fa2c16dacad10d7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 71941da6eb713bc672a28f4c81ff814f2106acb2 UNKNOWN
   * 9b543450ae480698daae48f48fa2c16dacad10d7 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22962) 
   
   <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