Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Changes to the Evictor interface :  addition of two new methods evictBefore and evictAfter, removal of the existing evict method
  • Corresponding changes to CountEvicot, DeltaEvictor
  • Renaming of the existing TimeEvictor as ProcessingTimeEvictor(since the current behavior of TimeEvictor does not consider the EventTime of the records) and addition of new class EventTimeEvictor.
  • New overloaded method CountEvictor.of() that takes an additional parameter doEvictAfter, which decides whether to do eviction after the WindowFunction.
  • Similar overloaded methods in DeltaEvictor, ProcessingTimeEvictor and EventTimeEvictor.

...

The Evictor has two methods, evictBefore  - called before the WindowFunction - and evictAfter - called after the WindowFunction. These methods receive an Iterable of all the elements in the pane and the number of elements in the pane. Evictor can choose to remove elements from the Iterable based on any condition that a user wish wishes to implement. The EvictorContext is an interface very similar to TriggerContext but for evictorsEvictors, I’m omitting it for brevity.

...

  • Users currently using TimeEvictor will have to refactor the code to use ProcessingTimeEvictor.
  • Users currently using DeltaEvictor will have to be aware that the new implementation will apply the delta function to all the elements in the window(not till it finds the first element in the pane)
  • Users who have currently implemented CustomEvictor a custom Evictor will have to adopt adapt to the new interface of the Evictor.
  • CountEvictor will behave the same even after these changes.
  • By default all By default, all Evictors will evict before the WindowFunction, which matches the existing behavior.