Package ai.chalk.flink.core
Class ChalkSinkConfig.Builder
java.lang.Object
ai.chalk.flink.core.ChalkSinkConfig.Builder
- Enclosing class:
- ChalkSinkConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAPI server for token exchange.batchSize(int v) Flush when this many rows are buffered.Target a branch deployment instead of production.build()Chalk client id (required).Chalk client secret (required).Target environment id.failOnUploadErrors(boolean v) When true (default), a batch whose response carries engine data-level errors fails the sink.Flush a non-empty buffer at least this often, in millis.maxRetries(int v) Optional hard cap on retries per batch, in addition to the first attempt.Override the gRPC query/engine server.Base backoff between retries, in millis (doubled each attempt, capped at 30s).Total wall-clock budget for retrying one batch's transient failures.updateMataggs(boolean v) Update materialized (streaming) aggregations on upload.Per-call upload deadline.writeOffline(boolean v) Also write to the offline store.writeOnline(boolean v) Write to the online store.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
clientId
Chalk client id (required). -
clientSecret
Chalk client secret (required). -
apiServer
API server for token exchange. Defaults tohttps://api.chalk.ai. -
environmentId
Target environment id. Defaults to the token's primary environment. -
queryServer
Override the gRPC query/engine server. Defaults to the engine resolved from the token. -
branch
Target a branch deployment instead of production. -
batchSize
Flush when this many rows are buffered. Default 1000. -
flushInterval
Flush a non-empty buffer at least this often, in millis. Default 5000. -
uploadTimeout
Per-call upload deadline. Default 30s. -
maxRetries
Optional hard cap on retries per batch, in addition to the first attempt. Unlimited by default —retryTimeout(java.time.Duration)is the primary bound. Set this only to stop retrying after a fixed number of attempts regardless of how much time budget remains. -
retryBackoff
Base backoff between retries, in millis (doubled each attempt, capped at 30s). Default 500. -
retryTimeout
Total wall-clock budget for retrying one batch's transient failures. Default 120s, chosen to outlast a routine query-server rollout: a shorter budget surfaces the outage as a Flink task failure and a restart from the last checkpoint.Retries block the task thread, so this is also the worst-case stall for the subtask. Keep it below the checkpoint timeout.
-
failOnUploadErrors
When true (default), a batch whose response carries engine data-level errors fails the sink.Poison-pill warning: data-level errors (e.g. a bad feature type) are deterministic — unlike transient transport errors, replaying the same batch after a checkpoint restart reproduces the same error, wedging the pipeline in a restart loop with no forward progress. If your stream may contain individually-invalid rows, either fix them upstream or set this
falseto log a WARN and drop the rejected rows (at-least-once for the rest; the bad rows are lost). -
writeOnline
Write to the online store. Default true. -
writeOffline
Also write to the offline store. Default false. Requires a chalk-java version whoseUploadFeaturesParamsexposes write targets (see README "Write targets"). -
updateMataggs
Update materialized (streaming) aggregations on upload. Default false. Requires a chalk-java version whoseUploadFeaturesParamsexposes write targets. -
build
-