Q:

Spark Streaming with Kinesis - How to force checkpoint? 

I have a streaming application that reads data from Aws Kinesis. 
By default when you create the stream receivers you can choose at which interval to do the checkpoint, that is done on DynamoDB. 
At a certain point I would like to stop my application (sparkStreamingContext.stop()) but before that I would like to force a checkpoint. 
Is it possible to do that? 
I know that if the checkpoint would be on a filesystem I should do sparkStreamingContext.checkpoint(directoryName) but the checkpoint for kinesis is on DynamoDB, so how can I do it? 
Thanks! 

A:

Forcing a checkpoint isn't possible.  Checkpointing is sort of an implementation detail of Spark in a means to do recovery and guarantee delivery of messages.,  thus you can't simply "invoke a checkpoint" as you wish. 
If you really want to control when saving of the data happens, you'll need to also manage the state yourself.