Class SpannerSourceConfig<T>

java.lang.Object
io.github.flink.gcp.connector.spanner.source.SpannerSourceConfig<T>
Type Parameters:
T - the record type the deserializer produces
All Implemented Interfaces:
Serializable

@Internal public final class SpannerSourceConfig<T> extends Object implements Serializable
Everything the batch source was built with, assembled by the builder and carried into the job graph.

The partition hints travel as the client's own PartitionOptions, which is serializable and whose unset fields already mean "no hint" — so the builder's two knobs fold into one value here rather than into two longs that would have to be folded back at the call site.

See Also:
  • Method Details

    • getDatabase

      public DatabaseDestination getDatabase()
      Returns the database to read.
      Returns:
      the database
    • getReadOperation

      public SpannerReadOperation getReadOperation()
      Returns what to read.
      Returns:
      the read operation
    • getDeserializer

      public SpannerStructDeserializationSchema<T> getDeserializer()
      Returns the deserializer turning rows into records.
      Returns:
      the deserializer
    • getTimestampBound

      public com.google.cloud.spanner.TimestampBound getTimestampBound()
      Returns the snapshot to read at.
      Returns:
      the timestamp bound
    • getPartitionOptions

      public com.google.cloud.spanner.PartitionOptions getPartitionOptions()
      Returns the partition-count and partition-size hints.
      Returns:
      the partition options
    • isDataBoostEnabled

      public boolean isDataBoostEnabled()
      Returns whether the read runs on Data Boost's independent compute.
      Returns:
      whether Data Boost is enabled
    • getRpcPriority

      @Nullable public SpannerRpcPriority getRpcPriority()
      Returns the priority Spanner schedules the reads at.
      Returns:
      the priority, or null to leave it unset
    • getServiceAccountKeyFile

      @Nullable public String getServiceAccountKeyFile()
      Returns the service-account key-file path, or null when no override is configured.
    • getPlannerFactory

      public PartitionPlannerFactory getPlannerFactory()
      Returns the factory the source mints one planner per enumerator from.

      A factory rather than a planner because the JobManager holds one source object for a job's whole life, so a planner here would be shared by every enumerator a coordinator reset builds and the first teardown would refuse every later one (docs/adr/0128).

      Returns:
      the planner factory
    • getOpener

      public StructStreamOpener getOpener()
      Returns the seam the readers read through.
      Returns:
      the opener
    • getMaxRowsPerFetch

      public int getMaxRowsPerFetch()
      Returns how many rows one fetch hands to the task thread.
      Returns:
      the per-fetch row cap
    • getMaxBytesPerFetch

      public long getMaxBytesPerFetch()
      Returns the target maximum estimated bytes one fetch hands to the task thread.
      Returns:
      the per-fetch byte target