From commits-return-6135-archive-asf-public=cust-asf.ponee.io@kudu.apache.org Tue Jun 19 18:27:39 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id EB6DB18077B for ; Tue, 19 Jun 2018 18:27:32 +0200 (CEST) Received: (qmail 35867 invoked by uid 500); 19 Jun 2018 16:27:31 -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 34297 invoked by uid 99); 19 Jun 2018 16:27:28 -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; Tue, 19 Jun 2018 16:27:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D8116E049E; Tue, 19 Jun 2018 16:27:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: granthenke@apache.org To: commits@kudu.apache.org Date: Tue, 19 Jun 2018 16:27:56 -0000 Message-Id: <675dfbaf64994c3a80a2128c169ba24f@git.apache.org> In-Reply-To: <3f235011b6c24e94b6d191f082426632@git.apache.org> References: <3f235011b6c24e94b6d191f082426632@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [30/51] [partial] kudu-site git commit: Publish commit(s) from site source repo: 201539453 Add 1.7.1 release docs and links 8e3bce7ff Update website with doc improvements from master http://git-wip-us.apache.org/repos/asf/kudu-site/blob/df5b3057/cpp-client-api/classkudu_1_1client_1_1KuduScanBatch.html ---------------------------------------------------------------------- diff --git a/cpp-client-api/classkudu_1_1client_1_1KuduScanBatch.html b/cpp-client-api/classkudu_1_1client_1_1KuduScanBatch.html new file mode 100644 index 0000000..5ff7433 --- /dev/null +++ b/cpp-client-api/classkudu_1_1client_1_1KuduScanBatch.html @@ -0,0 +1,730 @@ + + + + + + +Kudu C++ client API: kudu::client::KuduScanBatch Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Kudu C++ client API +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
kudu::client::KuduScanBatch Class Reference
+
+
+ +

A batch of zero or more rows returned by a scan operation. + More...

+ +

#include <scan_batch.h>

+
+Inheritance diagram for kudu::client::KuduScanBatch:
+
+
+ + + +
+ + + + + +

+Public Types

+typedef RowPtr value_type
 A handy typedef for the RowPtr.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

int NumRows () const
 
KuduScanBatch::RowPtr Row (int idx) const
 
const_iterator begin () const
 
const_iterator end () const
 
const KuduSchemaprojection_schema () const
 
 RowPtr ()
 
bool IsNull (const Slice &col_name) const
 
bool IsNull (int col_idx) const
 
const void * cell (int col_idx) const
 
std::string ToString () const
 
KuduScanBatch::RowPtr operator* () const
 
const_iterator & operator++ ()
 
const_iterator operator++ (int)
 
bool operator== (const const_iterator &other) const
 
bool operator!= (const const_iterator &other) const
 
Advanced/Unstable API

There are no guarantees on the stability of the format returned by these methods, which might change at any given time.

+
Note
The Slices returned by both direct_data() and indirect_data() are only valid for the lifetime of the KuduScanBatch.
+
Slice direct_data () const
 
Slice indirect_data () const
 
Getters for integral type columns by column name.
Parameters
+ + + +
[in]col_nameThe name of the target column.
[out]valPlaceholder for the result value.
+
+
+
Returns
Operation result status. Return a bad Status if at least one of the following is true:
    +
  • The type does not match.
  • +
  • The value is unset.
  • +
  • The value is NULL.
  • +
+
+
+Status GetBool (const Slice &col_name, bool *val) const WARN_UNUSED_RESULT
 
+Status GetInt8 (const Slice &col_name, int8_t *val) const WARN_UNUSED_RESULT
 
+Status GetInt16 (const Slice &col_name, int16_t *val) const WARN_UNUSED_RESULT
 
+Status GetInt32 (const Slice &col_name, int32_t *val) const WARN_UNUSED_RESULT
 
+Status GetInt64 (const Slice &col_name, int64_t *val) const WARN_UNUSED_RESULT
 
+Status GetUnixTimeMicros (const Slice &col_name, int64_t *micros_since_utc_epoch) const WARN_UNUSED_RESULT
 
