Package com.google.bigtable.cassandra
Class BigtableCqlConfiguration.Builder
java.lang.Object
com.google.bigtable.cassandra.BigtableCqlConfiguration.Builder
- Enclosing class:
- BigtableCqlConfiguration
Builder for
BigtableCqlConfiguration.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract BigtableCqlConfigurationbuild()Builds theBigtableCqlConfiguration.Disables OpenTelemetry.Enables Opentelemetry health-checks, metrics and tracing instrumentation.setAppProfileId(String appProfileId) Sets the Bigtable App Profile ID to use.setBigtableChannelPoolSize(int bigtableChannelPoolSize) Sets the Bigtable channel pool size.setDefaultColumnFamily(String defaultColumnFamily) Sets the default column family name.setDefaultKeyspace(String keyspace) Sets the default keyspace for the session.abstract BigtableCqlConfiguration.BuildersetInstanceId(String instanceId) Sets the Bigtable instance ID.abstract BigtableCqlConfiguration.BuildersetProjectId(String projectId) Sets the Google Cloud Project ID.setSchemaMappingTable(String schemaMappingTable) Sets the schema mapping table name.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setProjectId
Sets the Google Cloud Project ID. This should be the Google Cloud project ID that contains the targeted Bigtable Instance. This should be the bare project identifier (i.e. my-project) rather than the fully qualified path (e.g. projects/my-project).- Parameters:
projectId- The project ID.- Returns:
- This
BigtableCqlConfiguration.Builderinstance.
-
setInstanceId
Sets the Bigtable instance ID. This should be the bare instance ID (e.g. my-instance) rather than the full qualified path (e.g. projects/my-project/instances/my-instance). See documentation for details.- Parameters:
instanceId- The instance ID.- Returns:
- This
BigtableCqlConfiguration.Builderinstance.
-
setAppProfileId
Sets the Bigtable App Profile ID to use. See documentation for details- Parameters:
appProfileId- The app profile ID.- Returns:
- This
BigtableCqlConfiguration.Builderinstance.
-
setSchemaMappingTable
Sets the schema mapping table name. This is the schema mapping table created during the Schema Setup process. The schema_mapping table acts as a metadata repository, holding the schema configuration for your Cassandra-like tables in Bigtable. It stores details such as column names, data types, and primary key information.- Parameters:
schemaMappingTable- The schema mapping table name.- Returns:
- This
BigtableCqlConfiguration.Builderinstance.
-
setDefaultColumnFamily
Sets the default column family name. This is the name of the Bigtable column family to target for columns with 'primitive' data types when the column family is not set explicitly set.- Parameters:
defaultColumnFamily- The default column family name.- Returns:
- This
BigtableCqlConfiguration.Builderinstance.
-
setDefaultKeyspace
Sets the default keyspace for the session.- Parameters:
keyspace- The default keyspace to use.- Returns:
- This
BigtableCqlConfiguration.Builderinstance.
-
setBigtableChannelPoolSize
Sets the Bigtable channel pool size. The number of gRPC channels that the bigtable client will use. The Bigtable client uses an underlying round-robin channel pool that allows it to spread load across shared load balancers. A good rule of thumb is to limit each channel to at most 50 qps.- Parameters:
bigtableChannelPoolSize- The Bigtable channel pool size.- Returns:
- This
BigtableCqlConfiguration.Builderinstance.
-
enableOpenTelemetry
Enables Opentelemetry health-checks, metrics and tracing instrumentation. Currently only `OpenTelemetryCollectorConfigurationis supported. This only affects monitoring of the proxy itself. Please note, Bigtable client's builtin metrics are separate and are not affected by this configuration.- Parameters:
config- TheOpenTelemetryConfiguration.- Returns:
- This
BigtableCqlConfiguration.Builderinstance.
-
disableOpenTelemetry
Disables OpenTelemetry.- Returns:
- This
BigtableCqlConfiguration.Builderinstance.
-
build
Builds theBigtableCqlConfiguration.- Returns:
- The built
BigtableCqlConfiguration.
-