Class EnhancedBigtableStubSettings

java.lang.Object
com.google.api.gax.rpc.StubSettings<EnhancedBigtableStubSettings>
com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings

public class EnhancedBigtableStubSettings extends com.google.api.gax.rpc.StubSettings<EnhancedBigtableStubSettings>
Settings class to configure an instance of EnhancedBigtableStub.

Sane defaults are provided for most settings:

  • The default service address (bigtable.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The only required setting is the instance name.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.


 BigtableDataSettings.Builder settingsBuilder = BigtableDataSettings.newBuilder()
   .setProjectId("my-project-id")
   .setInstanceId("my-instance-id")
   .setAppProfileId("default");

 settingsBuilder.readRowsSettings()
  .setRetryableCodes(Code.DEADLINE_EXCEEDED, Code.UNAVAILABLE);

 BigtableDataSettings settings = builder.build();
 
  • Method Details

    • newBuilder

      public static EnhancedBigtableStubSettings.Builder newBuilder()
      Create a new builder.
    • getProjectId

      public String getProjectId()
      Returns the project id of the target instance.
    • getInstanceId

      public String getInstanceId()
      Returns the target instance id.
    • getAppProfileId

      public String getAppProfileId()
      Returns the configured AppProfile to use
    • isRefreshingChannel

      @Deprecated public boolean isRefreshingChannel()
      Deprecated.
      Channel refreshing is enabled by default and this method will be deprecated.
      Returns if channels will gracefully refresh connections to Cloud Bigtable service
    • getPrimedTableIds

      @Deprecated public List<String> getPrimedTableIds()
      Deprecated.
      This field is ignored. If isRefreshingChannel() is enabled, warm up requests will be sent to all table ids of the instance.
    • getJwtAudienceMapping

      @InternalApi("Used for internal testing") public Map<String,String> getJwtAudienceMapping()
    • getEnableRoutingCookie

      @BetaApi("Routing cookie is not currently stable and may change in the future") public boolean getEnableRoutingCookie()
      Gets if routing cookie is enabled. If true, client will retry a request with extra metadata server sent back.
    • getEnableRetryInfo

      @BetaApi("RetryInfo is not currently stable and may change in the future") public boolean getEnableRetryInfo()
      Gets if RetryInfo is enabled. If true, client bases retry decision and back off time on server returned RetryInfo value. Otherwise, client uses RetrySettings.
    • defaultGrpcTransportProviderBuilder

      public static com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()
      Returns a builder for the default ChannelProvider for this service.
    • defaultTransportChannelProvider

      public static com.google.api.gax.rpc.TransportChannelProvider defaultTransportChannelProvider()
    • defaultCredentialsProviderBuilder

      public static com.google.api.gax.core.GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()
      Returns a builder for the default credentials for this service.
    • readRowsSettings

      public com.google.api.gax.rpc.ServerStreamingCallSettings<Query,Row> readRowsSettings()
      Returns the object with the settings used for calls to ReadRows.

      This is idempotent and streaming operation.

      Default retry and timeout settings:

      • Default idle timeout is set to 5 mins. Idle timeout is how long to wait before considering the stream orphaned by the user and closing it.
      • Default wait timeout is set to 5 mins. Wait timeout is the maximum amount of time to wait for the next message from the server.
      • Retry error codes are: StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE and StatusCode.Code.ABORTED.
      • RetryDelay between failed attempts starts at 10ms and increases exponentially by a factor of 2 until a maximum of 1 minute.
      • The default read timeout for each attempt is 30 minutes with maximum attempt count of 10 times and the timeout to read the entire stream is 12 hours.
    • sampleRowKeysSettings

      public com.google.api.gax.rpc.UnaryCallSettings<String,List<KeyOffset>> sampleRowKeysSettings()
      Returns the object with the settings used for calls to SampleRowKeys.

      This is idempotent and non-streaming operation.

      Default retry and timeout settings:

      • Retry error codes are: StatusCode.Code.DEADLINE_EXCEEDED and StatusCode.Code.UNAVAILABLE.
      • RetryDelay between failed attempts starts at 10ms and increases exponentially by a factor of 2 until a maximum of 1 minute.
      • The default timeout for each attempt is 5 minutes and the timeout for the entire operation across all of the attempts is 10 mins.
    • readRowSettings

      public com.google.api.gax.rpc.UnaryCallSettings<Query,Row> readRowSettings()
      Returns the object with the settings used for point reads via ReadRows.

      This is an idempotent and non-streaming operation.

      Default retry and timeout settings:

      • Retry error codes are: StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE and StatusCode.Code.ABORTED.
      • RetryDelay between failed attempts starts at 10ms and increases exponentially by a factor of 2 until a maximum of 1 minute.
      • The default timeout for each attempt is 20 seconds and the timeout for the entire operation across all of the attempts is 10 mins.
      See Also:
      • for more explanation.
    • mutateRowSettings

      public com.google.api.gax.rpc.UnaryCallSettings<RowMutation,Void> mutateRowSettings()
      Returns the object with the settings used for calls to MutateRow.

      This is an idempotent and non-streaming operation.

      Default retry and timeout settings:

      • Retry error codes are: StatusCode.Code.DEADLINE_EXCEEDED and StatusCode.Code.UNAVAILABLE.
      • RetryDelay between failed attempts starts at 10ms and increases exponentially by a factor of 2 until a maximum of 60 seconds.
      • The default timeout for each attempt is 20 seconds and the timeout for the entire operation across all of the attempts is 10 mins.
      See Also:
      • for more explanation.
    • bulkMutateRowsSettings

      public BigtableBatchingCallSettings bulkMutateRowsSettings()
      Returns the object with the settings used for calls to MutateRows.

      Please note that these settings will affect both manually batched calls (bulkMutateRowsCallable) and automatic batched calls (bulkMutateRowsBatchingCallable). The RowMutation request signature is ignored for the manual batched calls.

      Default retry and timeout settings:

      • Retry error codes are: StatusCode.Code.DEADLINE_EXCEEDED and StatusCode.Code.UNAVAILABLE.
      • RetryDelay between failed attempts starts at 10ms and increases exponentially by a factor of 2 until a maximum of 1 minute.
      • The default timeout for each attempt is 1 minute and the timeout for the entire operation across all of the attempts is 10 mins.

      On breach of certain triggers, the operation initiates processing of accumulated request for which the default settings are:

      • When the request count reaches 100.
      • When accumulated request size reaches to 20MB.
      • When an interval of 1 second passes after batching initialization or last processed batch.

      A FlowController will be set up with #getDynamicFlowControlSettings() for throttling in-flight requests. When the pending request count or accumulated request size reaches FlowController thresholds, then this operation will be throttled until some of the pending batches are resolved.

      See Also:
      • for more explanation.
      • for batch related configuration explanation.
      • for flow control related configuration explanation.
    • bulkReadRowsSettings

      public BigtableBulkReadRowsCallSettings bulkReadRowsSettings()
      Returns the call settings used for bulk read rows.

      Default retry and timeout settings:

      • Retry error codes are: StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE and StatusCode.Code.ABORTED.
      • RetryDelay between failed attempts starts at 10ms and increases exponentially by a factor of 2 until a maximum of 1 minute.
      • The default timeout for each attempt is 5 minute and the timeout for the entire operation across all of the attempts is 10 mins.

      On breach of certain triggers, the operation initiates processing of accumulated request for which the default settings are:

      • When the request count reaches 100.
      • When accumulated request size reaches to 400KB.
      • When an interval of 1 second passes after batching initialization or last processed batch.

      When the pending request count reaches a default of 1000 outstanding row keys per channel then this operation will by default be blocked until some of the pending batch are resolved.

      See Also:
      • for more explanation.
      • for batch related configuration explanation.
    • checkAndMutateRowSettings

      public com.google.api.gax.rpc.UnaryCallSettings<ConditionalRowMutation,Boolean> checkAndMutateRowSettings()
      Returns the object with the settings used for calls to CheckAndMutateRow.

      This is a non-idempotent and non-streaming operation.

      By default this operation does not reattempt in case of RPC failure. The default timeout for the entire operation is 20 seconds.

      See Also:
      • for more explanation.
    • readModifyWriteRowSettings

      public com.google.api.gax.rpc.UnaryCallSettings<ReadModifyWriteRow,Row> readModifyWriteRowSettings()
      Returns the object with the settings used for calls to ReadModifyWriteRow.

      This is a non-idempotent and non-streaming operation.

      By default this operation does not reattempt in case of RPC failure. The default timeout for the entire operation is 20 seconds.

      See Also:
      • for more explanation.
    • generateInitialChangeStreamPartitionsSettings

      public com.google.api.gax.rpc.ServerStreamingCallSettings<String,Range.ByteStringRange> generateInitialChangeStreamPartitionsSettings()
    • readChangeStreamSettings

      public com.google.api.gax.rpc.ServerStreamingCallSettings<ReadChangeStreamQuery,ChangeStreamRecord> readChangeStreamSettings()
    • toBuilder

      Returns a builder containing all the values of this settings class.
      Specified by:
      toBuilder in class com.google.api.gax.rpc.StubSettings<EnhancedBigtableStubSettings>
    • toString

      public String toString()
      Overrides:
      toString in class com.google.api.gax.rpc.StubSettings<EnhancedBigtableStubSettings>