25 #ifndef KUDU_CLIENT_CLIENT_H
26 #define KUDU_CLIENT_CLIENT_H
38 #include "kudu/client/row_result.h"
39 #include "kudu/client/scan_predicate.h"
40 #include "kudu/client/schema.h"
42 #ifdef KUDU_HEADERS_NO_STUBS
43 #include <gtest/gtest_prod.h>
45 #include "kudu/gutil/macros.h"
46 #include "kudu/gutil/port.h"
48 #include "kudu/client/stubs.h"
50 #include "kudu/util/kudu_export.h"
51 #include "kudu/util/slice.h"
58 class ClientStressTest_TestUniqueClientIds_Test;
59 class DisableWriteWhenExceedingQuotaTest;
61 class MetaCacheLookupStressTest_PerfSynthetic_Test;
64 class PartitionSchema;
65 class SecurityUnknownTskTest;
77 namespace transactions {
80 class TxnSystemClient;
84 class LeaderMasterProxy;
85 class RemoteKsckCluster;
88 Status ShowTabletInfo(
const std::vector<std::string>& master_addresses,
89 const std::vector<std::string>& tablet_id);
94 class KuduColumnarScanBatch;
96 class KuduDeleteIgnore;
98 class KuduInsertIgnore;
99 class KuduLoggingCallback;
100 class KuduPartitioner;
103 class KuduStatusCallback;
104 class KuduTableAlterer;
105 class KuduTableCreator;
106 class KuduTableStatistics;
108 class KuduTabletServer;
110 class KuduUpdateIgnore;
112 class KuduUpsertIgnore;
114 class KuduWriteOperation;
115 class ResourceMetrics;
119 class ErrorCollector;
120 class GetTableSchemaRpc;
124 class RemoteTabletServer;
125 class ReplicaController;
126 class RetrieveAuthzTokenRpc;
127 class ScanBatchDataInterface;
128 class TabletInfoProvider;
130 template <
class ReqClass,
class RespClass>
132 template <
class ReqClass,
class RespClass>
156 void KUDU_EXPORT UninstallLoggingCallback();
173 void KUDU_EXPORT SetVerboseLogLevel(
int level);
184 Status KUDU_EXPORT SetInternalSignalNumber(
int signum) WARN_UNUSED_RESULT;
197 Status KUDU_EXPORT DisableSaslInitialization() WARN_UNUSED_RESULT;
222 Status KUDU_EXPORT DisableOpenSSLInitialization() WARN_UNUSED_RESULT;
226 std::
string KUDU_EXPORT GetShortVersionString();
230 std::
string KUDU_EXPORT GetAllVersionInfo();
418 class KUDU_NO_EXPORT Data;
420 friend class internal::ReplicaController;
446 public sp::enable_shared_from_this<KuduTransaction> {
525 Status IsCommitComplete(
bool* is_complete,
526 Status* completion_status) WARN_UNUSED_RESULT;
605 class KUDU_NO_EXPORT Data;
638 std::string* serialized_txn,
657 const std::
string& serialized_txn,
664 FRIEND_TEST(ClientTest, TxnIdOfTransactionalSession);
665 FRIEND_TEST(ClientTest, TxnToken);
667 class KUDU_NO_EXPORT Data;
718 bool* create_in_progress);
761 uint32_t reserve_seconds = 0);
779 Status DeleteTableInCatalogs(
const std::string& table_name,
780 bool modify_external_catalogs,
781 int32_t reserve_seconds = -1) KUDU_NO_EXPORT;
791 Status RecallTable(const std::
string& table_id, const std::
string& new_table_name = "");
811 Status IsAlterTableInProgress(const std::
string& table_name,
812 bool* alter_in_progress);
820 Status GetTableSchema(const std::
string& table_name,
839 Status ListTables(std::vector<std::
string>* tables,
840 const std::
string& filter = "");
850 Status ListSoftDeletedTables(std::vector<std::
string>* tables,
851 const std::
string& filter = "");
860 Status TableExists(const std::
string& table_name,
bool* exists);
878 Status OpenTable(const std::
string& table_name,
927 Status GetTablet(const std::
string& tablet_id,
937 Status GetTableStatistics(const std::
string& table_name,
947 std::
string GetMasterAddresses() const KUDU_NO_EXPORT;
1029 std::string GetHiveMetastoreUris() const KUDU_NO_EXPORT;
1036 bool GetHiveMetastoreSaslEnabled() const KUDU_NO_EXPORT;
1047 std::
string GetHiveMetastoreUuid() const KUDU_NO_EXPORT;
1055 std::
string location() const KUDU_NO_EXPORT;
1060 std::
string cluster_id() const KUDU_NO_EXPORT;
1064 class KUDU_NO_EXPORT Data;
1066 template <class ReqClass, class RespClass>
1067 friend class internal::AsyncLeaderMasterRpc;
1068 template <class ReqClass, class RespClass>
1069 friend class internal::AsyncRandomTxnManagerRpc;
1071 friend class ClientTest;
1072 friend class ConnectToClusterBaseTest;
1083 friend class internal::Batcher;
1084 friend class internal::GetTableSchemaRpc;
1085 friend class internal::LookupRpc;
1086 friend class internal::MetaCache;
1087 friend class internal::RemoteTablet;
1088 friend class internal::RemoteTabletServer;
1089 friend class internal::RetrieveAuthzTokenRpc;
1090 friend class internal::TabletInfoProvider;
1091 friend class internal::WriteRpc;
1092 friend class kudu::AuthzTokenTest;
1093 friend class kudu::DisableWriteWhenExceedingQuotaTest;
1094 friend class kudu::SecurityUnknownTskTest;
1095 friend class transactions::CoordinatorRpc;
1096 friend class transactions::ParticipantRpc;
1097 friend class transactions::TxnSystemClient;
1098 friend class tools::LeaderMasterProxy;
1099 friend class tools::RemoteKsckCluster;
1100 friend class tools::TableLister;
1101 friend class KeepAlivePeriodicallyTest;
1102 friend class ScanTokenTest;
1103 friend
Status tools::ShowTabletInfo(const std::vector<std::
string>& master_addresses,
1104 const std::vector<std::
string>& tablet_id);
1106 FRIEND_TEST(kudu::ClientStressTest, TestUniqueClientIds);
1107 FRIEND_TEST(kudu::MetaCacheLookupStressTest, PerfSynthetic);
1108 FRIEND_TEST(ClientTest, ClearCacheAndConcurrentWorkload);
1109 FRIEND_TEST(ClientTest, ConnectionNegotiationTimeout);
1110 FRIEND_TEST(ClientTest, TestBasicIdBasedLookup);
1111 FRIEND_TEST(ClientTest, TestCacheAuthzTokens);
1112 FRIEND_TEST(ClientTest, TestGetSecurityInfoFromMaster);
1113 FRIEND_TEST(ClientTest, TestGetTabletServerBlacklist);
1114 FRIEND_TEST(ClientTest, TestGetTabletServerDeterministic);
1115 FRIEND_TEST(ClientTest, TestMasterDown);
1116 FRIEND_TEST(ClientTest, TestMasterLookupPermits);
1117 FRIEND_TEST(ClientTest, TestMetaCacheExpiry);
1118 FRIEND_TEST(ClientTest, TestMetaCacheExpiryById);
1119 FRIEND_TEST(ClientTest, TestMetaCacheExpiryWithKeysAndIds);
1120 FRIEND_TEST(ClientTest, TestMetaCacheLookupNoLeaders);
1121 FRIEND_TEST(ClientTest, TestMetaCacheWithKeysAndIds);
1122 FRIEND_TEST(ClientTest, TestNonCoveringRangePartitions);
1123 FRIEND_TEST(ClientTest, TestRetrieveAuthzTokenInParallel);
1124 FRIEND_TEST(ClientTest, TestReplicatedTabletWritesWithLeaderElection);
1125 FRIEND_TEST(ClientTest, TestScanFaultTolerance);
1126 FRIEND_TEST(ClientTest, TestScanTimeout);
1127 FRIEND_TEST(ClientTest, TestWriteWithDeadMaster);
1128 FRIEND_TEST(MasterFailoverTest, TestPauseAfterCreateTableIssued);
1129 FRIEND_TEST(MultiTServerClientTest, TestSetReplicationFactor);
1162 const std::string& location() const KUDU_NO_EXPORT;
1166 class KUDU_NO_EXPORT Data;
1171 friend
Status tools::ShowTabletInfo(const std::vector<std::
string>& master_addresses,
1172 const std::vector<std::
string>& tablet_id);
1199 friend class internal::ReplicaController;
1201 class KUDU_NO_EXPORT Data;
1218 const std::string&
id()
const;
1225 const std::vector<const KuduReplica*>&
replicas()
const;
1231 class KUDU_NO_EXPORT Data;
1288 int32_t num_buckets);
1306 int32_t num_buckets,
1420 ATTRIBUTE_DEPRECATED(
"use add_range_partition_split() instead");
1491 class KUDU_NO_EXPORT Data;
1494 friend class transactions::TxnSystemClient;
1554 int32_t num_buckets,
1557 class KUDU_NO_EXPORT Data;
1608 class KUDU_NO_EXPORT Data;
1638 class KUDU_EXPORT
KuduTable :
public sp::enable_shared_from_this<KuduTable> {
1652 const std::string&
id()
const;
1765 std::vector<KuduBloomFilter*>* bloom_filters);
1808 const std::vector<Slice>& bloom_filters);
1835 std::vector<KuduValue*>* values);
1882 Status ListPartitions(std::vector<Partition>* partitions) KUDU_NO_EXPORT;
1887 class KUDU_NO_EXPORT Data;
1894 KuduTable(
const sp::shared_ptr<KuduClient>& client,
1895 const std::string& name,
1896 const std::string&
id,
1898 const std::string& owner,
1899 const std::string& comment,
1901 const PartitionSchema& partition_schema,
1902 const std::map<std::string, std::string>& extra_configs);
2069 const std::string& dimension_label,
2179 KuduTableAlterer* modify_external_catalogs(
bool modify_external_catalogs) KUDU_NO_EXPORT;
2190 class KUDU_NO_EXPORT Data;
2193 friend class tools::TableAlter;
2194 friend class kudu::AlterTableTest;
2196 FRIEND_TEST(MultiTServerClientTest, TestSetReplicationFactor);
2199 const std::string& name);
2244 class KUDU_NO_EXPORT Data;
2246 friend class internal::Batcher;
2247 friend class internal::ErrorCollector;
2317 class KUDU_EXPORT
KuduSession :
public sp::enable_shared_from_this<KuduSession> {
2629 bool HasPendingOperations() const;
2652 int CountBufferedOperations() const
2653 ATTRIBUTE_DEPRECATED("this method is experimental and will disappear "
2654 "in a future release");
2680 Status SetErrorBufferSpace(
size_t size_bytes);
2691 int CountPendingErrors() const;
2703 void GetPendingErrors(std::vector<
KuduError*>* errors,
bool* overflowed);
2712 class KUDU_NO_EXPORT Data;
2714 friend class ClientTest;
2717 friend class internal::Batcher;
2718 friend class tablet::FuzzTest;
2719 FRIEND_TEST(ClientTest, TestAutoFlushBackgroundAndErrorCollector);
2720 FRIEND_TEST(ClientTest, TestAutoFlushBackgroundApplyBlocks);
2721 FRIEND_TEST(ClientTest, TxnIdOfTransactionalSession);
2805 enum { kScanTimeoutMillis = 30000 };
2847 ATTRIBUTE_DEPRECATED(
"use SetProjectedColumnNames() instead");
2898 ATTRIBUTE_DEPRECATED(
"use AddLowerBound() instead");
2918 ATTRIBUTE_DEPRECATED(
"use AddExclusiveUpperBound() instead");
3029 ATTRIBUTE_DEPRECATED(
"use NextBatch(KuduScanBatch*) instead");
3101 ATTRIBUTE_DEPRECATED(
"use SetFaultTolerant() instead");
3122 Status SetSnapshotMicros(uint64_t snapshot_timestamp_micros) WARN_UNUSED_RESULT;
3133 Status SetSnapshotRaw(uint64_t snapshot_timestamp) WARN_UNUSED_RESULT;
3151 Status SetDiffScan(uint64_t start_timestamp, uint64_t end_timestamp)
3152 WARN_UNUSED_RESULT KUDU_NO_EXPORT;
3178 static const uint64_t NO_FLAGS = 0;
3185 static const uint64_t PAD_UNIXTIME_MICROS_TO_16_BYTES = 1 << 0;
3194 static const uint64_t COLUMNAR_LAYOUT = 1 << 1;
3231 Status SetLimit(int64_t limit) WARN_UNUSED_RESULT;
3238 std::
string ToString() const;
3241 class KUDU_NO_EXPORT Data;
3243 Status NextBatch(internal::ScanBatchDataInterface* batch);
3246 friend class FlexPartitioningTest;
3247 FRIEND_TEST(ClientTest, TestBlockScannerHijackingAttempts);
3248 FRIEND_TEST(ClientTest, TestScanCloseProxy);
3249 FRIEND_TEST(ClientTest, TestScanFaultTolerance);
3250 FRIEND_TEST(ClientTest, TestScanNoBlockCaching);
3251 FRIEND_TEST(ClientTest, TestScanTimeout);
3252 FRIEND_TEST(ClientTest, TestScanWithQueryId);
3253 FRIEND_TEST(ClientTest, TestReadAtSnapshotNoTimestampSet);
3254 FRIEND_TEST(ConsistencyITest, TestSnapshotScanTimestampReuse);
3255 FRIEND_TEST(KeepAlivePeriodicallyTest, TestScannerKeepAlivePeriodicallyCrossServers);
3256 FRIEND_TEST(KeepAlivePeriodicallyTest, TestScannerKeepAlivePeriodicallyScannerTolerate);
3257 FRIEND_TEST(KeepAlivePeriodicallyTest, TestStopKeepAlivePeriodically);
3258 FRIEND_TEST(ScanTokenTest, TestScanTokens);
3259 FRIEND_TEST(ScanTokenTest, TestScanTokens_NonUniquePrimaryKey);
3260 FRIEND_TEST(ScanTokenTest, TestScanTokensWithQueryId);
3330 const std::string& serialized_token,
3334 class KUDU_NO_EXPORT Data;
3420 Status SetSnapshotMicros(uint64_t snapshot_timestamp_micros)
3424 Status SetSnapshotRaw(uint64_t snapshot_timestamp) WARN_UNUSED_RESULT;
3429 Status SetDiffScan(uint64_t start_timestamp, uint64_t end_timestamp)
3430 WARN_UNUSED_RESULT KUDU_NO_EXPORT;
3434 Status SetTimeoutMillis(
int millis) WARN_UNUSED_RESULT;
3443 Status IncludeTableMetadata(
bool include_metadata) WARN_UNUSED_RESULT;
3452 Status IncludeTabletMetadata(
bool include_metadata) WARN_UNUSED_RESULT;
3461 Status SetQueryId(const std::
string& query_id);
3473 void SetSplitSizeBytes(uint64_t split_size_bytes);
3486 class KUDU_NO_EXPORT Data;
3531 class KUDU_NO_EXPORT Data;
3571 class KUDU_NO_EXPORT Data;
A row which may only contain values for a subset of the columns.
Definition: partial_row.h:72
A representation of a time interval.
Definition: monotime.h:58
A wrapper around externally allocated data.
Definition: slice.h:51
A representation of an operation's outcome.
Definition: status.h:183
A "factory" for KuduClient objects.
Definition: client.h:236
KuduClientBuilder & clear_master_server_addrs()
KuduClientBuilder & master_server_addrs(const std::vector< std::string > &addrs)
Status Build(sp::shared_ptr< KuduClient > *client)
KuduClientBuilder & default_rpc_timeout(const MonoDelta &timeout)
KuduClientBuilder & require_authentication(bool require_authentication)
KuduClientBuilder & trusted_certificate(const std::string &cert_pem)
KuduClientBuilder & rpc_max_message_size(int64_t size)
KuduClientBuilder & encryption_policy(EncryptionPolicy encryption_policy)
EncryptionPolicy
Policy for on-the-wire encryption.
Definition: client.h:242
KuduClientBuilder & import_authentication_credentials(std::string authn_creds)
KuduClientBuilder & default_admin_operation_timeout(const MonoDelta &timeout)
KuduClientBuilder & num_reactors(int num_reactors)
Set the number of reactors for the RPC messenger.
KuduClientBuilder & sasl_protocol_name(const std::string &sasl_protocol_name)
KuduClientBuilder & jwt(const std::string &jwt)
KuduClientBuilder & add_master_server_addr(const std::string &addr)
KuduClientBuilder & connection_negotiation_timeout(const MonoDelta &timeout)
A handle for a connection to a cluster.
Definition: client.h:699
KuduTableCreator * NewTableCreator()
const MonoDelta & default_admin_operation_timeout() const
void SetLatestObservedTimestamp(uint64_t ht_timestamp)
static const uint64_t kNoTimestamp
Definition: client.h:979
bool IsMultiMaster() const
Status IsCreateTableInProgress(const std::string &table_name, bool *create_in_progress)
MonoDelta connection_negotiation_timeout() const
Status DeleteTable(const std::string &table_name)
uint64_t GetLatestObservedTimestamp() const
const MonoDelta & default_rpc_timeout() const
Status SoftDeleteTable(const std::string &table_name, uint32_t reserve_seconds=0)
Status ExportAuthenticationCredentials(std::string *authn_creds) const
ReplicaSelection
Policy with which to choose amongst multiple replicas.
Definition: client.h:952
@ LEADER_ONLY
Select the LEADER replica.
Definition: client.h:953
Builder API for specifying or altering a column within a table schema.
Definition: schema.h:370
A batch of columnar data returned from a scanner.
Definition: columnar_scan_batch.h:51
A single row delete ignore to be sent to the cluster.
Definition: write_op.h:331
A single row delete to be sent to the cluster.
Definition: write_op.h:305
This class represents an error which occurred in a write operation.
Definition: client.h:2212
const Status & status() const
const KuduWriteOperation & failed_op() const
bool was_possibly_successful() const
KuduWriteOperation * release_failed_op()
A single row insert ignore to be sent to the cluster, duplicate row errors are ignored.
Definition: write_op.h:172
A single row insert to be sent to the cluster.
Definition: write_op.h:145
The interface for all logging callbacks.
Definition: callbacks.h:44
Builder for Partitioner instances.
Definition: client.h:3495
KuduPartitionerBuilder * SetBuildTimeout(MonoDelta timeout)
KuduPartitionerBuilder(sp::shared_ptr< KuduTable > table)
Status Build(KuduPartitioner **partitioner)
Definition: client.h:3549
Status PartitionRow(const KuduPartialRow &row, int *partition)
int NumPartitions() const
A representation of comparison predicate for Kudu queries.
Definition: scan_predicate.h:43
ComparisonOp
Supported comparison operators.
Definition: scan_predicate.h:46
Definition: client.h:1510
Status add_hash_partitions(const std::vector< std::string > &columns, int32_t num_buckets, int32_t seed=0)
KuduRangePartition(KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, KuduTableCreator::RangePartitionBound lower_bound_type=KuduTableCreator::INCLUSIVE_BOUND, KuduTableCreator::RangePartitionBound upper_bound_type=KuduTableCreator::EXCLUSIVE_BOUND)
In-memory representation of a remote tablet's replica.
Definition: client.h:1183
const KuduTabletServer & ts() const
A batch of zero or more rows returned by a scan operation.
Definition: scan_batch.h:84
Builds scan tokens for a table.
Definition: client.h:3349
Status SetProjectedColumnIndexes(const std::vector< int > &col_indexes) WARN_UNUSED_RESULT
Status SetProjectedColumnNames(const std::vector< std::string > &col_names) WARN_UNUSED_RESULT
Status SetSelection(KuduClient::ReplicaSelection selection) WARN_UNUSED_RESULT
Status SetBatchSizeBytes(uint32_t batch_size) WARN_UNUSED_RESULT
Status SetFaultTolerant() WARN_UNUSED_RESULT
Status SetCacheBlocks(bool cache_blocks) WARN_UNUSED_RESULT
KuduScanTokenBuilder(KuduTable *table)
Status AddConjunctPredicate(KuduPredicate *pred) WARN_UNUSED_RESULT
Status AddUpperBound(const KuduPartialRow &key) WARN_UNUSED_RESULT
Status SetReadMode(KuduScanner::ReadMode read_mode) WARN_UNUSED_RESULT
Status AddLowerBound(const KuduPartialRow &key) WARN_UNUSED_RESULT
A scan descriptor limited to a single physical contiguous location.
Definition: client.h:3288
const KuduTablet & tablet() const
Status Serialize(std::string *buf) const WARN_UNUSED_RESULT
Status IntoKuduScanner(KuduScanner **scanner) const WARN_UNUSED_RESULT
static Status DeserializeIntoScanner(KuduClient *client, const std::string &serialized_token, KuduScanner **scanner) WARN_UNUSED_RESULT
This class is a representation of a single scan.
Definition: client.h:2737
Status SetQueryId(const std::string &query_id)
Status SetFaultTolerant() WARN_UNUSED_RESULT
Status SetReadMode(ReadMode read_mode) WARN_UNUSED_RESULT
KuduScanner(KuduTable *table)
ReadMode
The read modes for scanners.
Definition: client.h:2740
@ READ_AT_SNAPSHOT
Definition: client.h:2769
@ READ_LATEST
Definition: client.h:2748
OrderMode
Definition: client.h:2787
@ UNORDERED
Definition: client.h:2793
Status NextBatch(std::vector< KuduRowResult > *rows)
Status AddConjunctPredicate(KuduPredicate *pred) WARN_UNUSED_RESULT
Status SetCacheBlocks(bool cache_blocks)
Status AddExclusiveUpperBound(const KuduPartialRow &key)
Status SetProjectedColumns(const std::vector< std::string > &col_names) WARN_UNUSED_RESULT
Status NextBatch(KuduColumnarScanBatch *batch)
Status AddLowerBound(const KuduPartialRow &key)
Status StartKeepAlivePeriodically(uint64_t keep_alive_interval_ms=30000)
Status SetProjectedColumnIndexes(const std::vector< int > &col_indexes) WARN_UNUSED_RESULT
Status SetOrderMode(OrderMode order_mode) WARN_UNUSED_RESULT
Status AddExclusiveUpperBoundPartitionKeyRaw(const Slice &partition_key)
Status AddExclusiveUpperBoundRaw(const Slice &key)
Status AddLowerBoundPartitionKeyRaw(const Slice &partition_key)
Status SetProjectedColumnNames(const std::vector< std::string > &col_names) WARN_UNUSED_RESULT
Status GetCurrentServer(KuduTabletServer **server)
const ResourceMetrics & GetResourceMetrics() const
Status NextBatch(KuduScanBatch *batch)
Status SetSelection(KuduClient::ReplicaSelection selection) WARN_UNUSED_RESULT
void StopKeepAlivePeriodically()
Status SetBatchSizeBytes(uint32_t batch_size)
Status AddLowerBoundRaw(const Slice &key)
A representation of a table's schema.
Definition: schema.h:688
Representation of a Kudu client session.
Definition: client.h:2317
void SetTimeoutMillis(int millis)
Status SetExternalConsistencyMode(ExternalConsistencyMode m) WARN_UNUSED_RESULT
Status Flush() WARN_UNUSED_RESULT
Status SetMutationBufferFlushWatermark(double watermark_pct) WARN_UNUSED_RESULT
Status SetFlushMode(FlushMode m) WARN_UNUSED_RESULT
ExternalConsistencyMode
The possible external consistency modes on which Kudu operates.
Definition: client.h:2383
@ CLIENT_PROPAGATED
Definition: client.h:2402
Status SetMutationBufferFlushInterval(unsigned int millis) WARN_UNUSED_RESULT
FlushMode
Modes of flush operations.
Definition: client.h:2322
@ AUTO_FLUSH_BACKGROUND
Definition: client.h:2355
@ AUTO_FLUSH_SYNC
Definition: client.h:2327
Status SetMutationBufferMaxNum(unsigned int max_num) WARN_UNUSED_RESULT
Status Apply(KuduWriteOperation *write_op) WARN_UNUSED_RESULT
Status SetMutationBufferSpace(size_t size_bytes) WARN_UNUSED_RESULT
The interface for all status callbacks.
Definition: callbacks.h:161
Alters an existing table based on the provided steps.
Definition: client.h:1921
KuduTableAlterer * SetOwner(const std::string &new_owner)
KuduTableAlterer * AlterExtraConfig(const std::map< std::string, std::string > &extra_configs)
KuduTableAlterer * AddRangePartition(KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, KuduTableCreator::RangePartitionBound lower_bound_type=KuduTableCreator::INCLUSIVE_BOUND, KuduTableCreator::RangePartitionBound upper_bound_type=KuduTableCreator::EXCLUSIVE_BOUND)
KuduColumnSpec * AlterColumn(const std::string &name)
KuduTableAlterer * wait(bool wait)
KuduTableAlterer * AddRangePartitionWithDimension(KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, const std::string &dimension_label, KuduTableCreator::RangePartitionBound lower_bound_type=KuduTableCreator::INCLUSIVE_BOUND, KuduTableCreator::RangePartitionBound upper_bound_type=KuduTableCreator::EXCLUSIVE_BOUND)
KuduTableAlterer * AddRangePartition(KuduRangePartition *partition)
KuduTableAlterer * SetComment(const std::string &new_comment)
KuduTableAlterer * DropRangePartition(KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, KuduTableCreator::RangePartitionBound lower_bound_type=KuduTableCreator::INCLUSIVE_BOUND, KuduTableCreator::RangePartitionBound upper_bound_type=KuduTableCreator::EXCLUSIVE_BOUND)
KuduTableAlterer * DropColumn(const std::string &name)
KuduTableAlterer * RenameTo(const std::string &new_name)
KuduColumnSpec * AddColumn(const std::string &name)
KuduTableAlterer * timeout(const MonoDelta &timeout)
KuduTableAlterer * SetTableRowCountLimit(int64_t row_count_limit)
KuduTableAlterer * SetTableDiskSizeLimit(int64_t disk_size_limit)
A helper class to create a new table with the desired options.
Definition: client.h:1242
RangePartitionBound
Range partition bound type.
Definition: client.h:1324
@ INCLUSIVE_BOUND
An inclusive bound.
Definition: client.h:1326
@ EXCLUSIVE_BOUND
An exclusive bound.
Definition: client.h:1325
KuduTableCreator & extra_configs(const std::map< std::string, std::string > &extra_configs)
KuduTableCreator & split_rows(const std::vector< const KuduPartialRow * > &split_rows)
KuduTableCreator & table_name(const std::string &name)
KuduTableCreator & add_custom_range_partition(class KuduRangePartition *partition)
KuduTableCreator & schema(const KuduSchema *schema)
KuduTableCreator & set_range_partition_columns(const std::vector< std::string > &columns)
KuduTableCreator & wait(bool wait)
KuduTableCreator & timeout(const MonoDelta &timeout)
KuduTableCreator & add_hash_partitions(const std::vector< std::string > &columns, int32_t num_buckets)
KuduTableCreator & add_hash_partitions(const std::vector< std::string > &columns, int32_t num_buckets, int32_t seed)
KuduTableCreator & num_replicas(int n_replicas)
KuduTableCreator & add_range_partition(KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, RangePartitionBound lower_bound_type=INCLUSIVE_BOUND, RangePartitionBound upper_bound_type=EXCLUSIVE_BOUND)
KuduTableCreator & set_owner(const std::string &owner)
KuduTableCreator & set_allow_empty_partition(bool allow_empty_partition)
KuduTableCreator & add_range_partition_split(KuduPartialRow *split_row)
KuduTableCreator & dimension_label(const std::string &dimension_label)
KuduTableCreator & set_comment(const std::string &comment)
In-memory statistics of table.
Definition: client.h:1569
int64_t on_disk_size_limit() const
int64_t live_row_count() const
std::string ToString() const
int64_t live_row_count_limit() const
int64_t on_disk_size() const
A representation of a table on a particular cluster.
Definition: client.h:1638
const PartitionSchema & partition_schema() const
KuduClient * client() const
KuduInsertIgnore * NewInsertIgnore()
KuduPredicate * NewInBloomFilterPredicate(const Slice &col_name, std::vector< KuduBloomFilter * > *bloom_filters)
KuduPredicate * NewInListPredicate(const Slice &col_name, std::vector< KuduValue * > *values)
KuduUpsertIgnore * NewUpsertIgnore()
const std::string & comment() const
const std::string & owner() const
KuduPredicate * NewIsNullPredicate(const Slice &col_name)
const std::map< std::string, std::string > & extra_configs() const
KuduDeleteIgnore * NewDeleteIgnore()
KuduUpdateIgnore * NewUpdateIgnore()
const std::string & id() const
const std::string & name() const
KuduPredicate * NewComparisonPredicate(const Slice &col_name, KuduPredicate::ComparisonOp op, KuduValue *value)
const KuduSchema & schema() const
KuduPredicate * NewIsNotNullPredicate(const Slice &col_name)
KuduPredicate * NewInBloomFilterPredicate(const Slice &col_name, const std::vector< Slice > &bloom_filters)
In-memory representation of a remote tablet server.
Definition: client.h:1140
const std::string & hostname() const
const std::string & uuid() const
In-memory representation of a remote tablet.
Definition: client.h:1212
const std::string & id() const
const std::vector< const KuduReplica * > & replicas() const
SerializationOptions & enable_keepalive(bool enable)
Status Commit() WARN_UNUSED_RESULT
Status Serialize(std::string *serialized_txn, const SerializationOptions &options=SerializationOptions()) const WARN_UNUSED_RESULT
Status CreateSession(sp::shared_ptr< KuduSession > *session) WARN_UNUSED_RESULT
A single row update ignore to be sent to the cluster, missing row errors and errors on updating immut...
Definition: write_op.h:279
A single row update to be sent to the cluster.
Definition: write_op.h:252
A single row upsert ignore to be sent to the cluster, errors on updating immutable cells are ignored.
Definition: write_op.h:225
A single row upsert to be sent to the cluster.
Definition: write_op.h:198
A constant cell value with a specific type.
Definition: value.h:37
A single-row write operation to be sent to a Kudu table.
Definition: write_op.h:66
A generic catalog of simple metrics.
Definition: resource_metrics.h:41
Smart pointer typedefs for externally-faced code.