Returns a DStream containing only state changes within the input DStream.
Returns a DStream containing only state changes within the input DStream. State change is defined by isStateChange.
Example:
val stateStream = BatchStateUtils .removeDuplicateEventsFromStream(rawStream, (a: TimeRecord, b: TimeRecord) => a.getBoolean("state") != b.getBoolean("state"), TimeRecord.TimeOrder)
stream of readings with a partition key.
function that checks whether adjacent readings show a state change
stream of readings that correspond state changes
Utilities to handle states between micro batches.