Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Public Types | |
typedef std::string | Value |
A Value is a string of bytes, for which std::string is a convenient representation. More... | |
typedef uint64_t | Version |
Public Member Functions | |
void | SetValue (const Value &bytes, Version version) |
TopicEntry () | |
const Value & | value () const |
uint64_t | version () const |
uint32_t | length () const |
Static Public Attributes | |
static const Version | TOPIC_ENTRY_INITIAL_VERSION = 1L |
The Version value used to initialize a new TopicEntry. More... | |
static const Value | NULL_VALUE = "" |
Representation of an empty Value. Must have size() == 0. More... | |
Private Attributes | |
Value | value_ |
Version | version_ |
A TopicEntry is a single entry in a topic, and logically is a <string, byte string> pair. If the byte string is NULL, the entry has been deleted, but may be retained to track changes to send to subscribers.
Definition at line 127 of file statestore.h.
typedef std::string impala::Statestore::TopicEntry::Value |
A Value is a string of bytes, for which std::string is a convenient representation.
Definition at line 130 of file statestore.h.
A version is a monotonically increasing counter. Each update to a topic has its own unique version with the guarantee that sequentially later updates have larger version numbers.
Definition at line 135 of file statestore.h.
|
inline |
Definition at line 149 of file statestore.h.
|
inline |
Definition at line 153 of file statestore.h.
References value_.
void Statestore::TopicEntry::SetValue | ( | const Value & | bytes, |
TopicEntry::Version | version | ||
) |
Sets the value of this entry to the byte / length pair. NULL_VALUE implies this entry has been deleted. The caller is responsible for ensuring, if required, that the version parameter is larger than the current version() TODO: Consider enforcing version monotonicity here.
Definition at line 120 of file statestore.cc.
References NULL_VALUE.
|
inline |
Definition at line 151 of file statestore.h.
References value_.
Referenced by impala::Statestore::GatherTopicUpdates().
|
inline |
Definition at line 152 of file statestore.h.
References version_.
|
static |
Representation of an empty Value. Must have size() == 0.
Definition at line 141 of file statestore.h.
Referenced by impala::Statestore::GatherTopicUpdates(), and impala::Statestore::SendTopicUpdate().
|
static |
The Version value used to initialize a new TopicEntry.
Definition at line 138 of file statestore.h.
|
private |
Byte string value, owned by this TopicEntry. The value is opaque to the statestore, and is interpreted only by subscribers.
Definition at line 158 of file statestore.h.
|
private |
The version of this entry. Every update is assigned a monotonically increasing version number so that only the minimal set of changes can be sent from the statestore to a subscriber.
Definition at line 163 of file statestore.h.
Referenced by version().