Skip to content

Tumbling-time-window

The tumbling-time-window creates a-per-worker tumbling time window. In this implementation a window aggregate is stored only in the machine's memory. The aggregate is emitted configured sink via a emit point.

Based on VoltAggregateBuilder each event is transformed into a request. If eventTimeSupplier is provided, it is used to source a time of the event. Lastly a key can be provided so incoming event is routed to the right local window and aggregated.

In case of downstream system error this tumbling-time-window will re-process events.

.consumeFromSource(...)
.terminateWithEmitter(TumblingTimeWindowConfiguratorBuilder.builder()
    .withWindowSpan(value)
    .withKeyExtractor(value)
    .withAggregateDefinition(value)
    .withEventTimeSupplier(value)
    .withExceptionHandler(value)
)
sink:
  tumbling-time-window:
    windowSpan: value
    keyExtractor: value
    aggregateDefinition: value
    eventTimeSupplier: value
    exceptionHandler: value

Java dependency management

Add this declaration to your dependency management system to access the configuration DSL for this plugin in Java.

<dependency>
    <groupId>org.voltdb</groupId>
    <artifactId>volt-stream-plugin-window-api</artifactId>
    <version>1.6.0</version>
</dependency>
implementation group: 'org.voltdb', name: 'volt-stream-plugin-window-api', version: '1.6.0'

Properties

windowSpan

Defines window time span, after which the window is closed. Required.

Type: object

keyExtractor

The key is optional, if set the window will aggregate only events with the same key value. The key has to conform to Java equal and hashCode contract. Type: object

aggregateDefinition

The aggregate is defined by the provided builder Required.

Type: object

eventTimeSupplier

If provided, the time will be sourced from the event. Otherwise time will be taken from local machine when the event is processed. Type: object

exceptionHandler

Custom exception handler enabling interception of all errors related to this emitter. Type: object

JSON Schema

You can validate or explore the configuration using its JSON Schema.