Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::Statestore::TopicEntry Class Reference
Collaboration diagram for impala::Statestore::TopicEntry:

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 Valuevalue () 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_
 

Detailed Description

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.

Member Typedef Documentation

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.

Constructor & Destructor Documentation

impala::Statestore::TopicEntry::TopicEntry ( )
inline

Definition at line 149 of file statestore.h.

Member Function Documentation

uint32_t impala::Statestore::TopicEntry::length ( ) const
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.

const Value& impala::Statestore::TopicEntry::value ( ) const
inline

Definition at line 151 of file statestore.h.

References value_.

Referenced by impala::Statestore::GatherTopicUpdates().

uint64_t impala::Statestore::TopicEntry::version ( ) const
inline

Definition at line 152 of file statestore.h.

References version_.

Member Data Documentation

const Statestore::TopicEntry::Value Statestore::TopicEntry::NULL_VALUE = ""
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().

const Version impala::Statestore::TopicEntry::TOPIC_ENTRY_INITIAL_VERSION = 1L
static

The Version value used to initialize a new TopicEntry.

Definition at line 138 of file statestore.h.

Value impala::Statestore::TopicEntry::value_
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.

Referenced by length(), and value().

Version impala::Statestore::TopicEntry::version_
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().


The documentation for this class was generated from the following files: