Google Cloud Bigtable C++ Client  0.11.0
A C++ Client Library for Google Cloud Bigtable
Classes | Typedefs | Enumerations | Functions
google::cloud::bigtable::v0 Namespace Reference

The inlined, versioned namespace for the Cloud Bigtable C++ client APIs. More...

Classes

class  AdminClient
 Connects to Cloud Bigtable's table administration APIs. More...
 
class  AlwaysRetryMutationPolicy
 Implements a policy that retries all mutations. More...
 
class  AppProfileConfig
 Specify the initial configuration for an application profile. More...
 
class  AppProfileUpdateConfig
 Build a proto to update an Application Profile configuration. More...
 
class  AsyncOperation
 Represents a pending asynchronous operation. More...
 
class  AsyncRowReader
 Objects of this class represent the state of reading rows via AsyncReadRows. More...
 
struct  AsyncTimerResult
 The result of an async timer operation. More...
 
class  BulkMutation
 Represent a set of mutations across multiple rows. More...
 
class  Cell
 The in-memory representation of a Bigtable cell. More...
 
class  ClientOptions
 Configuration options for the Bigtable Client. More...
 
class  ClusterConfig
 Specify the initial configuration for a new cluster. More...
 
struct  ClusterList
 The response for an asynchronous request listing all the clusters. More...
 
class  ColumnFamilyModification
 Define the interfaces to create column family modifications. More...
 
class  CompletionQueue
 Call the functor associated with asynchronous operations when they complete. More...
 
class  DataClient
 Connects to Cloud Bigtable's data manipulation APIs. More...
 
class  ExponentialBackoffPolicy
 Implement a simple exponential backoff policy. More...
 
class  FailedMutation
 A SingleRowMutation that failed. More...
 
class  Filter
 Define the interfaces to create filter expressions. More...
 
class  GcRule
 Implement a thin wrapper around google::bigtable::admin::v2::GcRule. More...
 
class  GenericPollingPolicy
 Construct a polling policy from existing Retry and Backoff policies. More...
 
class  IdempotentMutationPolicy
 Defines the interface to control which mutations are idempotent and therefore can be re-tried. More...
 
class  InstanceAdmin
 Implements the APIs to administer Cloud Bigtable instances. More...
 
class  InstanceAdminClient
 Connects to Cloud Bigtable's instance administration APIs. More...
 
class  InstanceConfig
 Specify the initial configuration for a new instance. More...
 
struct  InstanceList
 The response for an asynchronous request listing all the instances. More...
 
class  InstanceUpdateConfig
 Specify the initial configuration for updating an instance. More...
 
class  LimitedErrorCountRetryPolicy
 Implement a simple "count errors and then stop" retry policy. More...
 
class  LimitedTimeRetryPolicy
 Implement a simple "keep trying for this time" retry policy. More...
 
class  MetadataParamTypes
 Define the class for governing x-goog-request-params metadata value. More...
 
class  MetadataUpdatePolicy
 MetadataUpdatePolicy holds supported metadata and setup ClientContext. More...
 
struct  Mutation
 Represent a single change to a specific row in a Table. More...
 
class  MutationBatcher
 Objects of this class pack single row mutations into bulk mutations. More...
 
class  PermanentMutationFailure
 Report unrecoverable errors in a partially completed mutation. More...
 
class  PollingPolicy
 Define the interface for providing asynchronous repetitive call rules. More...
 
class  ReadModifyWriteRule
 Define the interfaces to create ReadWriteModifyRule operations. More...
 
class  Row
 The in-memory representation of a Bigtable row. More...
 
struct  RowKeySample
 A simple wrapper to represent the response from Table::SampleRowKeys(). More...
 
class  RowRange
 Define the interfaces to create row key ranges. More...
 
class  RowReader
 Object returned by Table::ReadRows(), enumerates rows in the response. More...
 
class  RowSet
 Represent a (possibly non-continuous) set of row keys. More...
 
class  RPCBackoffPolicy
 Define the interface for controlling how the Bigtable client backsoff from failed RPC operations. More...
 
class  RPCRetryPolicy
 Define the interface for controlling how the Bigtable client retries RPC operations. More...
 
