Class EnhancedBigtableStubSettings (2.44.0)

public class EnhancedBigtableStubSettings extends 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.stubSettings().readRowsSettings()
  .setRetryableCodes(Code.DEADLINE_EXCEEDED, Code.UNAVAILABLE);

 BigtableDataSettings settings = builder.build();
 

Inheritance

java.lang.Object > StubSettings > EnhancedBigtableStubSettings

Static Methods

defaultCredentialsProviderBuilder()

public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()

Returns a builder for the default credentials for this service.

Returns
Type Description
Builder

defaultGrpcTransportProviderBuilder()

public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()

Returns a builder for the default ChannelProvider for this service.

Returns
Type Description
Builder

defaultTransportChannelProvider()

public static TransportChannelProvider defaultTransportChannelProvider()
Returns
Type Description
TransportChannelProvider

newBuilder()

public static EnhancedBigtableStubSettings.Builder newBuilder()

Create a new builder.

Returns
Type Description
EnhancedBigtableStubSettings.Builder

Methods

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: Code#DEADLINE_EXCEEDED and 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: RetrySettingsfor more explanation., BatchingSettingsfor batch related configuration explanation., BigtableBatchingCallSettings.Builder#getDynamicFlowControlSettings()for flow control related configuration explanation.

Returns
Type Description
com.google.cloud.bigtable.data.v2.stub.BigtableBatchingCallSettings

bulkReadRowsSettings()

public BigtableBulkReadRowsCallSettings bulkReadRowsSettings()

Returns the call settings used for bulk read rows.

Default retry and timeout settings:

  • Retry error codes are: Code#DEADLINE_EXCEEDED, Code#UNAVAILABLE and 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: RetrySettingsfor more explanation., BatchingSettingsfor batch related configuration explanation.

Returns
Type Description
com.google.cloud.bigtable.data.v2.stub.BigtableBulkReadRowsCallSettings

checkAndMutateRowSettings()

public 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: RetrySettingsfor more explanation.

Returns
Type Description
UnaryCallSettings<ConditionalRowMutation,Boolean>

executeQuerySettings()

public ServerStreamingCallSettings<Statement,SqlRow> executeQuerySettings()
Returns
Type Description
ServerStreamingCallSettings<Statement,com.google.cloud.bigtable.data.v2.internal.SqlRow>

generateInitialChangeStreamPartitionsSettings()

public ServerStreamingCallSettings<String,Range.ByteStringRange> generateInitialChangeStreamPartitionsSettings()
Returns
Type Description
ServerStreamingCallSettings<String,ByteStringRange>

getAppProfileId()

public String getAppProfileId()

Returns the configured AppProfile to use

Returns
Type Description
String

getEnableRetryInfo()

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.

Returns
Type Description
boolean

getEnableRoutingCookie()

public boolean getEnableRoutingCookie()

Gets if routing cookie is enabled. If true, client will retry a request with extra metadata server sent back.

Returns
Type Description
boolean

getInstanceId()

public String getInstanceId()

Returns the target instance id.

Returns
Type Description
String

getJwtAudienceMapping()

public Map<String,String> getJwtAudienceMapping()
Returns
Type Description
Map<String,String>

getMetricsProvider()

public MetricsProvider getMetricsProvider()
Returns
Type Description
com.google.cloud.bigtable.data.v2.stub.metrics.MetricsProvider

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.

Returns
Type Description
List<String>

getProjectId()

public String getProjectId()

Returns the project id of the target instance.

Returns
Type Description
String

getServiceName()

public String getServiceName()
Returns
Type Description
String
Overrides

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

Returns
Type Description
boolean

mutateRowSettings()

public 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: Code#DEADLINE_EXCEEDED and 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: RetrySettingsfor more explanation.

Returns
Type Description
UnaryCallSettings<RowMutation,Void>

readChangeStreamSettings()

public ServerStreamingCallSettings<ReadChangeStreamQuery,ChangeStreamRecord> readChangeStreamSettings()
Returns
Type Description
ServerStreamingCallSettings<ReadChangeStreamQuery,ChangeStreamRecord>

readModifyWriteRowSettings()

public 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: RetrySettingsfor more explanation.

Returns
Type Description
UnaryCallSettings<ReadModifyWriteRow,Row>

readRowSettings()

public 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: Code#DEADLINE_EXCEEDED, Code#UNAVAILABLE and 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: RetrySettingsfor more explanation.

Returns
Type Description
UnaryCallSettings<Query,Row>

readRowsSettings()

public 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: Code#DEADLINE_EXCEEDED, Code#UNAVAILABLE and 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.
Returns
Type Description
ServerStreamingCallSettings<Query,Row>

sampleRowKeysSettings()

public 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: Code#DEADLINE_EXCEEDED and 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.
Returns
Type Description
UnaryCallSettings<String,List<KeyOffset>>

toBuilder()

public EnhancedBigtableStubSettings.Builder toBuilder()

Returns a builder containing all the values of this settings class.

Returns
Type Description
EnhancedBigtableStubSettings.Builder
Overrides

toString()

public String toString()
Returns
Type Description
String
Overrides