Kudu C++ client API
|
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 KuduTablet & | tablet () 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 |
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.
|
static |
Create a new scanner and set the scanner options.
[in] | client | Client to bound to the scanner. |
[in] | serialized_token | Token containing serialized scanner parameters. |
[out] | scanner | The 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. |
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.
[out] | scanner | The 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. |
Status kudu::client::KuduScanToken::Serialize | ( | std::string * | buf | ) | const |
Serialize the token into a string.
The resulting string can be deserialized with KuduScanToken::Deserialize()
to
[out] | buf | Result string to output the serialized token. |
const KuduTablet& kudu::client::KuduScanToken::tablet | ( | ) | const |