Is it possible to have a batch job produce a savep...
# troubleshooting
m
Is it possible to have a batch job produce a savepoint for the end of its input? To bootstrap state so that a streaming job can start where it left off?
I see mentioned in documentation that it could be available in the future, I am wondering what the status is?
m
What do you mean by that? Trigger a snapshot with a Savepoint crd? or is there a field on the job crd that tells it to take a savepoint at the end of the batch job? I didn't see anything like that?
j
sorry wrong thread 😐
m
no worries!
j
But I might have an answer from you… the way we do it is by having the bounded source (bootstrap) and unbounded one (kafka) in the same job (flink sql) and doing the cutover date in a view downstream that union both sources. So the finished task (bounded source) will remain completed on restarts/upgrades.
Having idempotency on the row/data makes it much easier too.
If you are usng datastream api have a look at hybrid source https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/datastream/hybridsource/ this is probably what you’re looking for
m
Yeah thanks for the response! We're using DataStreams and I've been looking into the HybridSource for a while now, but I think we still need the inputs to be sorted like batch mode does, so we likely will need something in addition to using the HybridSource. I saw that there is some work being done in a FLIP to allow a job to transition seamlessly from batch mode to streaming mode, I think that will be what we need once it's available. I'm wondering if there's a stopgap we can use until that is available to run a batch job then restart as a streaming one
Bumping this question. I see some places in the documentation it is mentioned that making a checkpoint upon completion of a batch job is something that is planned. It would be very useful to us for bootstrapping state. I was wondering if there is an issue tracking this?