+Status GetFloat (const Slice &col_name, float *val) const WARN_UNUSED_RESULT
 
+Status GetDouble (const Slice &col_name, double *val) const WARN_UNUSED_RESULT
 
Getters for integral type columns by column index.

These methods are faster than their name-based counterparts since using indices avoids a hashmap lookup, so index-based getters should be preferred in performance-sensitive code.

+
Parameters
+ + + +
[in]col_indexThe index of the column.
[out]valPointer to the placeholder to put the resulting value.
+
+
+
Returns
Operation result status. Return a bad Status if at least one of the following is true:
    +
  • The type does not match.
  • +
  • The value is unset.
  • +
  • The value is NULL.
  • +
+
+
+Status GetBool (int col_idx, bool *val) const WARN_UNUSED_RESULT
 
+Status GetInt8 (int col_idx, int8_t *val) const WARN_UNUSED_RESULT
 
+Status GetInt16 (int col_idx, int16_t *val) const WARN_UNUSED_RESULT
 
+Status GetInt32 (int col_idx, int32_t *val) const WARN_UNUSED_RESULT
 
+Status GetInt64 (int col_idx, int64_t *val) const WARN_UNUSED_RESULT
 
+Status GetUnixTimeMicros (int col_idx, int64_t *micros_since_utc_epoch) const WARN_UNUSED_RESULT
 
+Status GetFloat (int col_idx, float *val) const WARN_UNUSED_RESULT
 
+Status GetDouble (int col_idx, double *val) const WARN_UNUSED_RESULT
 
Getters for string/binary column by column name.

Get the string/binary value for a column by its name.

+
Parameters
+ + + +
[in]col_nameName of the column.
[out]valPointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary.
+
+
+
Returns
Operation result status. Return a bad Status if at least one of the following is true:
    +
  • The type does not match.
  • +
  • The value is unset.
  • +
  • The value is NULL.
  • +
