Class ChalkSinkConfig.Builder

java.lang.Object
ai.chalk.flink.core.ChalkSinkConfig.Builder
Enclosing class:
ChalkSinkConfig

public static final class ChalkSinkConfig.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • clientId

      public ChalkSinkConfig.Builder clientId(String v)
      Chalk client id (required).
    • clientSecret

      public ChalkSinkConfig.Builder clientSecret(String v)
      Chalk client secret (required).
    • apiServer

      public ChalkSinkConfig.Builder apiServer(String v)
      API server for token exchange. Defaults to https://api.chalk.ai.
    • environmentId

      public ChalkSinkConfig.Builder environmentId(String v)
      Target environment id. Defaults to the token's primary environment.
    • queryServer

      public ChalkSinkConfig.Builder queryServer(String v)
      Override the gRPC query/engine server. Defaults to the engine resolved from the token.
    • branch

      public ChalkSinkConfig.Builder branch(String v)
      Target a branch deployment instead of production.
    • batchSize

      public ChalkSinkConfig.Builder batchSize(int v)
      Flush when this many rows are buffered. Default 1000.
    • flushInterval

      public ChalkSinkConfig.Builder flushInterval(Duration v)
      Flush a non-empty buffer at least this often, in millis. Default 5000.
    • uploadTimeout

      public ChalkSinkConfig.Builder uploadTimeout(Duration v)
      Per-call upload deadline. Default 30s.
    • maxRetries

      public ChalkSinkConfig.Builder maxRetries(int v)
      Retries per batch on transient failures (in addition to the first attempt). Default 3.
    • retryBackoff

      public ChalkSinkConfig.Builder retryBackoff(Duration v)
      Base backoff between retries, in millis (doubled each attempt). Default 500.
    • failOnUploadErrors

      public ChalkSinkConfig.Builder failOnUploadErrors(boolean v)
      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 false to log a WARN and drop the rejected rows (at-least-once for the rest; the bad rows are lost).

    • writeOnline

      public ChalkSinkConfig.Builder writeOnline(boolean v)
      Write to the online store. Default true.
    • writeOffline

      public ChalkSinkConfig.Builder writeOffline(boolean v)
      Also write to the offline store. Default false. Requires a chalk-java version whose UploadFeaturesParams exposes write targets (see README "Write targets").
    • updateMataggs

      public ChalkSinkConfig.Builder updateMataggs(boolean v)
      Update materialized (streaming) aggregations on upload. Default false. Requires a chalk-java version whose UploadFeaturesParams exposes write targets.
    • build

      public ChalkSinkConfig build()