Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A36EB200C11 for ; Fri, 20 Jan 2017 20:18:40 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A20ED160B58; Fri, 20 Jan 2017 19:18:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1DD24160B62 for ; Fri, 20 Jan 2017 20:18:36 +0100 (CET) Received: (qmail 88144 invoked by uid 500); 20 Jan 2017 19:18:36 -0000 Mailing-List: contact commits-help@kudu.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kudu.apache.org Delivered-To: mailing list commits@kudu.apache.org Received: (qmail 87464 invoked by uid 99); 20 Jan 2017 19:18:35 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jan 2017 19:18:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A0D13F171A; Fri, 20 Jan 2017 19:18:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: todd@apache.org To: commits@kudu.apache.org Date: Fri, 20 Jan 2017 19:18:51 -0000 Message-Id: <5f01cb16347e4f8aaad4937e39b6ec06@git.apache.org> In-Reply-To: <46889001f20f48bba1bd694541af91af@git.apache.org> References: <46889001f20f48bba1bd694541af91af@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [17/51] [partial] kudu git commit: Update site for 1.2.0 release archived-at: Fri, 20 Jan 2017 19:18:40 -0000 http://git-wip-us.apache.org/repos/asf/kudu/blob/95b9a7ab/cpp-client-api/schema_8h_source.html ---------------------------------------------------------------------- diff --git a/cpp-client-api/schema_8h_source.html b/cpp-client-api/schema_8h_source.html index cea33c1..84ede85 100644 --- a/cpp-client-api/schema_8h_source.html +++ b/cpp-client-api/schema_8h_source.html @@ -3,15 +3,16 @@ - + Kudu C++ client API: include/kudu/client/schema.h Source File + @@ -21,7 +22,7 @@ - @@ -30,7 +31,7 @@
+
Kudu C++ client API
- + @@ -69,7 +70,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages +
@@ -80,7 +81,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
@@ -88,302 +89,36 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
schema.h
-
1 //
-
2 // Licensed to the Apache Software Foundation (ASF) under one
-
3 // or more contributor license agreements. See the NOTICE file
-
4 // distributed with this work for additional information
-
5 // regarding copyright ownership. The ASF licenses this file
-
6 // to you under the Apache License, Version 2.0 (the
-
7 // "License"); you may not use this file except in compliance
-
8 // with the License. You may obtain a copy of the License at
-
9 //
-
10 // http://www.apache.org/licenses/LICENSE-2.0
-
11 //
-
12 // Unless required by applicable law or agreed to in writing,
-
13 // software distributed under the License is distributed on an
-
14 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-
15 // KIND, either express or implied. See the License for the
-
16 // specific language governing permissions and limitations
-
17 // under the License.
-
18 #ifndef KUDU_CLIENT_SCHEMA_H
-
19 #define KUDU_CLIENT_SCHEMA_H
-
20 
-
21 #include <string>
-
22 #include <vector>
-
23 
-
24 #include "kudu/client/value.h"
-
25 #include "kudu/util/kudu_export.h"
-
26 
-
27 namespace kudu {
-
28 
-
29 class ColumnSchema;
-
30 class KuduPartialRow;
-
31 class Schema;
-
32 class TestWorkload;
-
33 
-
34 namespace tools {
-
35 class RemoteKsckMaster;
-
36 class ReplicaDumper;
-
37 }
-
38 
-
39 namespace client {
-
40 
-
41 namespace internal {
-
42 class GetTableSchemaRpc;
-
43 class LookupRpc;
-
44 class MetaCacheEntry;
-
45 class WriteRpc;
-
46 } // namespace internal
-
47 
-
48 class KuduClient;
-
49 class KuduSchema;
-
50 class KuduSchemaBuilder;
-
51 class KuduWriteOperation;
-
52 
-
54 class KUDU_EXPORT KuduColumnStorageAttributes {
-
55  public:
-
57  enum EncodingType {
-
58  AUTO_ENCODING = 0,
-
59  PLAIN_ENCODING = 1,
-
60  PREFIX_ENCODING = 2,
-
61  GROUP_VARINT = 3,
-
62  RLE = 4,
-
63  DICT_ENCODING = 5,
-
64  BIT_SHUFFLE = 6
-
65  };
-
66 
- -
69  DEFAULT_COMPRESSION = 0,
-
70  NO_COMPRESSION = 1,
-
71  SNAPPY = 2,
-
72  LZ4 = 3,
-
73  ZLIB = 4,
-
74  };
-
75 
-
76 
- -
89  EncodingType encoding = AUTO_ENCODING,
-
90  CompressionType compression = DEFAULT_COMPRESSION,
-
91  int32_t block_size = 0)
-
92  ATTRIBUTE_DEPRECATED("this constructor will be private in a future release")
-
93  : encoding_(encoding),
-
94  compression_(compression),
-
95  block_size_(block_size) {
-
96  }
-
97 
-
99  const EncodingType encoding() const {
-
100  return encoding_;
-
101  }
-
102 
-
104  const CompressionType compression() const {
-
105  return compression_;
-
106  }
-
107 
-
109  std::string ToString() const;
-
110 
-
111  private:
-
112  EncodingType encoding_;
-
113  CompressionType compression_;
-
114  int32_t block_size_;
-
115 };
-
116 
-
118 class KUDU_EXPORT KuduColumnSchema {
-
119  public:
-
121  enum DataType {
-
122  INT8 = 0,
-
123  INT16 = 1,
-
124  INT32 = 2,
-
125  INT64 = 3,
-
126  STRING = 4,
-
127  BOOL = 5,
-
128  FLOAT = 6,
-
129  DOUBLE = 7,
-
130  BINARY = 8,
-
131  UNIXTIME_MICROS = 9,
-
132  TIMESTAMP = UNIXTIME_MICROS
-
133  };
-
134 
-
138  static std::string DataTypeToString(DataType type);
-
139 
-
156  KuduColumnSchema(const std::string &name,
-
157  DataType type,
-
158  bool is_nullable = false,
-
159  const void* default_value = NULL,
- -
161  ATTRIBUTE_DEPRECATED("use KuduSchemaBuilder instead");
-
162 
-
167  KuduColumnSchema(const KuduColumnSchema& other);
-
168  ~KuduColumnSchema();
-
169 
-
175  KuduColumnSchema& operator=(const KuduColumnSchema& other);
-
176 
-
181  void CopyFrom(const KuduColumnSchema& other);
-
182 
-
188  bool Equals(const KuduColumnSchema& other) const;
-
189 
-
196  const std::string& name() const;
-
197 
-
199  DataType type() const;
-
200 
-
202  bool is_nullable() const;
-
204 
-
205  private:
-
206  friend class KuduColumnSpec;
-
207  friend class KuduSchema;
-
208  friend class KuduSchemaBuilder;
-
209  // KuduTableAlterer::Data needs to be a friend. Friending the parent class
-
210  // is transitive to nested classes. See http://tiny.cloudera.com/jwtui
-
211  friend class KuduTableAlterer;
-
212 
- -
214 
-
215  // Owned.
-
216  ColumnSchema* col_;
-
217 };
-
218 
-
227 class KUDU_EXPORT KuduColumnSpec {
-
228  public:
-
240  KuduColumnSpec* Default(KuduValue* value);
-
241 
-
247  KuduColumnSpec* Compression(KuduColumnStorageAttributes::CompressionType compression);
-
248 
-
256  KuduColumnSpec* Encoding(KuduColumnStorageAttributes::EncodingType encoding);
-
257 
-
277  KuduColumnSpec* BlockSize(int32_t block_size);
-
278 
-
291  KuduColumnSpec* PrimaryKey();
-
292 
-
298  KuduColumnSpec* NotNull();
-
299 
-
305  KuduColumnSpec* Nullable();
-
306 
-
314  KuduColumnSpec* Type(KuduColumnSchema::DataType type);
-
316 
-
326  KuduColumnSpec* RemoveDefault();
-
327 
-
333  KuduColumnSpec* RenameTo(const std::string& new_name);
-
335 
-
336  private:
-
337  class KUDU_NO_EXPORT Data;
-
338  friend class KuduSchemaBuilder;
-
339  friend class KuduTableAlterer;
-
340 
-
341  // This class should always be owned and deleted by one of its friends,
-
342  // not the user.
-
343  ~KuduColumnSpec();
-
344 
-
345  explicit KuduColumnSpec(const std::string& col_name);
-
346 
-
347  Status ToColumnSchema(KuduColumnSchema* col) const;
-
348 
-
349  // Owned.
-
350  Data* data_;
-
351 };
-
352 
-
374 class KUDU_EXPORT KuduSchemaBuilder {
-
375  public:
- - -
378 
-
385  KuduColumnSpec* AddColumn(const std::string& name);
-
386 
-
394  KuduSchemaBuilder* SetPrimaryKey(const std::vector<std::string>& key_col_names);
-
395 
-
405  Status Build(KuduSchema* schema);
-
406 
-
407  private:
-
408  class KUDU_NO_EXPORT Data;
-
409  // Owned.
-
410  Data* data_;
-
411 };
-
412 
-
414 class KUDU_EXPORT KuduSchema {
-
415  public:
-
416  KuduSchema();
-
417 
-
422  KuduSchema(const KuduSchema& other);
-
423  ~KuduSchema();
-
424 
-
431  KuduSchema& operator=(const KuduSchema& other);
-
432  void CopyFrom(const KuduSchema& other);
-
434 
-
444  Status Reset(const std::vector<KuduColumnSchema>& columns, int key_columns)
-
445  ATTRIBUTE_DEPRECATED("this method will be removed in a future release")
-
446  WARN_UNUSED_RESULT;
-
447 
-
454  bool Equals(const KuduSchema& other) const;
-
455 
-
459  KuduColumnSchema Column(size_t idx) const;
-
460 
-
462  size_t num_columns() const;
-
463 
-
472  void GetPrimaryKeyColumnIndexes(std::vector<int>* indexes) const;
-
473 
-
481  KuduPartialRow* NewRow() const;
-
482 
-
483  private:
-
484  friend class KuduClient;
-
485  friend class KuduScanner;
-
486  friend class KuduScanToken;
-
487  friend class KuduScanTokenBuilder;
-
488  friend class KuduSchemaBuilder;
-
489  friend class KuduTable;
-
490  friend class KuduTableCreator;
-
491  friend class KuduWriteOperation;
-
492  friend class ScanConfiguration;
-
493  friend class internal::GetTableSchemaRpc;
-
494  friend class internal::LookupRpc;
-
495  friend class internal::MetaCacheEntry;
-
496  friend class internal::WriteRpc;
-
497  friend class tools::RemoteKsckMaster;
-
498  friend class tools::ReplicaDumper;
-
499 
-
500  friend KuduSchema KuduSchemaFromSchema(const Schema& schema);
-
501 
-
502 
-
503  // For use by kudu tests.
-
504  explicit KuduSchema(const Schema& schema);
-
505 
-
506  // Private since we don't want users to rely on the first N columns
-
507  // being the keys.
-
508  size_t num_key_columns() const;
-
509 
-
510  // Owned.
-
511  Schema* schema_;
-
512 };
-
513 
-
514 } // namespace client
-
515 } // namespace kudu
-
516 #endif // KUDU_CLIENT_SCHEMA_H
-
A representation of a table's schema.
Definition: schema.h:414
-
A representation of an operation's outcome.
Definition: status.h:116
+
1 //
2 // Licensed to the Apache Software Foundation (ASF) under one
3 // or more contributor license agreements. See the NOTICE file
4 // distributed with this work for additional information
5 // regarding copyright ownership. The ASF licenses this file
6 // to you under the Apache License, Version 2.0 (the
7 // "License"); you may not use this file except in compliance
8 // with the License. You may obtain a copy of the License at
9 //
10 // http://www.apache.org/licenses/LICENSE-2.0
11 //
12 // Unless required by applicable law or agreed to in writing,
13  ;// software distributed under the License is distributed on an
14 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 // KIND, either express or implied. See the License for the
16 // specific language governing permissions and limitations
17 // under the License.
18 #ifndef KUDU_CLIENT_SCHEMA_H
19 #define KUDU_CLIENT_SCHEMA_H
20 
21 #include <string>
22 #include <vector>
23 
24 #include "kudu/client/value.h"
25 #include "kudu/util/kudu_export.h"
26 
27 namespace kudu {
28 
29 class ColumnSchema;
30 class KuduPartialRow;
31 class Schema;
32 class TestWorkload;
33 
34 namespace tools {
< span class="lineno"> 35 class RemoteKsckMaster;
36 class ReplicaDumper;
37 }
38 
39 namespace client {
40 
41 namespace internal {
42 class GetTableSchemaRpc;
43 class L ookupRpc;
44 class MetaCacheEntry;
45 class WriteRpc;
46 } // namespace internal
47 
48 class KuduClient;
49 class KuduSchema;
50 class KuduSchemaBuilder;
51 cla ss KuduWriteOperation;
52 
54 class KUDU_EXPORT KuduColumnStorageAttributes {
55  public:
57  enum EncodingType {
58  AUTO_ENCODING = 0,
59  PLAIN_ENCODING = 1,
60  PREFIX_ENCODING = 2,
61  RLE = 4,
62  DICT_ENCODING = 5,
63  BIT_SHUFFLE = 6,
64 
67  GROUP_VARINT = 3
68  };
69 
72  DEFAULT_COMPRESSION = 0,
73  NO_COMPRESSION = 1,
74  SNAPPY = 2,
75  LZ4 = 3,
76  ZLIB = 4,
77  };
78 
79 
92  EncodingType encoding = AUTO_ENCODING,
93  CompressionType compression = DEFAULT_COMPRESSION,
94  int32_t block_size = 0)
95  ATTRIBUTE_DEPRECATED("this constructor will be private in a future release")
96  : encoding_(encoding),
97  compression_(compression),
98  block_size_(block_size) {
99  }
100 
102  const EncodingType encoding() const {
103  return encoding_;
104  }
105 
107  const CompressionType compression() const {
108  return compression_;
109  }
110 
112  std::string ToString() const;
113 
114  private:
115  EncodingType encoding_;
116  CompressionType compression_;
117  int32_t block_size_;
118 };
119 
121 class KUDU_EXPORT KuduColumnSchema {
122  public:
124  enum DataType {
125  INT8 = 0,
126  INT16 = 1,
127  INT32 = 2,
128  INT64 = 3,
129  STRING = 4,
130  BOOL = 5,
131  FLOAT = 6,
132  DOUBLE = 7,
133  BINARY = 8,
134  UNIXTIME_MICROS = 9,
135  TIMESTAMP = UNIXTIME_MICROS
136  };
137 
141  static s td::string DataTypeToString(DataType type);
142 
159  KuduColumnSchema(const std::string &name,
160  DataType type,
161  bool is_nullable = false,
162  const void* default_value = NULL,
164  ATTRIBUTE_DEPRECATED("use KuduSchemaBuilder instead");
165 
171  ~KuduColumnSchema();
172 
178  KuduColumnSchema& operator=(const KuduColumnSchema& other);
179 
184  void CopyFrom(const KuduColumnSchema& other);
185 
191  bool Equals(const KuduColumnSchema& other) const;
192 
199  const std::string& name() const;
200 
202  DataType type() const;
203 
205  bool is_nullable() const;
207 
208  private:
209  friend class KuduColumnSpec;
210  friend class KuduSchema;
211  friend class KuduSchemaBuilder;
212  // KuduTableAlterer::Data needs to be a friend. Friending the parent class
213  // is transitive to nested classes. See http://tiny.cloudera.com/jwtui
214  friend class KuduTableAlterer;
215 
217 
218  // Owned.
219  ColumnSchema* col_;
220 };
221 
230 class KUDU_EXPORT KuduColumnSpec {
231  public:
243  KuduColumnSpec* Default(KuduValue* value);
244 
250  KuduColumnSpec* Compression(KuduColumnStorageAttributes::CompressionType compression);
251 
259  KuduColumnSpec* Encoding(KuduColumnStorageAttributes::EncodingType encoding);
260 
280  KuduColumnSpec* BlockSize(int32_t block_size);
281 
294  KuduColumnSpec* PrimaryKey();
295 
301  KuduColumnSpec* NotNull();
302 
308  KuduColumnSpec* Nullable();
309 
317  KuduColumnSpec* Type(KuduColumnSchema::DataType type);
319 
329  KuduColumnSpec* RemoveDefault();
330 
336  KuduColumnSpec* RenameTo(const std::string& new_name);
338 
339  private:
340  class KUDU_NO_EXPORT Data;
341  friend class KuduSchemaBuilder;
342  friend class KuduTableAlterer;
343 
344  // This class should always be owned and deleted by one of its friends,
345  // not the user.
346  ~KuduColumnSpec();
347 
348  explicit KuduColumnSpec(const std::string& col_name);
349 
350  Status ToColumnSchema(KuduColumnSchema* col) const;
351 
352  // Owned.
353  Data* data_;
354 };
355 
377 class KUDU_EXPORT KuduSchemaBuilder {
378  public:
380  ~KuduSchemaBuilder( );
381 
388  KuduColumnSpec* AddColumn(const std::string& name);
389 
397  KuduSchemaBuilder* SetPrimaryKey(const std::vector<std::string>& key_col_names);
398 
409 
410  private:
411  class KUDU_NO_EXPORT Data;
412  // Owned.
413  Data* data_;
414 };
415 
417 class KUDU_EXPORT KuduSchema {
418  public:
419  KuduSchema();
420 
425  KuduSchema(const KuduSchema& other);
426  ~KuduSchema();
427 
434  KuduSchema& operator=(const KuduSchema& other);
435  void CopyFrom(const KuduSchema& other);
437 
447  Status Reset(const std::vector<KuduColumnSchema>& columns, int key_columns)
448  ATTRIBUTE_DEPRECATED("this method will be removed in a future release")
449  WARN_UNUSED_RESULT;
450 
457  bool Equals(const KuduSchema& other) const;
458 
462  KuduColumnSchema Column(size_t idx) const;
463 
465  size_t num_columns() const;
466 
475  void GetPrimaryKeyColumnIndexes(std::vector<int>* indexes) const;
476 
484  KuduPartialRow* NewRow() const;
485 
486  private:
487  friend class KuduClient;
488  friend class KuduScanner;
489  friend class KuduScanToken;
490  friend class KuduScanTokenBuilder;
491< /span>  friend class KuduSchemaBuilder;
492  friend class KuduTable;
493  friend class KuduTableCreator;
494  friend class KuduWriteOperation;
495  friend class ScanConfiguration;
496  friend class internal::GetTableSchemaRpc;
497  friend class internal::LookupRpc;
498  friend class internal::MetaCacheEntry;
499  friend class internal::WriteRpc;
500  friend class tools::RemoteKsckMaster;
501  friend class tools::ReplicaDumper;
502 
503  friend KuduSchema KuduSchemaFromSchema(const Schema& schema);
504 
505 
506  // For use by kudu tests.
507  explicit KuduSchema(const Schema& schema);
508 
509  // Private since we don't want users to rely on the first N columns
510  // being the keys.
511  size_t num_key_columns() const;
512 
513  // Owned.
514  Schema* schema_;
515 };
516 
517 } // namespace client
518 } // namespace kudu
519 #endif // KUDU_CLIENT_SCHEMA_H
A representation of a table&#39;s schema.
Definition: schema.h:417
+
A representation of an operation&#39;s outcome.
Definition: status.h:116
A constant cell value with a specific type.
Definition: value.h:33
+
Definition: callbacks.h:28
Representation of column storage attributes.
Definition: schema.h:54
-
Builder API for specifying or altering a column within a table schema.
Definition: schema.h:227
-
Representation of the column schema.
Definition: schema.h:118
-
const EncodingType encoding() const
Definition: schema.h:99
-
Builds scan tokens for a table.
Definition: client.h:1978
-
Alters an existing table based on the provided steps.
Definition: client.h:918
-
KuduColumnStorageAttributes(EncodingType encoding=AUTO_ENCODING, CompressionType compression=DEFAULT_COMPRESSION, int32_t block_size=0) ATTRIBUTE_DEPRECATED("this const ructor will be private in a future release"