Volt-tumbling-count-window¶
The volt-tumbling-count-window creates a partitioned, distributed tumbling count window. In this implementation VoltDB acts as a storage for the window aggregate.
The aggregate is emitted using VoltDB stream feature - so this implementation expects a topic to be defined in Volt's deployment file.
The volt-tumbling-count-window, during configuration phase, generates code for VoltSP side to extract fields necessary for aggregate update.
It also automatically generates and loads schema and procedures into VoltDB. For now, only deployment file needs to be manually updated.
Based on VoltAggregateBuilder each event is transformed into a request.
Lastly a partition key is extracted, and payload is routed to the right partition in VoltDB.
In case of downstream system error this volt-tumbling-count-window will re-process events.
.consumeFromSource(...)
.terminateWithEmitter(VoltTumblingCountWindowConfiguratorBuilder.builder()
.withMaxEventsPerWindow(value)
.withPartitionKeyExtractor(value)
.withAggregateDefinition(value)
.withVoltClientResource(value)
.withServers(value)
.withBatchSize(value)
.withFlushInterval(value)
.withClient(builder -> builder
.withRetry(builder -> builder
.withRetries(value)
.withBackoffDelay(value)
.withMaxBackoffDelay(value)
)
.withMaxTransactionsPerSecond(value)
.withMaxOutstandingTransactions(value)
.withRequestTimeout(value)
.withAuth(builder -> builder
.withUsername(value)
.withPassword(value)
)
.withSsl(builder -> builder
.withTrustStoreFile(value)
.withTrustStorePassword(value)
.withKeyStoreFile(value)
.withKeyStorePassword(value)
.withKeyPassword(value)
.withInsecure(value)
.withHostnameVerifier(value)
)
)
.withExceptionHandler(value)
)
sink:
volt-tumbling-count-window:
maxEventsPerWindow: value
partitionKeyExtractor: value
aggregateDefinition: value
voltClientResource: value
servers: value
batchSize: value
flushInterval: value
client:
retry:
retries: value
backoffDelay: value
maxBackoffDelay: value
maxTransactionsPerSecond: value
maxOutstandingTransactions: value
requestTimeout: value
auth:
username: value
password: value
ssl:
trustStoreFile: value
trustStorePassword: value
keyStoreFile: value
keyStorePassword: value
keyPassword: value
insecure: value
hostnameVerifier: 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-volt-api</artifactId>
<version>1.6.0</version>
</dependency>
implementation group: 'org.voltdb', name: 'volt-stream-plugin-volt-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
partitionKeyExtractor¶
The partition is determined by hashing the value extracted from the message using this class. Required.
Type: object
aggregateDefinition¶
The aggregate is defined by the provided builder Required.
Type: object
voltClientResource¶
Client resource reference to be used when connecting to VoltDb cluster Required.
Type: object
servers¶
A set of host and port addresses for connecting to the VoltDB cluster. Only one address is sufficient for cluster topology discovery.
Type: array
batchSize¶
The maximum number of records to include in a single batch before inserting data into VoltDB. Higher values can improve throughput but will increase memory usage.
Type: number
Default value: 100000
flushInterval¶
The time interval after which batch is flushed to VoltDB, even if the desired batch size is not reached.
Type: object
Default value: 1s
client¶
Configuration settings for the VoltDB client, including authentication, retry policies, and performance limits.
Type: object
Fields of client:
client.retry¶
Configuration for retrying failed operations, including the number of retries and backoff delays.
Type: object
Fields of client.retry:
client.retry.retries¶
Number of retry attempts after a request failure.
Type: number
Default value: 3
client.retry.backoffDelay¶
Initial delay before the first retry attempt.
Type: object
Default value: PT0.2S
client.retry.maxBackoffDelay¶
Maximum delay between consecutive retry attempts.
Type: object
Default value: PT3S
client.maxTransactionsPerSecond¶
The maximum number of transactions allowed per second to control the rate of operations.
Type: number
client.maxOutstandingTransactions¶
The maximum number of outstanding transactions allowed, limiting concurrent operations.
Type: number
client.requestTimeout¶
The timeout duration for client requests to VoltDB, after which a request is considered failed.
Type: object
client.auth¶
Client credentials for authenticating to the VoltDB cluster.
Type: object
Fields of client.auth:
client.auth.username¶
Username used for authentication.
Type: string
client.auth.password¶
Password used for authentication.
Type: string
client.ssl¶
Client configuration for secure transport to the VoltDB cluster.
Type: object
Fields of client.ssl:
client.ssl.trustStoreFile¶
Truststore file or trusted CA certificate; supported formats include JKS, PKCS#12, or PEM.
Type: string
client.ssl.trustStorePassword¶
Truststore password.
Type: string
client.ssl.keyStoreFile¶
Keystore file; supported formats include JKS, PKCS#12, or PEM
Type: string
client.ssl.keyStorePassword¶
Keystore password.
Type: string
client.ssl.keyPassword¶
Private key password. Optional — if not set, the key store password will be used.
Type: string
client.ssl.insecure¶
If set to true, disables SSL certificate and hostname validation. Intended for debugging purposes only. Doesn't work with mTLS.
Type: boolean
client.ssl.hostnameVerifier¶
Custom hostname verifier for SSL connections. If not specified and 'insecure' is true, hostname verification will be disabled.
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.