Actually each element of mapwithstate has a time out component. You can write
a function to "treat" your time out.

You can match it with your batch size and do fun stuff when the batch ends.

People do session management with the same approach.
When activity is registered the session is refreshed, and the session is
deleted("one way to treat it") when time out happens.


View this message in context:
Sent from the Apache Spark User List mailing list archive at

To unsubscribe e-mail:

Reply via email to