Contains all the Cloud Bigtable C++ client APIs.
Classes
AdminClient
Creates a bigtable_admin::BigtableTableAdminConnection
and a CompletionQueue
for bigtable::TableAdmin
to use.
AlwaysRetryMutationPolicy
Implements a policy that retries all mutations.
AppProfileConfig
Specify the initial configuration for an application profile.
AppProfileUpdateConfig
Build a proto to update an Application Profile configuration.
AsyncRowReader<Unused1, Unused2>
BulkMutation
Represent a set of mutations across multiple rows.
Cell
The in-memory representation of a Bigtable cell.
ClientOptions
Configuration options for the Bigtable Client.
ClusterConfig
Specify the initial configuration for a new cluster.
ColumnFamilyModification
Define the interfaces to create column family modifications.
DataClient
Connects to Cloud Bigtable's data manipulation APIs.
DataConnection
A connection to the Cloud Bigtable Data API.
DataLimitedErrorCountRetryPolicy
A retry policy for bigtable::DataConnection
based on counting errors.
DataLimitedTimeRetryPolicy
A retry policy for bigtable::DataConnection
based on elapsed time.
DataRetryPolicy
The retry policy for bigtable::DataConnection
.
ExponentialBackoffPolicy
Implement a simple exponential backoff policy.
FailedMutation
A SingleRowMutation that failed.
Filter
Define the interfaces to create filter expressions.
GcRule
Implement a thin wrapper around google::bigtable::admin::v2::GcRule.
GenericPollingPolicy<Retry, Backoff>
Construct a polling policy from existing Retry and Backoff policies.
IdempotentMutationPolicy
Defines the interface to control which mutations are idempotent and therefore can be re-tried.
InstanceAdmin
Implements the APIs to administer Cloud Bigtable instances.
InstanceAdminClient
Creates a bigtable_admin::BigtableInstanceAdminConnection
for bigtable::InstanceAdmin
to use.
InstanceConfig
Specify the initial configuration for a new instance.
InstanceResource
This class identifies a Cloud Bigtable Instance.
InstanceUpdateConfig
Specify the initial configuration for updating an instance.
LimitedErrorCountRetryPolicy
Implement a simple "count errors and then stop" retry policy.
LimitedTimeRetryPolicy
Implement a simple "keep trying for this time" retry policy.
MetadataParamTypes
Define the class for governing x-goog-request-params metadata value.
MetadataUpdatePolicy
MetadataUpdatePolicy holds supported metadata and setup ClientContext.
MutationBatcher
Objects of this class pack single row mutations into bulk mutations.
PermanentMutationFailure
Report unrecoverable errors in a partially completed mutation.
PollingPolicy
Define the interface for providing asynchronous repetitive call rules.
ReadModifyWriteRule
Define the interfaces to create ReadWriteModifyRule operations.
Row
The in-memory representation of a Bigtable row.
RowRange
Define the interfaces to create row key ranges.
RowReader
Object returned by Table::ReadRows()
, enumerates rows in the response.
RowSet
Represent a (possibly non-continuous) set of row keys.
RPCBackoffPolicy
Define the interface for controlling how the Bigtable client backsoff from failed RPC operations.
RPCRetryPolicy
Define the interface for controlling how the Bigtable client retries RPC operations.
SafeIdempotentMutationPolicy
Implements a policy that only accepts truly idempotent mutations.
SingleRowMutation
Represent a single row mutation.
Table
The main interface to interact with data in a Cloud Bigtable table.
TableAdmin
Implements the API to administer tables in a Cloud Bigtable instance.
TableConfig
Specify the initial schema for a new table.
TableResource
This class identifies a Cloud Bigtable Table .
Structs
AdminEndpointOption
The endpoint for table admin operations.
AppProfileIdOption
The application profile id.
ClusterList
The response for an asynchronous request listing all the clusters.
DataBackoffPolicyOption
Option to configure the backoff policy used by Table
.
DataEndpointOption
The endpoint for data operations.
DataRetryPolicyOption
Option to configure the retry policy used by Table
.
EnableMetricsOption
Enable [client-side metrics].
IdempotentMutationPolicyOption
Option to configure the idempotency policy used by Table
.
InstanceAdminEndpointOption
The endpoint for instance admin operations.
InstanceList
The response for an asynchronous request listing all the instances.
MaxConnectionRefreshOption
Maximum time in ms to refresh connections.
MetricsPeriodOption
Metrics export period.
MinConnectionRefreshOption
Minimum time in ms to refresh connections.
Mutation
Represent a single change to a specific row in a Table .
ReadRowsParams
Wrap the arguments to ReadRows()
.
ReverseScanOption
Read rows in reverse order.
RowKeySample
A simple wrapper to represent the response from Table::SampleRowKeys()
.
Enums
MutationBranch
The branch taken by a Table::CheckAndMutateRow
operation.
Consistency
The result of checking replication against a given token.
Functions
DeleteFromColumn(std::string, ColumnType &&, std::chrono::duration< Rep1, Period1 >, std::chrono::duration< Rep2, Period2 >)
Create mutations to delete a range of cells from a column.
The following functions create a mutation that deletes all the cells in the given column family and, column within the given timestamp in the range.
The function accepts any instantiation of std::chrono::duration<>
for the timestamp_begin
and timestamp_end
parameters. For example:
using namespace std::chrono_literals; // C++14
bigtable::DeleteFromColumn("fam", "col", 0us, 10us)
The ending timestamp is exclusive, while the beginning timestamp is inclusive. That is, the interval is [ timestamp_begin
, timestamp_end
). The value 0 is special and treated as "unbounded" for both the begin and end endpoints of the time range. The Cloud Bigtable server rejects invalid and empty ranges, i.e., any range where the endpoint is smaller or equal than to the initial endpoint unless either endpoint is 0.
family
std::string
column
ColumnType &&
timestamp_begin
std::chrono::duration< Rep1, Period1 >
timestamp_end
std::chrono::duration< Rep2, Period2 >
typename Rep1
typename Period1
typename Rep2
typename Period2
typename ColumnType
Mutation
DeleteFromColumnStartingFrom(std::string, ColumnType &&, std::chrono::duration< Rep1, Period1 >)
Delete all the values for the column.
cells in the given column family and column, Delete up to timestamp_end , but excluding, timestamp_end .
The function accepts any instantiation of std::chrono::duration<>
for the timestamp_end
For example:
using namespace std::chrono_literals; // C++14
bigtable::DeleteFromColumn("fam", "col", 10us)
family
std::string
column
ColumnType &&
timestamp_begin
std::chrono::duration< Rep1, Period1 >
typename Rep1
typename Period1
typename ColumnType
Mutation
DeleteFromColumnEndingAt(std::string, ColumnType &&, std::chrono::duration< Rep2, Period2 >)
Delete all the values for the column.
cells in the given column family and column, Delete up to timestamp_end , but excluding, timestamp_end .
The function accepts any instantiation of std::chrono::duration<>
for the timestamp_end
For example:
using namespace std::chrono_literals; // C++14
bigtable::DeleteFromColumn("fam", "col", 10us)
family
std::string
column
ColumnType &&
timestamp_end
std::chrono::duration< Rep2, Period2 >
typename Rep2
typename Period2
typename ColumnType
Mutation
DeleteFromColumn(std::string, ColumnType &&)
Delete all the values for the column.
cells in the given column family and column, Delete up to timestamp_end , but excluding, timestamp_end .
The function accepts any instantiation of std::chrono::duration<>
for the timestamp_end
For example:
using namespace std::chrono_literals; // C++14
bigtable::DeleteFromColumn("fam", "col", 10us)
family
std::string
column
ColumnType &&
typename ColumnType
Mutation
MakeAdminClient(std::string, Options)
Create a new table admin client configured via options
.
project
std::string
options
Options
std::shared_ptr< AdminClient >
CreateDefaultAdminClient(std::string, ClientOptions)
Create a new table admin client configured via options
.
project
std::string
options
ClientOptions
std::shared_ptr< AdminClient >
SetCell(Cell)
Create a mutation to set a cell value based on a bigtable::Cell
.
These mutations are not idempotent and not retried by default.
cell
Cell
Mutation
MakeDataClient(std::string, std::string, Options)
Create a new data client configured via options
.
project_id
std::string
instance_id
std::string
options
Options
std::shared_ptr< DataClient >
CreateDefaultDataClient(std::string, std::string, ClientOptions)
Create a new data client configured via options
.
project_id
std::string
instance_id
std::string
options
ClientOptions
std::shared_ptr< DataClient >
InstanceName(std::shared_ptr< DataClient > const &)
Return the fully qualified instance name for the client
.
Compute the full path of the instance associated with the client, i.e., projects/instances/<client->project_id()>/instances/<client->instance_id()>
client
std::shared_ptr< DataClient > const &
std::string
MakeDataConnection(Options)
Returns a DataConnection
object that can be used for interacting with the Cloud Bigtable Data API.
The returned connection object should not be used directly; instead it should be given to a Table
instance, and methods should be invoked on Table
.
The optional opts
argument may be used to configure aspects of the returned DataConnection
. Expected options are any of the following options or types in the option lists.
options
std::shared_ptr< DataConnection >
Expression(std::string, std::string, std::string, std::string)
Create a google::type::Expr.
This is a textual representation of an expression in Common Expression Language (CEL) syntax.
expression
std::string
the expression in Common Expression Language.
title
std::string
an optional title for the expression, i.e. a short string describing its purpose.
description
std::string
an optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
location
std::string
an optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
google::type::Expr
IamBinding(std::string, InputIt, InputIt)
Create a google::iam::v1::Binding.
See Also
https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.
role
std::string
the role which is assigned to members
begin
InputIt
iterator pointing to the first member
end
InputIt
iterator pointing to past last member
class InputIt
google::iam::v1::Binding
The binding
IamBinding(std::string, InputIt, InputIt, google::type::Expr)
Create a google::iam::v1::Binding.
See Also
https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.
role
std::string
the role which is assigned to members
begin
InputIt
iterator pointing to the first member
end
InputIt
iterator pointing to past last member
condition
google::type::Expr
expression indicating when the binding is effective
class InputIt
google::iam::v1::Binding
The binding
IamBinding(std::string, std::initializer_list< std::string >)
Create a google::iam::v1::Binding.
See Also
https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.
role
std::string
the role which is assigned to members
members
std::initializer_list< std::string >
initializer_list of members
google::iam::v1::Binding
The binding
IamBinding(std::string, std::initializer_list< std::string >, google::type::Expr)
Create a google::iam::v1::Binding.
See Also
https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.
role
std::string
the role which is assigned to members
members
std::initializer_list< std::string >
initializer_list of members
condition
google::type::Expr
expression indicating when the binding is effective
google::iam::v1::Binding
The binding
IamBinding(std::string, std::vector< std::string >)
Create a google::iam::v1::Binding.
See Also
https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.
role
std::string
the role which is assigned to members
members
std::vector< std::string >
vector of members
google::iam::v1::Binding
The binding
IamBinding(std::string, std::vector< std::string >, google::type::Expr)
Create a google::iam::v1::Binding.
See Also
https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.
role
std::string
the role which is assigned to members
members
std::vector< std::string >
vector of members
condition
google::type::Expr
expression indicating when the binding is effective
google::iam::v1::Binding
The binding
IamBindingAppendMembers(google::iam::v1::Binding, InputIt, InputIt)
Append members to a google::iam::v1::Binding.
binding
google::iam::v1::Binding
the role which is assigned to members
begin
InputIt
iterator pointing to the first member
end
InputIt
iterator pointing to past last member
class InputIt
google::iam::v1::Binding
The binding with appended members
IamBindingSetCondition(google::iam::v1::Binding, google::type::Expr)
Set a condition to an google::iam::v1::Binding.
binding
google::iam::v1::Binding
the binding to which the condition is added
condition
google::type::Expr
the added condition
google::iam::v1::Binding
the binding with the condition set
IamPolicy(InputIt, InputIt, std::string, std::int32_t)
Create a google::iam::v1::Policy.
See Also
https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.
See Also
https://tools.ietf.org/html/rfc7232#section-2.3 for more information about ETags.
first_binding
InputIt
iterator pointing to the first google::iam::v1::Binding
last_binding
InputIt
iterator pointing to past last google::iam::v1::Binding
etag
std::string
used for optimistic concurrency control
version
std::int32_t
currently unused
class InputIt
google::iam::v1::Policy
The policy
IamPolicy(std::initializer_list< google::iam::v1::Binding >, std::string, std::int32_t)
Create a google::iam::v1::Policy.
See Also
https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.
See Also
https://tools.ietf.org/html/rfc7232#section-2.3 for more information about ETags.
bindings
std::initializer_list< google::iam::v1::Binding >
initializer_list of google::iam::v1::Binding
etag
std::string
used for optimistic concurrency control
version
std::int32_t
currently unused
google::iam::v1::Policy
The policy
IamPolicy(std::vector< google::iam::v1::Binding >, std::string, std::int32_t)
Create a google::iam::v1::Policy.
See Also
https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.
See Also
https://tools.ietf.org/html/rfc7232#section-2.3 for more information about ETags.
bindings
std::vector< google::iam::v1::Binding >
vector of google::iam::v1::Binding
etag
std::string
used for optimistic concurrency control
version
std::int32_t
currently unused
google::iam::v1::Policy
The policy
RemoveBindingsFromPolicyIf(google::iam::v1::Policy &, Functor)
Remove all bindings matching a predicate from a policy.
policy
google::iam::v1::Policy &
the policy to remove from
pred
Functor
predicate indicating whether to remove a binding
typename Functor
the type of the predicate; it should be invocable with google::iam::v1::Binding const&
and return a bool.
size_t
number of bindings removed.
RemoveBindingFromPolicy(google::iam::v1::Policy &, google::protobuf::RepeatedPtrField< google::iam::v1::Binding >::iterator)
Remove a specific binding from a policy.
policy
google::iam::v1::Policy &
the policy to remove from
to_remove
google::protobuf::RepeatedPtrField< google::iam::v1::Binding >::iterator
the iterator indicating the binding; it should be retrieved from the mutable_bindings()
member
void
DefaultIdempotentMutationPolicy()
Return an instance of the default IdempotentMutationPolicy .
std::unique_ptr< IdempotentMutationPolicy >
MakeInstanceAdminClient(std::string, Options)
Create a new instance admin client configured via options
.
project
std::string
options
Options
std::shared_ptr< InstanceAdminClient >
CreateDefaultInstanceAdminClient(std::string, ClientOptions)
Create a new instance admin client configured via options
.
project
std::string
options
ClientOptions
std::shared_ptr< InstanceAdminClient >
MakeInstanceResource(std::string const &)
Constructs an InstanceResource
from the given full_name
.
Returns a non-OK Status
if full_name
is improperly formed.
full_name
std::string const &
StatusOr< InstanceResource >
ServerSetTimestamp()
A magic value where the server sets the timestamp.
Notice that using this value in a SetCell() mutation makes it non-idempotent, and by default the client will not retry such mutations.
std::int64_t
SetCell(std::string, ColumnType &&, std::chrono::milliseconds, ValueType &&)
Create a mutation to set a cell value.
family
std::string
column
ColumnType &&
timestamp
std::chrono::milliseconds
value
ValueType &&
typename ColumnType
typename ValueType
Mutation
SetCell(std::string, ColumnType &&, std::chrono::milliseconds, std::int64_t)
Create a mutation to store a 64-bit big endian integer value.
family
std::string
column
ColumnType &&
timestamp
std::chrono::milliseconds
value
std::int64_t
typename ColumnType
Mutation
SetCell(std::string, ColumnType &&, ValueType &&)
Create a mutation to set a cell value where the server sets the time.
These mutations are not idempotent and not retried by default.
family
std::string
column
ColumnType &&
value
ValueType &&
typename ColumnType
typename ValueType
Mutation
SetCell(std::string, ColumnType &&, std::int64_t)
Create a mutation to store a 64-bit big endian integer value.
family
std::string
column
ColumnType &&
value
std::int64_t
typename ColumnType
Mutation
DeleteFromFamily(std::string)
Create a mutation to delete all the cells in a column family.
family
std::string
Mutation
DeleteFromRow()
Create a mutation to delete all the cells in a row.
Mutation
DefaultPollingPolicy(internal::RPCPolicyParameters)
defaults
internal::RPCPolicyParameters
std::unique_ptr< PollingPolicy >
InstanceName(std::string const &, std::string const &)
project_id
std::string const &
instance_id
std::string const &
std::string
TableName(std::string const &, std::string const &, std::string const &)
project_id
std::string const &
instance_id
std::string const &
table_id
std::string const &
std::string
ClusterName(std::string const &, std::string const &, std::string const &)
project_id
std::string const &
instance_id
std::string const &
cluster_id
std::string const &
std::string
AppProfileName(std::string const &, std::string const &, std::string const &)
project_id
std::string const &
instance_id
std::string const &
app_profile_id
std::string const &
std::string
BackupName(std::string const &, std::string const &, std::string const &, std::string const &)
project_id
std::string const &
instance_id
std::string const &
cluster_id
std::string const &
backup_id
std::string const &
std::string
DefaultRPCBackoffPolicy(internal::RPCPolicyParameters)
Return an instance of the default RPCBackoffPolicy .
defaults
internal::RPCPolicyParameters
std::unique_ptr< RPCBackoffPolicy >
DefaultRPCRetryPolicy(internal::RPCPolicyParameters)
Return an instance of the default RPCRetryPolicy .
defaults
internal::RPCPolicyParameters
std::unique_ptr< RPCRetryPolicy >
TableName(std::shared_ptr< DataClient > const &, std::string const &)
Return the full table name.
The full table name is:
projects/<PROJECT_ID>/instances/<INSTANCE_ID>/tables/<table_id>
Where the project id and instance id come from the client
parameter.
client
std::shared_ptr< DataClient > const &
table_id
std::string const &
std::string
MakeTableResource(std::string const &)
Constructs a TableResource
from the given full_name
.
Returns a non-OK Status
if full_name
is improperly formed.
full_name
std::string const &
StatusOr< TableResource >
version_major()
The Cloud Bigtable C++ Client major version.
See Also
https://semver.org/spec/v2.0.0.html for details.
int constexpr
version_minor()
The Cloud Bigtable C++ Client minor version.
See Also
https://semver.org/spec/v2.0.0.html for details.
int constexpr
version_patch()
The Cloud Bigtable C++ Client patch version.
See Also
https://semver.org/spec/v2.0.0.html for details.
int constexpr
version_pre_release()
The Cloud Bigtable C++ Client pre-release version.
See Also
https://semver.org/spec/v2.0.0.html for details.
char const *
version()
A single integer representing the Major/Minor/Patch version.
int constexpr
version_string()
The version as a string, in MAJOR.MINOR.PATCH[-PRE][+gitrev] format.
std::string
Type Aliases
ColumnQualifierType
std::decay_t< decltype(std::declval< google::bigtable::v2::Column >().qualifier())>
Defines the type for column qualifiers.
Inside Google some protobuf fields of type bytes
are mapped to a different type than std::string
. This is the case for column qualifiers. We use this type to automatically detect what is the representation for this field and use the correct mapping.
External users of the Cloud Bigtable C++ client library should treat this as a complicated typedef
for std::string
. We have no plans to change the type in the external version of the C++ client library for the foreseeable future. In the eventuality that we do decide to change the type, this would be a reason update the library major version number, and we would give users time to migrate.
In other words, external users of the Cloud Bigtable C++ client should simply write std::string
where this type appears. For Google projects that must compile both inside and outside Google, this alias may be convenient.
CellValueType
std::decay_t< decltype(std::declval< google::bigtable::v2::Cell >().value())>
Defines the type for cell values.
Inside Google some protobuf fields of type bytes
are mapped to a different type than std::string
. This is the case for column qualifiers. We use this type to automatically detect what is the representation for this field and use the correct mapping.
External users of the Cloud Bigtable C++ client library should treat this as a complicated typedef
for std::string
. We have no plans to change the type in the external version of the C++ client library for the foreseeable future. In the eventuality that we do decide to change the type, this would be a reason update the library major version number, and we would give users time to migrate.
In other words, external users of the Cloud Bigtable C++ client should simply write std::string
where this type appears. For Google projects that must compile both inside and outside Google, this alias may be convenient.
Instance
::google::bigtable::admin::v2::Instance
ClientOptionList
OptionList< DataEndpointOption, AdminEndpointOption, InstanceAdminEndpointOption, MinConnectionRefreshOption, MaxConnectionRefreshOption >
The complete list of options accepted by bigtable::*Client
DataPolicyOptionList
OptionList< DataRetryPolicyOption, DataBackoffPolicyOption, IdempotentMutationPolicyOption, EnableMetricsOption, MetricsPeriodOption >
RowKeyType
std::decay_t< decltype(std::declval< google::bigtable::v2::Row >().key())>
Defines the type for row keys.
Inside Google some protobuf fields of type bytes
are mapped to a different type than std::string
. This is the case for row keys. We use this type to automatically detect what is the representation for this field and use the correct mapping.
External users of the Cloud Bigtable C++ client library should treat this as a complicated typedef
for std::string
. We have no plans to change the type in the external version of the C++ client library for the foreseeable future. In the eventuality that we do decide to change the type, this would be a reason update the library major version number, and we would give users time to migrate.
In other words, external users of the Cloud Bigtable C++ client should simply write std::string
where this type appears. For Google projects that must compile both inside and outside Google, this alias may be convenient.