Class SpannerConfig

  • All Implemented Interfaces:
    java.io.Serializable

    public abstract class SpannerConfig
    extends java.lang.Object
    implements java.io.Serializable
    Configuration for a Cloud Spanner client.
    See Also:
    Serialized Form
    • Constructor Detail

      • SpannerConfig

        public SpannerConfig()
    • Method Detail

      • getProjectId

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String> getProjectId()
      • getInstanceId

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String> getInstanceId()
      • getDatabaseId

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String> getDatabaseId()
      • getHost

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String> getHost()
      • getHostValue

        public java.lang.String getHostValue()
      • getEmulatorHost

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String> getEmulatorHost()
      • getIsLocalChannelProvider

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> getIsLocalChannelProvider()
      • getCommitDeadline

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> getCommitDeadline()
      • getMaxCumulativeBackoff

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> getMaxCumulativeBackoff()
      • getExecuteStreamingSqlRetrySettings

        public abstract @Nullable com.google.api.gax.retrying.RetrySettings getExecuteStreamingSqlRetrySettings()
      • getCommitRetrySettings

        public abstract @Nullable com.google.api.gax.retrying.RetrySettings getCommitRetrySettings()
      • getRetryableCodes

        public abstract @Nullable org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableSet<com.google.api.gax.rpc.StatusCode.Code> getRetryableCodes()
      • getRpcPriority

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<com.google.cloud.spanner.Options.RpcPriority> getRpcPriority()
      • getMaxCommitDelay

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> getMaxCommitDelay()
      • getDatabaseRole

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String> getDatabaseRole()
      • getPartitionQueryTimeout

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> getPartitionQueryTimeout()
      • getPartitionReadTimeout

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> getPartitionReadTimeout()
      • getDataBoostEnabled

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> getDataBoostEnabled()
      • getCredentials

        public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<com.google.auth.Credentials> getCredentials()
      • validate

        public void validate()
      • populateDisplayData

        public void populateDisplayData​(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
      • withProjectId

        public SpannerConfig withProjectId​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> projectId)
        Specifies the Cloud Spanner project ID.
      • withProjectId

        public SpannerConfig withProjectId​(java.lang.String projectId)
        Specifies the Cloud Spanner project ID.
      • withInstanceId

        public SpannerConfig withInstanceId​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> instanceId)
        Specifies the Cloud Spanner instance ID.
      • withInstanceId

        public SpannerConfig withInstanceId​(java.lang.String instanceId)
        Specifies the Cloud Spanner instance ID.
      • withDatabaseId

        public SpannerConfig withDatabaseId​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> databaseId)
        Specifies the Cloud Spanner database ID.
      • withDatabaseId

        public SpannerConfig withDatabaseId​(java.lang.String databaseId)
        Specifies the Cloud Spanner database ID.
      • withHost

        public SpannerConfig withHost​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> host)
        Specifies the Cloud Spanner host.
      • withEmulatorHost

        public SpannerConfig withEmulatorHost​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> emulatorHost)
        Specifies the Cloud Spanner host, when an emulator is used.
      • withIsLocalChannelProvider

        public SpannerConfig withIsLocalChannelProvider​(org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> isLocalChannelProvider)
        Specifies whether a local channel provider should be used. This should be set to True when an emulator is used.
      • withCommitDeadline

        public SpannerConfig withCommitDeadline​(org.joda.time.Duration commitDeadline)
        Specifies the commit deadline. This is overridden if the CommitRetrySettings is specified.
      • withCommitDeadline

        public SpannerConfig withCommitDeadline​(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> commitDeadline)
        Specifies the commit deadline. This is overridden if the CommitRetrySettings is specified.
      • withMaxCumulativeBackoff

        public SpannerConfig withMaxCumulativeBackoff​(org.joda.time.Duration maxCumulativeBackoff)
        Specifies the maximum cumulative backoff.
      • withMaxCumulativeBackoff

        public SpannerConfig withMaxCumulativeBackoff​(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> maxCumulativeBackoff)
        Specifies the maximum cumulative backoff.
      • withExecuteStreamingSqlRetrySettings

        public SpannerConfig withExecuteStreamingSqlRetrySettings​(com.google.api.gax.retrying.RetrySettings executeStreamingSqlRetrySettings)
        Specifies the ExecuteStreamingSql retry settings. If not set, the default timeout is set to 2 hours.
      • withCommitRetrySettings

        public SpannerConfig withCommitRetrySettings​(com.google.api.gax.retrying.RetrySettings commitRetrySettings)
        Specifies the commit retry settings. Setting this overrides the commit deadline.
      • withRetryableCodes

        public SpannerConfig withRetryableCodes​(org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableSet<com.google.api.gax.rpc.StatusCode.Code> retryableCodes)
        Specifies the errors that will be retried by the client library for all operations.
      • withRpcPriority

        public SpannerConfig withRpcPriority​(com.google.cloud.spanner.Options.RpcPriority rpcPriority)
        Specifies the RPC priority.
      • withRpcPriority

        public SpannerConfig withRpcPriority​(org.apache.beam.sdk.options.ValueProvider<com.google.cloud.spanner.Options.RpcPriority> rpcPriority)
        Specifies the RPC priority.
      • withMaxCommitDelay

        public SpannerConfig withMaxCommitDelay​(long millis)
      • withMaxCommitDelay

        public SpannerConfig withMaxCommitDelay​(org.joda.time.Duration maxCommitDelay)
        Specifies the max commit delay for high throughput writes.
      • withMaxCommitDelay

        public SpannerConfig withMaxCommitDelay​(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> maxCommitDelay)
        Specifies the max commit delay for high throughput writes.
      • withDatabaseRole

        public SpannerConfig withDatabaseRole​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> databaseRole)
        Specifies the Cloud Spanner database role.
      • withDataBoostEnabled

        public SpannerConfig withDataBoostEnabled​(org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> dataBoostEnabled)
        Specifies if the pipeline has to be run on the independent compute resource.
      • withPartitionQueryTimeout

        public SpannerConfig withPartitionQueryTimeout​(org.joda.time.Duration partitionQueryTimeout)
        Specifies the PartitionQuery timeout.
      • withPartitionQueryTimeout

        public SpannerConfig withPartitionQueryTimeout​(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> partitionQueryTimeout)
        Specifies the PartitionQuery timeout.
      • withPartitionReadTimeout

        public SpannerConfig withPartitionReadTimeout​(org.joda.time.Duration partitionReadTimeout)
        Specifies the PartitionRead timeout.
      • withPartitionReadTimeout

        public SpannerConfig withPartitionReadTimeout​(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> partitionReadTimeout)
        Specifies the PartitionRead timeout.
      • withCredentials

        public SpannerConfig withCredentials​(com.google.auth.Credentials credentials)
        Specifies the credentials.
      • withCredentials

        public SpannerConfig withCredentials​(org.apache.beam.sdk.options.ValueProvider<com.google.auth.Credentials> credentials)
        Specifies the credentials.