I am implementing custom operator which has large state (which may not fit in memory). I am trying to use ListState for this purpose. I am using
checkpointedState = context.getOperatorStateStore().getListState(descriptor);
as mentioned in https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/stream/state.html#using-managed-operator-state
Implementation of snapshotState() in the above link clears the checkpointedState and then add elements from in-memory data structure to checkpointedState.
Instead I need something like below in the snapshotState():
- Remove specific entries for checkpointedState instead of clear().
- Add new elements from in-memory data structure to checkpointedState.
Is there any way to selectively remove items from ListState?