Kudu C++ client API
|
Classes | |
class | KuduPartialRow |
A row which may only contain values for a subset of the columns. More... | |
class | MonoDelta |
A representation of a time interval. More... | |
class | MonoTime |
Representation of a particular point in time. More... | |
class | Slice |
A wrapper around externally allocated data. More... | |
struct | SliceMap |
STL map whose keys are Slices. More... | |
class | Status |
A representation of an operation's outcome. More... | |
Functions | |
void KUDU_EXPORT | SleepFor (const MonoDelta &delta) |
bool | operator== (const Slice &x, const Slice &y) |
bool | operator!= (const Slice &x, const Slice &y) |
std::ostream & | operator<< (std::ostream &o, const Slice &s) |
Kudu uses c++11 features internally, but provides a client interface which does not require c++11. We use std::tr1::shared_ptr in our public interface to hold shared instances of KuduClient, KuduSession, and KuduTable.
Unfortunately, on OS X, libc++ is the default c++ standard library implementation and is required when compiling with c++11, but it does not include the tr1 APIs. As a workaround, we use std::shared_ptr on OS X, since OS X is for development only, and it is acceptable to require clients to compile with c++11.
In order to allow applications to compile against Kudu on both Linux and OS X, we provide this typedef which resolves to std::tr1::shared_ptr on Linux and std::shared_ptr on OS X. Clients are encouraged to use these typedefs in order to ensure that applications will compile on both Linux and OS X.
Check whether two slices are not identical.
[in] | x | One slice. |
[in] | y | Another slice. |
true
iff slices contain different data.
|
inline |
Output printable representation of the slice into the given output stream.
[out] | o | The output stream to print the info. |
[in] | s | The slice to print. |
Check whether two slices are identical.
[in] | x | One slice. |
[in] | y | Another slice. |
true
iff two slices contain byte-for-byte identical data. void KUDU_EXPORT kudu::SleepFor | ( | const MonoDelta & | delta | ) |
Sleep for an interval specified by a MonoDelta instance.
This is preferred over sleep(3), usleep(3), and nanosleep(3). It's less prone to mixups with units since it uses the MonoDelta for interval specification. Besides, it ignores signals/EINTR, so will reliably sleep at least for the MonoDelta duration.
[in] | delta | The time interval to sleep for. |