public final class BigtableDataSettings extends Object
BigtableDataClient.
Sane defaults are provided for most settings:
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")
.setInstanceId("my-instance-id")
.setAppProfileId("default");
BigtableDataSettings settings = builder.build();
For fine grained control of individual RPCs, please refer to EnhancedBigtableStubSettings, which is exposed as BigtableDataSettings.Builder.stubSettings().
| Modifier and Type | Class and Description |
|---|---|
static class |
BigtableDataSettings.Builder
Builder for BigtableDataSettings.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areInternalMetricsEnabled()
Checks if internal metrics are enabled
|
static void |
enableBuiltinMetrics()
Deprecated.
This is a no-op that doesn't do anything. Builtin metrics are enabled by default
now. Please refer to
BigtableDataSettings.Builder.setMetricsProvider(MetricsProvider) on how to enable or
disable built-in metrics. |
static void |
enableBuiltinMetrics(com.google.auth.Credentials credentials)
Deprecated.
This is a no-op that doesn't do anything. Builtin metrics are enabled by default
now. Please refer
BigtableDataSettings.Builder.setMetricsProvider(MetricsProvider)
on how to enable or disable built-in metrics. |
static void |
enableGfeOpenCensusStats()
Deprecated.
OpenCensus support is deprecated and will be removed in a future version Enables
OpenCensus GFE metric aggregations.
This will register views for gfe_latency and gfe_header_missing_count metrics. gfe_latency measures the latency between Google's network receives an RPC and reads back the first byte of the response. gfe_header_missing_count is a counter of the number of RPC responses received without the server-timing header. |
static void |
enableOpenCensusStats()
Deprecated.
OpenCensus support is deprecated and will be removed in a future version Enables
OpenCensus metric aggregations.
This will register Bigtable client relevant Please note that in addition to calling this method, the application must:
Example usage for maven:
Java:
|
String |
getAppProfileId()
Returns the configured AppProfile id to use.
|
Long |
getBatchMutationsTargetRpcLatencyMs()
Gets target bulk mutation rpc latency if latency based throttling is enabled for
BigtableDataClient.newBulkMutationBatcher(String). |
String |
getInstanceId()
Returns the target instance id.
|
static com.google.auth.Credentials |
getMetricsCredentials()
Get the metrics credentials if it's set by
enableBuiltinMetrics(Credentials). |
com.google.cloud.bigtable.data.v2.stub.metrics.MetricsProvider |
getMetricsProvider()
Gets the
MetricsProvider |
List<String> |
getPrimingTableIds()
Deprecated.
This field is ignored. If
isRefreshingChannel() is enabled, warm up
requests will be sent to all table ids of the instance. |
String |
getProjectId()
Returns the target project id.
|
EnhancedBigtableStubSettings |
getStubSettings()
Returns the underlying RPC settings.
|
boolean |
isBulkMutationFlowControlEnabled()
Gets if flow control is enabled for
BigtableDataClient.newBulkMutationBatcher(String)
based on the load of the Bigtable server. |
boolean |
isLatencyBasedThrottlingForBatchMutationsEnabled()
Gets if latency based throttling is enabled for
BigtableDataClient.newBulkMutationBatcher(String) |
boolean |
isRefreshingChannel()
Deprecated.
Channel refreshing is enabled by default and this method will be deprecated.
|
static BigtableDataSettings.Builder |
newBuilder()
Create a new builder.
|
static BigtableDataSettings.Builder |
newBuilderForEmulator(int port)
Create a new builder preconfigured to connect to the Bigtable emulator with port number.
|
static BigtableDataSettings.Builder |
newBuilderForEmulator(String hostname,
int port)
Creates a new builder preconfigured to connect to the Bigtable emulator with a host name and
port number.
|
com.google.api.gax.rpc.UnaryCallSettings<Query,Row> |
readRowSettings()
Returns the object with the settings used for point reads via ReadRow.
|
BigtableDataSettings.Builder |
toBuilder()
Returns a builder containing all the values of this settings class.
|
String |
toString() |
public static BigtableDataSettings.Builder newBuilder()
If emulator configuration provided in BIGTABLE_EMULATOR_HOST environment variable then it creates a builder preconfigured to connect to Bigtable using emulator hostname and port number.
public static BigtableDataSettings.Builder newBuilderForEmulator(int port)
public static BigtableDataSettings.Builder newBuilderForEmulator(String hostname, int port)
@Deprecated public static void enableOpenCensusStats()
This will register Bigtable client relevant Views. When
coupled with an exporter, it allows users to monitor client behavior.
Please note that in addition to calling this method, the application must:
Example usage for maven:
<dependency>
<groupId>io.opencensus</groupId>
<artifactId>opencensus-impl</artifactId>
<version>${opencensus.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.opencensus</groupId>
<artifactId>opencensus-exporter-stats-stackdriver</artifactId>
<version>${opencensus.version}</version>
</dependency>
Java:
StackdriverStatsExporter.createAndRegister();
BigtableDataSettings.enableOpenCensusStats();
@Deprecated public static void enableGfeOpenCensusStats()
This will register views for gfe_latency and gfe_header_missing_count metrics.
gfe_latency measures the latency between Google's network receives an RPC and reads back the first byte of the response. gfe_header_missing_count is a counter of the number of RPC responses received without the server-timing header.
@Deprecated public static void enableBuiltinMetrics() throws IOException
BigtableDataSettings.Builder.setMetricsProvider(MetricsProvider) on how to enable or
disable built-in metrics.IOException@Deprecated public static void enableBuiltinMetrics(com.google.auth.Credentials credentials) throws IOException
BigtableDataSettings.Builder.setMetricsProvider(MetricsProvider)
on how to enable or disable built-in metrics.IOException@InternalApi public static com.google.auth.Credentials getMetricsCredentials()
enableBuiltinMetrics(Credentials).public String getProjectId()
public String getInstanceId()
public String getAppProfileId()
@Deprecated public boolean isRefreshingChannel()
@Deprecated public List<String> getPrimingTableIds()
isRefreshingChannel() is enabled, warm up
requests will be sent to all table ids of the instance.@BetaApi(value="Latency based throttling is not currently stable and may change in the future") public boolean isLatencyBasedThrottlingForBatchMutationsEnabled()
BigtableDataClient.newBulkMutationBatcher(String)@BetaApi(value="Latency based throttling is not currently stable and may change in the future") @Nullable public Long getBatchMutationsTargetRpcLatencyMs()
BigtableDataClient.newBulkMutationBatcher(String). Otherwise returns null.@InternalApi(value="Intended for use by the Bigtable dataflow connectors only") public boolean isBulkMutationFlowControlEnabled()
BigtableDataClient.newBulkMutationBatcher(String)
based on the load of the Bigtable server.public com.google.cloud.bigtable.data.v2.stub.metrics.MetricsProvider getMetricsProvider()
MetricsProvider. *public boolean areInternalMetricsEnabled()
public EnhancedBigtableStubSettings getStubSettings()
public com.google.api.gax.rpc.UnaryCallSettings<Query,Row> readRowSettings()
public BigtableDataSettings.Builder toBuilder()
Copyright © 2026 Google LLC. All rights reserved.