class  SafeIdempotentMutationPolicy
 Implements a policy that only accepts truly idempotent mutations. More...
 
class  SingleRowMutation
 Represent a single row mutation. More...
 
class  Table
 The main interface to interact with data in a Cloud Bigtable table. More...
 
class  TableAdmin
 Implements the API to administer tables in a Cloud Bigtable instance. More...
 
class  TableConfig
 Specify the initial schema for a new table. More...
 

Typedefs

using Instance = ::google::bigtable::admin::v2::Instance
 
using ColumnQualifierType = std::decay< decltype(std::declval< google::bigtable::v2::Column >().qualifier())>::type
 Defines the type for column qualifiers. More...
 
using CellValueType = std::decay< decltype(std::declval< google::bigtable::v2::Cell >().value())>::type
 Defines the type for cell values. More...
 
using RowKeyType = std::decay< decltype(std::declval< google::bigtable::v2::Row >().key())>::type
 Defines the type for row keys. More...
 
using ClientUtils = bigtable::internal::UnaryClientUtils< InstanceAdminClient >
 Shortcuts to avoid typing long names over and over. More...
 

Enumerations

enum  MutationBranch { MutationBranch::kPredicateNotMatched, MutationBranch::kPredicateMatched }
 The branch taken by a Table::CheckAndMutateRow operation. More...
 
enum  Consistency { Consistency::kInconsistent, Consistency::kConsistent }
 The result of checking replication against a given token. More...
 

Functions

std::shared_ptr< AdminClientCreateDefaultAdminClient (std::string project, ClientOptions options)
 Create a new admin client configured via options. More...
 
std::size_t CalculateDefaultConnectionPoolSize ()
 
std::shared_ptr< DataClientCreateDefaultDataClient (std::string project_id, std::string instance_id, ClientOptions options)
 Create the default implementation of ClientInterface. More...
 
std::string InstanceName (std::shared_ptr< DataClient > client)
 Return the fully qualified instance name for the client. More...
 
std::string TableName (std::shared_ptr< DataClient > client, std::string const &table_id)
 Return the full table name. More...
 
int constexpr version_major ()
 The Cloud Bigtable C++ Client major version. More...
 
int constexpr version_minor ()
 The Cloud Bigtable C++ Client minor version. More...
 
int constexpr version_patch ()
 The Cloud Bigtable C++ Client patch version. More...
 
int constexpr version ()
 A single integer representing the Major/Minor/Patch version. More...
 
std::string version_string ()
 The version as a string, in MAJOR.MINOR.PATCH+gitrev format. More...
 
std::shared_ptr< InstanceAdminClientCreateDefaultInstanceAdminClient (std::string project, ClientOptions options)
 Create a new admin client configured via options. More...
 
bool operator== (MetadataParamTypes const &lhs, MetadataParamTypes const &rhs)
 
bool operator!= (MetadataParamTypes const &lhs, MetadataParamTypes const &rhs)
 
std::unique_ptr< PollingPolicyDefaultPollingPolicy (internal::RPCPolicyParameters defaults)
 
std::unique_ptr< RPCBackoffPolicyDefaultRPCBackoffPolicy (internal::RPCPolicyParameters defaults)
 Return an instance of the default RPCBackoffPolicy. More...
 
std::unique_ptr< RPCRetryPolicyDefaultRPCRetryPolicy (internal::RPCPolicyParameters defaults)
 Return an instance of the default RPCRetryPolicy. More...
 
std::unique_ptr< IdempotentMutationPolicyDefaultIdempotentMutationPolicy ()
 Return an instance of the default IdempotentMutationPolicy. More...
 
constexpr std::int64_t ServerSetTimestamp ()
 A magic value where the server sets the timestamp. More...
 
template<typename ColumnType , typename ValueType >
Mutation SetCell (std::string family, ColumnType &&column, std::chrono::milliseconds timestamp, ValueType &&value)
 Create a mutation to set a cell value. More...
 
template<typename ColumnType , typename ValueType >
Mutation SetCell (std::string family, ColumnType &&column, ValueType &&value)
 Create a mutation to set a cell value where the server sets the time. More...
 
Mutation DeleteFromFamily (std::string family)
 Create a mutation to delete all the cells in a column family. More...
 
Mutation DeleteFromRow ()
 Create a mutation to delete all the cells in a row. More...
 
bool operator== (RowRange const &lhs, RowRange const &rhs)
 
bool operator!= (RowRange const &lhs, RowRange const &rhs)
 
std::ostream & operator<< (std::ostream &os, RowRange const &x)
 Print a human-readable representation of the range, mostly for testing. More...
 
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.

Template Parameters
Rep1a placeholder to match the Rep tparam for timestamp_begin type. The semantics of this template parameter are documented in std::chrono::duration<>` (in brief, the underlying arithmetic type used to store the number of ticks), for our purposes it is simply a formal parameter.
Rep2similar formal parameter for the type of timestamp_end.
Period1a placeholder to match the Period tparam for timestamp_begin type. The semantics of this template parameter are documented in std::chrono::duration<> (in brief, the length of the tick in seconds,vexpressed as a std::ratio<>), for our purposes it is simply a formal parameter.
Period2similar formal parameter for the type of timestamp_end.
ColumnTypethe type of the column qualifier. It should satisfy std::is_constructible<ColumnQualifierType, ColumnType>.
template<typename Rep1 , typename Period1 , typename Rep2 , typename Period2 , typename ColumnType >
Mutation DeleteFromColumn (std::string family, ColumnType &&column, std::chrono::duration< Rep1, Period1 > timestamp_begin, std::chrono::duration< Rep2, Period2 > timestamp_end)
 
The following functions create a mutation that deletes all the

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)
Template Parameters
Rep2a placeholder to match the Rep tparam for timestamp_end type. The semantics of this template parameter are documented in std::chrono::duration<> (in brief, the underlying arithmetic type used to store the number of ticks), for our purposes it is simply a formal parameter.
Period2a placeholder to match the Period tparam for timestamp_end type. The semantics of this template parameter are documented in std::chrono::duration<> (in brief, the length of the tick in seconds, expressed as a std::ratio<>), for our purposes it is simply a formal parameter.
ColumnTypethe type of the column qualifier. It should satisfy std::is_constructible<ColumnQualifierType, ColumnType>.
template<typename Rep1 , typename Period1 , typename ColumnType >
Mutation DeleteFromColumnStartingFrom (std::string family, ColumnType &&column, std::chrono::duration< Rep1, Period1 > timestamp_begin)
 
template<typename Rep2 , typename Period2 , typename ColumnType >
Mutation DeleteFromColumnEndingAt (std::string family, ColumnType &&column, std::chrono::duration< Rep2, Period2 > timestamp_end)
 
template<typename ColumnType >
Mutation DeleteFromColumn (std::string family, ColumnType &&column)
 Delete all the values for the column. More...
 

Detailed Description

The inlined, versioned namespace for the Cloud Bigtable C++ client APIs.

Applications may need to link multiple versions of the Cloud Bigtable C++ client, for example, if they link a library that uses an older version of the client than they do. This namespace is inlined, so applications can use bigtable::Foo in their source, but the symbols are versioned, i.e., the symbol becomes bigtable::v1::Foo.

Note that, consistent with the semver.org guidelines, the v0 version makes no guarantees with respect to backwards compatibility.

Typedef Documentation

◆ CellValueType

using google::cloud::bigtable::v0::CellValueType = typedef std::decay<decltype( std::declval<google::bigtable::v2::Cell>().value())>::type

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.

Definition at line 72 of file cell.h.

◆ ClientUtils

typedef bigtable::internal::UnaryClientUtils< AdminClient > google::cloud::bigtable::v0::ClientUtils

Shortcuts to avoid typing long names over and over.

Definition at line 36 of file instance_admin.cc.

◆ ColumnQualifierType

using google::cloud::bigtable::v0::ColumnQualifierType = typedef std::decay<decltype( std::declval<google::bigtable::v2::Column>().qualifier())>::type

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.

Definition at line 50 of file cell.h.

◆ Instance

using google::cloud::bigtable::v0::Instance = typedef ::google::bigtable::admin::v2::Instance

Definition at line 29 of file instance_update_config.h.

◆ RowKeyType

using google::cloud::bigtable::v0::RowKeyType = typedef std::decay<decltype(std::declval<google::bigtable::v2::Row>().key())>::type

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.

Definition at line 48 of file row_key.h.

Enumeration Type Documentation

◆ Consistency

The result of checking replication against a given token.

Enumerator
kInconsistent 

Some of the mutations created before the consistency token have not been received by all the table replicas.

kConsistent 

All mutations created before the consistency token have been received by all the table replicas.

Definition at line 36 of file table_admin.h.

◆ MutationBranch

The branch taken by a Table::CheckAndMutateRow operation.

Enumerator
kPredicateNotMatched 

The predicate provided to CheckAndMutateRow did not match and the false_mutations (if any) were applied.

kPredicateMatched 

The predicate provided to CheckAndMutateRow matched and the true_mutations (if any) were applied.

Definition at line 42 of file table.h.

Function Documentation

◆ CalculateDefaultConnectionPoolSize()

std::size_t google::cloud::bigtable::v0::CalculateDefaultConnectionPoolSize ( )
inline

Definition at line 34 of file client_options.cc.

◆ CreateDefaultAdminClient()

std::shared_ptr< AdminClient > google::cloud::bigtable::v0::CreateDefaultAdminClient ( std::string  project,
ClientOptions  options 
)

Create a new admin client configured via options.

Definition at line 211 of file admin_client.cc.

◆ CreateDefaultDataClient()

std::shared_ptr< DataClient > google::cloud::bigtable::v0::CreateDefaultDataClient ( std::string  project_id,
std::string  instance_id,
ClientOptions  options 
)

Create the default implementation of ClientInterface.

Definition at line 173 of file data_client.cc.

◆ CreateDefaultInstanceAdminClient()

std::shared_ptr< InstanceAdminClient > google::cloud::bigtable::v0::CreateDefaultInstanceAdminClient ( std::string  project,
ClientOptions  options 
)

Create a new admin client configured via options.

Definition at line 375 of file instance_admin_client.cc.

◆ DefaultIdempotentMutationPolicy()

std::unique_ptr< IdempotentMutationPolicy > google::cloud::bigtable::v0::DefaultIdempotentMutationPolicy ( )

Return an instance of the default IdempotentMutationPolicy.

Definition at line 21 of file idempotent_mutation_policy.cc.

◆ DefaultPollingPolicy()

std::unique_ptr< PollingPolicy > google::cloud::bigtable::v0::DefaultPollingPolicy ( internal::RPCPolicyParameters  defaults)

Definition at line 21 of file polling_policy.cc.

◆ DefaultRPCBackoffPolicy()

std::unique_ptr< RPCBackoffPolicy > google::cloud::bigtable::v0::DefaultRPCBackoffPolicy ( internal::RPCPolicyParameters  defaults)

Return an instance of the default RPCBackoffPolicy.

Definition at line 21 of file rpc_backoff_policy.cc.

◆ DefaultRPCRetryPolicy()

std::unique_ptr< RPCRetryPolicy > google::cloud::bigtable::v0::DefaultRPCRetryPolicy ( internal::RPCPolicyParameters  defaults)

Return an instance of the default RPCRetryPolicy.

Definition at line 23 of file rpc_retry_policy.cc.

◆ DeleteFromColumn() [1/2]

template<typename Rep1 , typename Period1 , typename Rep2 , typename Period2 , typename ColumnType >
Mutation google::cloud::bigtable::v0::DeleteFromColumn ( std::string  family,
ColumnType &&  column,
std::chrono::duration< Rep1, Period1 >  timestamp_begin,
std::chrono::duration< Rep2, Period2 >  timestamp_end 
)

Definition at line 126 of file mutations.h.

◆ DeleteFromColumn() [2/2]

template<typename ColumnType >
Mutation google::cloud::bigtable::v0::DeleteFromColumn ( std::string  family,
ColumnType &&  column 
)

Delete all the values for the column.

Definition at line 229 of file mutations.h.

◆ DeleteFromColumnEndingAt()

template<typename Rep2 , typename Period2 , typename ColumnType >
Mutation google::cloud::bigtable::v0::DeleteFromColumnEndingAt ( std::string  family,
ColumnType &&  column,
std::chrono::duration< Rep2, Period2 >  timestamp_end 
)

Definition at line 214 of file mutations.h.

◆ DeleteFromColumnStartingFrom()

template<typename Rep1 , typename Period1 , typename ColumnType >
Mutation google::cloud::bigtable::v0::DeleteFromColumnStartingFrom ( std::string  family,
ColumnType &&  column,
std::chrono::duration< Rep1, Period1 >  timestamp_begin 
)

Definition at line 171 of file mutations.h.

◆ DeleteFromFamily()

Mutation google::cloud::bigtable::v0::DeleteFromFamily ( std::string  family)

Create a mutation to delete all the cells in a column family.

Definition at line 22 of file mutations.cc.

◆ DeleteFromRow()

Mutation google::cloud::bigtable::v0::DeleteFromRow ( )

Create a mutation to delete all the cells in a row.

Definition at line 29 of file mutations.cc.

◆ InstanceName()

std::string google::cloud::bigtable::v0::InstanceName ( std::shared_ptr< DataClient client)
inline

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()>

Definition at line 188 of file data_client.h.

◆ operator!=() [1/2]

bool google::cloud::bigtable::v0::operator!= ( MetadataParamTypes const &  lhs,
MetadataParamTypes const &  rhs 
)
inline

Definition at line 59 of file metadata_update_policy.h.

◆ operator!=() [2/2]

bool google::cloud::bigtable::v0::operator!= ( RowRange const &  lhs,
RowRange const &  rhs 
)
inline

Definition at line 199 of file row_range.h.

◆ operator<<()

std::ostream & google::cloud::bigtable::v0::operator<< ( std::ostream &  os,
RowRange const &  x 
)

Print a human-readable representation of the range, mostly for testing.

Definition at line 209 of file row_range.cc.

◆ operator==() [1/2]

bool google::cloud::bigtable::v0::operator== ( MetadataParamTypes const &  lhs,
MetadataParamTypes const &  rhs 
)
inline

Definition at line 54 of file metadata_update_policy.h.

◆ operator==() [2/2]

bool google::cloud::bigtable::v0::operator== ( RowRange const &  lhs,
RowRange const &  rhs 
)

Definition at line 168 of file row_range.cc.

◆ ServerSetTimestamp()

constexpr std::int64_t google::cloud::bigtable::v0::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.

Definition at line 50 of file mutations.h.

◆ SetCell() [1/2]

template<typename ColumnType , typename ValueType >
Mutation google::cloud::bigtable::v0::SetCell ( std::string  family,
ColumnType &&  column,
std::chrono::milliseconds  timestamp,
ValueType &&  value 
)

Create a mutation to set a cell value.

Definition at line 54 of file mutations.h.

◆ SetCell() [2/2]

template<typename ColumnType , typename ValueType >
Mutation google::cloud::bigtable::v0::SetCell ( std::string  family,
ColumnType &&  column,
ValueType &&  value 
)

Create a mutation to set a cell value where the server sets the time.

These mutations are not idempotent and not retried by default.

Definition at line 72 of file mutations.h.

◆ TableName()

std::string google::cloud::bigtable::v0::TableName ( std::shared_ptr< DataClient client,
std::string const &  table_id 
)
inline

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.

Definition at line 62 of file table.h.

◆ version()

int constexpr google::cloud::bigtable::v0::version ( )

A single integer representing the Major/Minor/Patch version.

Definition at line 67 of file version.h.

◆ version_major()

int constexpr google::cloud::bigtable::v0::version_major ( )

The Cloud Bigtable C++ Client major version.

See also
https://semver.org/spec/v2.0.0.html for details.

Definition at line 50 of file version.h.

◆ version_minor()

int constexpr google::cloud::bigtable::v0::version_minor ( )

The Cloud Bigtable C++ Client minor version.

See also
https://semver.org/spec/v2.0.0.html for details.

Definition at line 57 of file version.h.

◆ version_patch()

int constexpr google::cloud::bigtable::v0::version_patch ( )

The Cloud Bigtable C++ Client patch version.

See also
https://semver.org/spec/v2.0.0.html for details.

Definition at line 64 of file version.h.

◆ version_string()

std::string google::cloud::bigtable::v0::version_string ( )

The version as a string, in MAJOR.MINOR.PATCH+gitrev format.

Definition at line 24 of file version.cc.