Removing TTL expired keys in Flink Mapstate -


i need ability remove old keys map state older fixed amount of time. keep timestamps of each event in the key state map, , i'd have ansyncronous process remove these stale keys.

i'm using rocksdb state backend, , don't think java api of rocksdb supports open ttl noted here.

so questions are:

  • is @ possible have async thread has access mapstate since runs in operator function?
  • is there better practice in case?

thanks in advance,

one straightforward approach expiring state in flink use processfunction operator hold state. can use timer (either processing time timer or event time timer, depending on makes sense application) , clear state in ontimer method.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -