Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EH - Trigger once #666

Open
rbushri opened this issue Feb 9, 2023 · 1 comment
Open

EH - Trigger once #666

rbushri opened this issue Feb 9, 2023 · 1 comment

Comments

@rbushri
Copy link

rbushri commented Feb 9, 2023

I want to create a cron job that read from EH (with checkpoint) processes the new msgs and terminates, so I tried to run this code:

 spark.readStream.format("eventhubs").options(...).load()
.writeStream
.option("checkpointLocation",checkpointLocationPath)
.trigger(Trigger.Once())
.foreachBatch((ds : Dataset[String],id : Long) => {..}
.start()
.awaitTermination()

And I expected the job to run once and terminates but the job keeps running and ignores the trigger,
I also tried to remove the .awaitTermination() but the job didn't read anything from EH at all.
what did I do wrong?

@ronban
Copy link

ronban commented May 2, 2023

I am facing the same issue on GCP Dataproc Batches. The job doesnt end. I have to use cancel after 30 seconds to manually end the job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants