Tumbling-count-window¶
The tumbling-count-window creates a-per-worker tumbling count window. In this implementation a window aggregate is stored only in the machine's memory.
The aggregate is emitted to configured sink via a emit point.
Based on VoltAggregateBuilder each event is transformed into a request.
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-count-window will re-process events.
.consumeFromSource(...)
.terminateWithEmitter(TumblingCountingWindowConfiguratorBuilder.builder()
.withMaxEventsPerWindow(value)
.withKeyExtractor(value)
.withAggregateDefinition(value)
.withExceptionHandler(value)
)
sink:
tumbling-count-window:
maxEventsPerWindow: value
keyExtractor: value
aggregateDefinition: 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¶
maxEventsPerWindow¶
Defines how many events this window can accumulate before it gets closed. Must be greater than 0
Type: number
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
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.