+
+
+Status GetString (const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT
 
+Status GetBinary (const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT
 
Getters for string/binary column by column index.

Get the string/binary value for a column by its index.

+

These methods are faster than their name-based counterparts since using indices avoids a hashmap lookup, so index-based getters should be preferred in performance-sensitive code.

+
Parameters
+ + + +
[in]col_indexThe index of the column.
[out]valPointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary.
+
+
+
Returns
Operation result status. Return a bad Status if at least one of the following is true:
    +
  • The type does not match.
  • +
  • The value is unset.
  • +
  • The value is NULL.
  • +
+
+
+Status GetString (int col_idx, Slice *val) const WARN_UNUSED_RESULT
 
+Status GetBinary (int col_idx, Slice *val) const WARN_UNUSED_RESULT
 
+ + + + + + + + + + + + + +

+Friends

+class KuduScanner
 
+class tools::ReplicaDumper
 
+class KuduScanBatch
 
+template<typename KeyTypeWrapper >
struct SliceKeysTestSetup
 
+template<typename KeyTypeWrapper >
struct IntKeysTestSetup
 
+

Detailed Description

+

A batch of zero or more rows returned by a scan operation.

+

Every call to KuduScanner::NextBatch() returns a batch of zero or more rows. You can iterate over the rows in the batch using:

+

range-foreach loop (C++11):

+
* for (KuduScanBatch::RowPtr row : batch) {
+
* ... row.GetInt(1, ...)
+
* ...
+
* }
+
*
+

regular for loop (C++03):

+
* for (KuduScanBatch::const_iterator it = batch.begin(), it != batch.end();
+
* ++i) {
+ +
* ...
+
* }
+
*
+

or

+
* for (int i = 0, num_rows = batch.NumRows();
+
* i < num_rows;
+
* i++) {
+
* KuduScanBatch::RowPtr row = batch.Row(i);
+
* ...
+
* }
+
*
+
Note
In the above example, NumRows() is only called once at the beginning of the loop to avoid extra calls to the non-inlined method.
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
KuduScanBatch::const_iterator kudu::client::KuduScanBatch::begin () const
+
+inline
+
+
Returns
Forward iterator to the start of the rows in the batch.
+ +
+
+ +
+
+ + + + + + + + +
const void* kudu::client::KuduScanBatch::cell (int col_idx) const
+
+

Get the column's row data.

+
Note
Should be avoided unless absolutely necessary.
+
Parameters
+ + +
[in]col_idxThe index of the column.
+
+
+
Returns
Raw cell data for the specified index.
+ +
+
+ +
+
+ + + + + + + +
Slice kudu::client::KuduScanBatch::direct_data () const
+
+

Return a slice that points to the direct row data received from the server. Users of this API must have knowledge of the data format in order to decode the data.

+
Returns
a Slice that points to the raw direct row data.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
KuduScanBatch::const_iterator kudu::client::KuduScanBatch::end () const
+
+inline
+
+
Returns
Forward iterator to the end of the rows in the batch.
+ +
+
+ +
+
+ + + + + + + +
Slice kudu::client::KuduScanBatch::indirect_data () const
+
+

Like the method above, but for indirect data.

+
Returns
a Slice that points to the raw indirect row data.
+ +
+
+ +
+
+ + + + + + + + +
bool kudu::client::KuduScanBatch::IsNull (const Slicecol_name) const
+
+
Parameters
+ + +
[in]col_nameName of the column.
+
+
+
Returns
true iff the specified column of the row has NULL value.
+ +
+
+ +
+
+ + + + + + + + +
bool kudu::client::KuduScanBatch::IsNull (int col_idx) const
+
+
Parameters
+ + +
[in]col_idxIndex of the column.
+
+
+
Returns
true iff the specified column of the row has NULL value.
+ +
+
+ +
+
+ + + + + + + +
int kudu::client::KuduScanBatch::NumRows () const
+
+
Returns
The number of rows in this batch.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool kudu::client::KuduScanBatch::operator!= (const const_iterator & other) const
+
+inline
+
+

An operator to check whether two iterators are 'not equal'.

+
Parameters
+ + +
[in]otherThe iterator to compare with.
+
+
+
Returns
true iff the other iterator points to a different row in the same batch, or to a row belonging to a different batch altogether.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
KuduScanBatch::RowPtr kudu::client::KuduScanBatch::operator* () const
+
+inline
+
+
Returns
The row in the batch the iterator is pointing at.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
const_iterator& kudu::client::KuduScanBatch::operator++ ()
+
+inline
+
+

Prefix increment operator: advances the iterator to the next position.

+
Returns
The reference to the iterator, pointing to the next position.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
const_iterator kudu::client::KuduScanBatch::operator++ (int )
+
+inline
+
+

Postfix increment operator: advances the iterator to the next position.

+
Returns
A copy of the iterator pointing to the pre-increment position.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool kudu::client::KuduScanBatch::operator== (const const_iterator & other) const
+
+inline
+
+

An operator to check whether two iterators are 'equal'.

+
Parameters
+ + +
[in]otherThe iterator to compare with.
+
+
+
Returns
true iff the other iterator points to the same row of the same batch.
+ +
+
+ +
+
+ + + + + + + +
const KuduSchema* kudu::client::KuduScanBatch::projection_schema () const
+
+
Returns
The projection schema for this batch. All KuduScanBatch::RowPtr returned by this batch are guaranteed to have this schema.
+ +
+
+ +
+
+ + + + + + + + +
KuduScanBatch::RowPtr kudu::client::KuduScanBatch::Row (int idx) const
+
+

Get a row at the specified index.

+
Parameters
+ + +
[in]idxThe index of the row to return.
+
+
+
Returns
A reference to one of the rows in this batch. The returned object is only valid for as long as this KuduScanBatch object is valid.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
kudu::client::KuduScanBatch::RowPtr ()
+
+inline
+
+

Construct an invalid RowPtr. Before use, you must assign a properly-initialized value.

+ +
+
+ +
+
+ + + + + + + +
std::string kudu::client::KuduScanBatch::ToString () const
+
+
Returns
String representation for this row.
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + http://git-wip-us.apache.org/repos/asf/kudu-site/blob/df5b3057/cpp-client-api/classkudu_1_1client_1_1KuduScanBatch.png ---------------------------------------------------------------------- diff --git a/cpp-client-api/classkudu_1_1client_1_1KuduScanBatch.png b/cpp-client-api/classkudu_1_1client_1_1KuduScanBatch.png new file mode 100644 index 0000000..0021be2 Binary files /dev/null and b/cpp-client-api/classkudu_1_1client_1_1KuduScanBatch.png differ http://git-wip-us.apache.org/repos/asf/kudu-site/blob/df5b3057/cpp-client-api/classkudu_1_1client_1_1KuduScanToken-members.html ---------------------------------------------------------------------- diff --git a/cpp-client-api/classkudu_1_1client_1_1KuduScanToken-members.html b/cpp-client-api/classkudu_1_1client_1_1KuduScanToken-members.html new file mode 100644 index 0000000..b7ee0c1 --- /dev/null +++ b/cpp-client-api/classkudu_1_1client_1_1KuduScanToken-members.html @@ -0,0 +1,111 @@ + + + + + + +Kudu C++ client API: Member List + + + + + + + + + +
+
+ + + + + + +
+
Kudu C++ client API +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
kudu::client::KuduScanToken Member List
+
+
+ +

This is the complete list of members for kudu::client::KuduScanToken, including all inherited members.

+ + + + + + + +
DeserializeIntoScanner(KuduClient *client, const std::string &serialized_token, KuduScanner **scanner) WARN_UNUSED_RESULTkudu::client::KuduScanTokenstatic
IntoKuduScanner(KuduScanner **scanner) const WARN_UNUSED_RESULTkudu::client::KuduScanToken
KuduScanTokenBuilder (defined in kudu::client::KuduScanToken)kudu::client::KuduScanTokenfriend
Serialize(std::string *buf) const WARN_UNUSED_RESULTkudu::client::KuduScanToken
tablet() const kudu::client::KuduScanToken
~KuduScanToken() (defined in kudu::client::KuduScanToken)kudu::client::KuduScanToken
+ + + + + http://git-wip-us.apache.org/repos/asf/kudu-site/blob/df5b3057/cpp-client-api/classkudu_1_1client_1_1KuduScanToken.html ---------------------------------------------------------------------- diff --git a/cpp-client-api/classkudu_1_1client_1_1KuduScanToken.html b/cpp-client-api/classkudu_1_1client_1_1KuduScanToken.html new file mode 100644 index 0000000..e22f663 --- /dev/null +++ b/cpp-client-api/classkudu_1_1client_1_1KuduScanToken.html @@ -0,0 +1,259 @@ + + + + + + +Kudu C++ client API: kudu::client::KuduScanToken Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Kudu C++ client API +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
kudu::client::KuduScanToken Class Reference
+
+
+ +

A scan descriptor limited to a single physical contiguous location. + More...

+ +

#include <client.h>

+ + + + + + + + +

+Public Member Functions

Status IntoKuduScanner (KuduScanner **scanner) const WARN_UNUSED_RESULT
 
const KuduTablettablet () const
 
Status Serialize (std::string *buf) const WARN_UNUSED_RESULT
 
+ + + +

+Static Public Member Functions

static Status DeserializeIntoScanner (KuduClient *client, const std::string &serialized_token, KuduScanner **scanner) WARN_UNUSED_RESULT
 
+ + + +

+Friends

+class KuduScanTokenBuilder
 
+

Detailed Description

+

A scan descriptor limited to a single physical contiguous location.

+

A KuduScanToken describes a partial scan of a Kudu table limited to a single contiguous physical location. Using the KuduScanTokenBuilder, clients can describe the desired scan, including predicates, bounds, timestamps, and caching, and receive back a collection of scan tokens.

+

Each scan token may be separately turned into a scanner using KuduScanToken::IntoKuduScanner, with each scanner responsible for a disjoint section of the table.

+

Scan tokens may be serialized using the KuduScanToken::Serialize method and deserialized back into a scanner using the KuduScanToken::DeserializeIntoScanner method. This allows use cases such as generating scan tokens in the planner component of a query engine, then sending the tokens to execution nodes based on locality, and then instantiating the scanners on those nodes.

+

Scan token locality information can be inspected using the KuduScanToken::tablet() function.

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static Status kudu::client::KuduScanToken::DeserializeIntoScanner (KuduClientclient,
const std::string & serialized_token,
KuduScanner ** scanner 
)
+
+static
+
+

Create a new scanner and set the scanner options.

+
Parameters
+ + + + +
[in]clientClient to bound to the scanner.
[in]serialized_tokenToken containing serialized scanner parameters.
[out]scannerThe result scanner. The caller owns the new scanner. The scanner must be opened before use. The scanner will not be set if the returned status is an error.
+
+
+
Returns
Operation result status.
+ +
+
+ +
+
+ + + + + + + + +
Status kudu::client::KuduScanToken::IntoKuduScanner (KuduScanner ** scanner) const
+
+

Create a new scanner.

+

This method creates a new scanner, setting the result scanner's options according to the scan token.

+
Parameters
+ + +
[out]scannerThe result scanner. The caller owns the new scanner. The scanner must be opened before use. The output parameter will not be set if the returned status is an error.
+
+
+
Returns
Operation result status.
+ +
+
+ +
+
+ + + + + + + + +
Status kudu::client::KuduScanToken::Serialize (std::string * buf) const
+
+

Serialize the token into a string.

+

Deserialize with KuduScanToken::DeserializeIntoScanner().

+
Parameters
+ + +
[out]bufResult string to output the serialized token.
+
+
+
Returns
Operation result status.
+ +
+
+ +
+
+ + + + + + + +
const KuduTablet& kudu::client::KuduScanToken::tablet () const
+
+
Returns
Tablet that this scan will retrieve rows from.
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + http://git-wip-us.apache.org/repos/asf/kudu-site/blob/df5b3057/cpp-client-api/classkudu_1_1client_1_1KuduScanTokenBuilder-members.html ---------------------------------------------------------------------- diff --git a/cpp-client-api/classkudu_1_1client_1_1KuduScanTokenBuilder-members.html b/cpp-client-api/classkudu_1_1client_1_1KuduScanTokenBuilder-members.html new file mode 100644 index 0000000..1025c64 --- /dev/null +++ b/cpp-client-api/classkudu_1_1client_1_1KuduScanTokenBuilder-members.html @@ -0,0 +1,121 @@ + + + + + + +Kudu C++ client API: Member List + + + + + + + + + +
+
+ + + + + + +
+
Kudu C++ client API +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
kudu::client::KuduScanTokenBuilder Member List
+
+
+ +

This is the complete list of members for kudu::client::KuduScanTokenBuilder, including all inherited members.

+ + + + + + + + + + + + + + + + + +
AddConjunctPredicate(KuduPredicate *pred) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
AddLowerBound(const KuduPartialRow &key) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
AddUpperBound(const KuduPartialRow &key) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
Build(std::vector< KuduScanToken * > *tokens) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
KuduScanTokenBuilder(KuduTable *table)kudu::client::KuduScanTokenBuilderexplicit
SetBatchSizeBytes(uint32_t batch_size) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
SetCacheBlocks(bool cache_blocks) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
SetFaultTolerant() WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
SetProjectedColumnIndexes(const std::vector< int > &col_indexes) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
SetProjectedColumnNames(const std::vector< std::string > &col_names) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
SetReadMode(KuduScanner::ReadMode read_mode) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
SetSelection(KuduClient::ReplicaSelection selection) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
SetSnapshotMicros(uint64_t snapshot_timestamp_micros) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
SetSnapshotRaw(uint64_t snapshot_timestamp) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
SetTimeoutMillis(int millis) WARN_UNUSED_RESULTkudu::client::KuduScanTokenBuilder
~KuduScanTokenBuilder() (defined in kudu::client::KuduScanTokenBuilder)kudu::client::KuduScanTokenBuilder
+ + + + +