You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "sydneyhoran (via GitHub)" <gi...@apache.org> on 2023/04/20 19:59:18 UTC

[GitHub] [hudi] sydneyhoran opened a new issue, #8522: [SUPPORT] Parameter `--checkpoint` is different for DebeziumSource

sydneyhoran opened a new issue, #8522:
URL: https://github.com/apache/hudi/issues/8522

   **_Tips before filing an issue_**
   
   - Have you gone through our [FAQs](https://hudi.apache.org/learn/faq/)?
   
   - Join the mailing list to engage in conversations and get faster support at dev-subscribe@hudi.apache.org.
   
   - If you have triaged this as a bug, then file an [issue](https://issues.apache.org/jira/projects/HUDI/issues) directly.
   
   **Describe the problem you faced**
   
   Not an actual issue but an observation I wanted to post so that others can find it in the future. Maybe we could add something for this into the documentation? Regarding how to pass checkpoint string to Deltastreamer job that uses Debezium.
   
   I've been searching/experimenting for a while on how to pass `--checkpoint 12345` (for example) to a resume Deltastreamer from a specific checkpoint, in order to jump around in the Kafka topic to test unexpected messages that have been found to break the job.
   
   According to [this doc](https://hudi.apache.org/docs/hoodie_deltastreamer/#checkpointing), checkpoint is the Kafka offset when using a Kafka source. However since we are using a Debezium Source, the checkpoint string looks a little bit different.
   
   It includes the topic name, followed by `,0:<new_desired_checkpoint>`. For example, you have to explicitly pass `--checkpoint "users.public.transactions,0:106600"`.
   
   **To Reproduce**
   
   Steps to reproduce the behavior:
   
   1. Use Deltastreamer with Kafka PostgresDebeziumSource, pass `--checkpoint 106600` to try to force it to jump to that offset
   - Results in log `DeltaSync: Checkpoint to resume from : Option{val=106600}`
   - Job begins streaming from wherever it left off (105524).
   
   2. Change the parameter to be more explicit and line up with the previous "New checkpoint string"s printed in past job logs `--checkpoint "users.public.transactions,0:106600"`
   - Results in log `DeltaSync: Checkpoint to resume from : Option{val=users.public.transactions,0:106600}`
   - Job begins streaming from correct location(106600).
   
   
   **Expected behavior**
   
   Able to pass a new checkpoint string to Deltastreamer with Debezium source. It is achievable but was difficult to find an example of how to achieve this, and not as simple as just the offset number alone.
   
   **Environment Description**
   
   * Hudi version : 0.13.0
   
   * Spark version : 3.1
   
   * Hive version : N/A
   
   * Hadoop version : N/A
   
   * Storage (HDFS/S3/GCS..) : S3
   
   * Running on Docker? (yes/no) : both
   
   
   **Additional context**
   
   N/A
   
   **Stacktrace**
   
   N/A
   
   


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [SUPPORT] Parameter `--checkpoint` is different for DebeziumSource [hudi]

Posted by "wombatu-kun (via GitHub)" <gi...@apache.org>.
wombatu-kun commented on issue #8522:
URL: https://github.com/apache/hudi/issues/8522#issuecomment-2264544595

   @sydneyhoran hi! I've added ability to pass checkpoint as offset number alone like `--checkpoint 106600` (with `hoodie.streamer.source.kafka.checkpoint.type=single_offset`) to master branch, and fixed documentation here https://hudi.apache.org/docs/next/hoodie_streaming_ingestion#checkpointing and here https://hudi.apache.org/docs/next/configurations#Kafka-Source-Configs  
   
   You can try it and resolve this issue if HudiStreamer works now as you expect.


-- 
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: [I] [SUPPORT] Parameter `--checkpoint` is different for DebeziumSource [hudi]

Posted by "rangareddy (via GitHub)" <gi...@apache.org>.
rangareddy commented on issue #8522:
URL: https://github.com/apache/hudi/issues/8522#issuecomment-5149492725

   This has been addressed — closing.
   
   **Fixed by:**
   - [HUDI-6191](https://issues.apache.org/jira/browse/HUDI-6191) — Closed/Fixed, fixVersions **0.16.0** and **1.1.0**
   - #11686 (code, merged 2024-07-26) and #11690 (docs, merged 2024-07-27)
   
   **What changed.** You can now pass a bare offset instead of hand-building the
   `topic,partition:offset` string, by setting the checkpoint type:
   
   --checkpoint 106600
   --hoodie-conf hoodie.streamer.source.kafka.checkpoint.type=single_offset
   
   Internally `KafkaOffsetGen` performs exactly the rewrite you were doing manually
   (`topicName + ",0:" + offset`). It applies to single-partition topics only, and
   raises a clear error if the topic has more than one partition, where a single
   offset would be ambiguous. The original explicit form still works and remains
   the right choice for multi-partition topics:
   
   --checkpoint "users.public.transactions,0:106600"
   
   **Docs.** The checkpointing section now documents all three checkpoint types and
   their formats:
   - https://hudi.apache.org/docs/hoodie_streaming_ingestion#checkpointing
   - https://hudi.apache.org/docs/configurations#Kafka-Source-Configs
   
   One gap remains from the original report: those pages describe the format for
   Kafka sources generally, but don't call out Debezium sources by name. Since the
   Debezium sources are Kafka sources the format applies directly — but if a
   Debezium-specific example would still have saved you the search, a follow-up
   docs issue for that would be welcome.
   
   Thanks @sydneyhoran for writing this up so precisely, and @wombatu-kun for the
   implementation and doc fix.


-- 
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: [I] [SUPPORT] Parameter `--checkpoint` is different for DebeziumSource [hudi]

Posted by "rangareddy (via GitHub)" <gi...@apache.org>.
rangareddy closed issue #8522: [SUPPORT] Parameter `--checkpoint` is different for DebeziumSource
URL: https://github.com/apache/hudi/issues/8522


-- 
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] ad1happy2go commented on issue #8522: [SUPPORT] Parameter `--checkpoint` is different for DebeziumSource

Posted by "ad1happy2go (via GitHub)" <gi...@apache.org>.
ad1happy2go commented on issue #8522:
URL: https://github.com/apache/hudi/issues/8522#issuecomment-1538271008

   Thanks @sydneyhoran, Created the JIRA ticket to track this change - https://issues.apache.org/jira/browse/HUDI-6191


-- 
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 issue #8522: [SUPPORT] Parameter `--checkpoint` is different for DebeziumSource

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on issue #8522:
URL: https://github.com/apache/hudi/issues/8522#issuecomment-1517151256

   Thanks for the nice findings, would you mind fire a pr to the asf-site branch?


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