General purpose utility library. More...
Files | |
file | System.h |
Retrieves system information (hardware, installation directory, etc) | |
Namespaces | |
Hypertable::Error | |
Hypertable::Logger::Priority | |
Output priorities modelled after syslog. | |
Hypertable::Property | |
Hypertable::Config | |
Hypertable::ThisThread | |
Classes | |
struct | Hypertable::AllocatorBase< T > |
Base classes for all Allocator classes. More... | |
struct | Hypertable::AllocatorBase< void > |
Disallow AllocatorBase for the type 'void' by generating a compiler error if it's used. More... | |
class | Hypertable::ArenaAllocatorBase< T, ArenaT > |
Specialized Allocator class using a Memory Arena which manages the allocated memory; see PageArenaAllocator.h for an actual implementation. More... | |
class | Hypertable::Barrier |
A Barrier to block execution of code. More... | |
class | Hypertable::Barrier::ScopedActivator |
A helper class to put up a barrier when entering a scope and take it down when leaving the scope. More... | |
class | Hypertable::Base64 |
Provides base64 encoding and decoding functions. More... | |
class | Hypertable::BlobHashSet< TraitsT > |
A HashSet for storing and looking up blobs efficiently. More... | |
struct | Hypertable::Blob |
A Blob structure holds a data pointer and a size. More... | |
struct | Hypertable::BlobHashTraits< HashFunT > |
Traits for BlobHashSet Hash function default to MurmurHash2 for speed and mix. More... | |
struct | Hypertable::BlobHashTraits< HashFunT >::hasher |
struct | Hypertable::BlobHashTraits< HashFunT >::key_equal |
class | Hypertable::BasicBloomFilter< HasherT > |
A space-efficent probabilistic set for membership test, false postives are possible, but false negatives are not. More... | |
class | Hypertable::BasicBloomFilterWithChecksum< HasherT > |
A space-efficent probabilistic set for membership test, false postives are possible, but false negatives are not. More... | |
class | Hypertable::ByteString |
A class managing one or more serializable ByteStrings. More... | |
class | Hypertable::ClusterDefinition::ClusterDefinition |
Represents a cluster definition. More... | |
struct | Hypertable::Config::Policy |
Interface and base of config policy. More... | |
struct | Hypertable::Config::DefaultPolicy |
Default init policy. More... | |
struct | Hypertable::Config::Cons< CarT, CdrT > |
Helpers to compose init policies; allow to combine two policies into one. More... | |
struct | Hypertable::Config::NullPolicy |
struct | Hypertable::Config::Cons< NullPolicy, PolicyT > |
struct | Hypertable::Config::Join< PolicyListT > |
class | Hypertable::ConsoleOutputSquelcher |
Temporarily redirects stdout and stderr to /dev/null . More... | |
class | Hypertable::Cronolog |
Time based rotating log. More... | |
struct | Hypertable::crontab_entry |
Binary representation of crontab spec. More... | |
class | Hypertable::Crontab |
Tracks timing of periodic events. More... | |
class | Hypertable::Crypto |
Provides cryptographic functions. More... | |
class | Hypertable::CstrHashMap< DataT, TraitsT > |
A hash map for storing and lookup char * strings efficiently. More... | |
struct | Hypertable::CstrHashTraits< HashT > |
Traits for CstrHashMap/Set. More... | |
struct | Hypertable::CstrCaseHashTraits |
class | Hypertable::directory_entry< _Key, _Tp > |
class | Hypertable::__directory_node_internal< _Value, _Compare, _Allocator > |
class | Hypertable::__directory_node_internal< _Value, _Compare, _Allocator >::pointer_compare |
class | Hypertable::__directory_iterator< _Tp, _NodePtr, _DiffType > |
class | Hypertable::__directory_iterator< _Tp, _NodePtr, _DiffType >::__subdirectory_iterator |
class | Hypertable::directory< _Key, _Tp, _Compare, _Allocator > |
Directory container class. More... | |
class | Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::value_compare |
Ordering relation on value_type. More... | |
class | Hypertable::DiscreteRandomGenerator |
Generates samples from a discrete probability distribution in the range [0, max_val] by transforming a uniform [0, 1] distribution into the desired distribution. More... | |
class | Hypertable::DiscreteRandomGeneratorFactory |
Static factory class for discrete random generators. More... | |
class | Hypertable::DiscreteRandomGeneratorUniform |
Generate samples from Uniform distribution. More... | |
class | Hypertable::DiscreteRandomGeneratorZipf |
Generate samples from Zipf distribution http://en.wikipedia.org/wiki/Zipf%27s_law. More... | |
class | Hypertable::DynamicBuffer |
A dynamic, resizable and reference counted memory buffer. More... | |
struct | Hypertable::ExceptionMessageRenderer |
Helper class to render an exception message a la IO manipulators. More... | |
struct | Hypertable::ExceptionMessagesRenderer |
Helper class to render an exception message a la IO manipulators. More... | |
class | Hypertable::Exception |
This is a generic exception class for Hypertable. More... | |
class | Hypertable::FailureInducer |
struct | Hypertable::FailureInducer::failure_inducer_state |
Internal structure to store a single failure setting. More... | |
class | Hypertable::Filesystem |
Abstract base class for a filesystem. More... | |
class | Hypertable::Filesystem::Dirent |
Directory entry. More... | |
class | Hypertable::FileUtils |
The FileUtils class provides static functions to easily access and handle files and the file system. More... | |
class | Hypertable::FixedStreamBuf |
A simple streambuf with fixed size buffer. More... | |
class | Hypertable::FixedOstream |
Output stream using a fixed buffer. More... | |
class | Hypertable::FixedIstream |
Input stream using a fixed buffer. More... | |
class | Hypertable::FlyweightString |
The Flyweight string set stores duplicate strings efficiently. More... | |
class | Hypertable::HostSpecification |
Converts host specification pattern to list of host names. More... | |
class | Hypertable::InteractiveCommand |
Abstract base class for simple interactive shell commands. More... | |
class | Hypertable::Logger::LogWriter |
The LogWriter class writes to stdout. More... | |
struct | md5_context |
MD5 context structure; this structure is used to store the internal state of the md5 algorithm. More... | |
class | Hypertable::Metrics |
Metrics interface. More... | |
class | Hypertable::MetricsCollector |
Abstract metrics collector. More... | |
class | Hypertable::MetricsCollectorGanglia |
Ganglia metrics collector. More... | |
class | Hypertable::MetricsProcess |
Computes and publishes general process metrics. More... | |
struct | Hypertable::MurmurHash2 |
Helper structure using overloaded operator() to calculate hashes of various input types. More... | |
class | Hypertable::MutexWithStatistics |
Mutex that maintains wait threads count. More... | |
struct | Hypertable::DefaultPageAllocator |
A memory allocator using std::malloc() and std::free(). More... | |
class | Hypertable::PageArena< CharT, PageAllocatorT > |
The PageArena allocator is simple and fast, avoiding individual mallocs/frees. More... | |
struct | Hypertable::PageArena< CharT, PageAllocatorT >::Page |
A structure to manage a single memory page which is used to allocate smaller memory chunks. More... | |
struct | Hypertable::PageArena< CharT, PageAllocatorT >::LtPageRemain |
predicate which sorts by size More... | |
struct | Hypertable::PageArena< CharT, PageAllocatorT >::TinyBuffer |
A small buffer (128 bytes) to satisfy very small memory allocations without allocating a page from the heap. More... | |
struct | Hypertable::PageArenaAllocator< T, ArenaT > |
The PageArenaAllocator is a STL allocator based on PageArena. More... | |
struct | Hypertable::PageArenaAllocator< T, ArenaT >::rebind< U > |
class | Hypertable::Path |
Compatibility class for boost::filesystem::path. More... | |
class | Hypertable::Properties |
Manages a collection of program options. More... | |
class | Hypertable::SubProperties |
Helper class to access parts of the properties. More... | |
class | Hypertable::Random |
Convenience interface for random number and data generation. More... | |
class | Hypertable::Regex |
Provides utility functions for regular expressions. More... | |
class | Hypertable::ScopeGuardImplBase |
Base class for the ScopeGuards. More... | |
class | Hypertable::ScopeGuardImpl0< FunT > |
ScopeGuard implementation for free function with no paramter. More... | |
class | Hypertable::ScopeGuardImpl1< FunT, P1T > |
ScopeGuard implementation for free function with 1 parameter. More... | |
class | Hypertable::ScopeGuardImpl2< FunT, P1T, P2T > |
ScopeGuard implementation for free function with 2 parameters. More... | |
class | Hypertable::ScopeGuardImpl3< FunT, P1T, P2T, P3T > |
ScopeGuard implementation for free function with 3 parameters. More... | |
class | Hypertable::ObjScopeGuardImpl0< ObjT, MethodT > |
ScopeGuard implementation for method with no parameter. More... | |
class | Hypertable::ObjScopeGuardImpl1< ObjT, MethodT, P1T > |
ScopeGuard implementation for method with 1 parameter. More... | |
class | Hypertable::ObjScopeGuardImpl2< ObjT, MethodT, P1T, P2T > |
ScopeGuard implementation for method with 2 parameters. More... | |
class | Hypertable::RefHolder< T > |
Helper class used to pass a parameter to the ScopeGuard by reference. More... | |
class | Hypertable::Serializable |
Mixin class that provides a standard serialization interface. More... | |
class | Hypertable::ServerLauncher |
Launches external commands and redirects their output to a file; kills the external process when going out of scope. More... | |
class | Hypertable::SleepWakeNotifier |
Delivers sleep and wakeup notifications. More... | |
class | Hypertable::SockAddrHash |
Hash functor class for InetAddr. More... | |
struct | Hypertable::SockAddrEqual |
Equality predicate functor class for InetAddr. More... | |
class | Hypertable::SockAddrMap< TypeT, addr > |
Unordered map specialization for InetAddr keys. More... | |
class | Hypertable::StaticBuffer |
A memory buffer of static size. More... | |
class | Hypertable::StatsSerializable |
Abstract base class for managing serialized statistics. More... | |
class | Hypertable::StatsSystem |
Collects, serializes and deserializes system-wide statistics. More... | |
class | Hypertable::Status |
Holds Nagios-style program status information. More... | |
class | Hypertable::Status::Text |
Status text string constants. More... | |
class | Hypertable::StatusPersister |
Persists program status information to disk. More... | |
struct | Hypertable::StlAllocator< T, Impl > |
Stl compatible memory allocator based on a PageArena. More... | |
class | Hypertable::Stopwatch |
The Stopwatch class measures elapsed time between instantiation (or a call to start) and a call to stop. More... | |
class | Hypertable::NumericFormatterDigits |
The fast numeric formatters, very much inspired from http://cppformat.github.io/. More... | |
class | Hypertable::NumericFormatter< T > |
class | Hypertable::NumericSignedFormatter< T > |
class | Hypertable::NumericUnsignedFormatter< T > |
class | Hypertable::StringCompressorPrefix |
A class to prefix-compress strings. More... | |
class | Hypertable::StringDecompressorPrefix |
A class to decompress prefix-compressed strings. More... | |
struct | LtCstr |
STL Strict Weak Ordering for comparing c-style strings. More... | |
class | Hypertable::System |
struct | Hypertable::CpuInfo |
A structure to retrieve CPU information (vendor, model, speed, number of cores etc.) More... | |
struct | Hypertable::CpuStat |
A structure to retrieve CPU statistics (system wide cpu times, idle time etc). More... | |
struct | Hypertable::LoadAvgStat |
A structure to retrieve load average-statistics. More... | |
struct | Hypertable::MemStat |
A structure to retrieve memory statistics (RAM size, used size, free size etc) More... | |
struct | Hypertable::DiskStat |
A structure to retrieve disk statistics (read/write IOPS, transfer rates etc) More... | |
struct | Hypertable::SwapStat |
A structure to retrieve Swapping statistics (pages swapped in/out, aggregate total numbers etc) More... | |
struct | Hypertable::NetInfo |
A structure to retrieve network information (host name, primary interface, primary address, gateway etc) More... | |
struct | Hypertable::NetStat |
A structure to retrieve network statistics (receiving rate, transmitting rate etc) More... | |
struct | Hypertable::OsInfo |
A structure to retrieve operating system information (name, version, vendor, architecture) More... | |
struct | Hypertable::ProcInfo |
A structure to receive process information (pid, user name, exe name, working directory, program arguments etc) More... | |
struct | Hypertable::ProcStat |
A structure to receive process statistics (CPU user time, system time, virtmal machine sizes etc) More... | |
struct | Hypertable::FsStat |
A structure to retrieve Filesystem statistics (total size, free size, used size etc) More... | |
struct | Hypertable::TermInfo |
A structure to retrieve terminal information (lines, columns etc) More... | |
struct | Hypertable::TclHash |
Helper structure using overloaded operator() to calculate the Tcl hashes of various input types. More... | |
struct | Hypertable::TclHash2 |
Helper structure using overloaded operator() to calculate the Tcl hashes of various input types (using tcl_hash2, the faster implementation). More... | |
class | Hypertable::TestHarness |
A simple test framework which sets up the logging subsystem, can compare its output against a golden file or regenerate the golden file. More... | |
class | Hypertable::TestStat |
Accumulates min, max, mean and stdev of the test results; based on the Welford method for numerical stability (see http://www.johndcook.com/standard_deviation.html) More... | |
struct | Hypertable::TestFun< FunT > |
Helper class wrapping the invocation of a single test function. More... | |
struct | Hypertable::Config::TestPolicy |
A Policy class for extending command line options. More... | |
class | Hypertable::Timer |
A timer class to keep timeout states across AsyncComm related calls. More... | |
class | Hypertable::TimeWindow |
Defines a time window. More... | |
class | Hypertable::Usage |
Helper class for printing usage banners on the command line. More... | |
class | Hypertable::WordStream |
A class generating a stream of words; the words are retrieved from a file and can be randomized. More... | |
struct | Hypertable::WordStream::word_info |
Internal structure for a single word. More... | |
class | Hypertable::XmlParser |
Base class for XML document parsers. More... | |
Macros | |
#define | BOOST_SPIRIT_THREADSAFE |
#define | BOOST_IOSTREAMS_USE_DEPRECATED |
#define | BOOST_FILESYSTEM_VERSION 3 |
#define | BOOST_FILESYSTEM_DEPRECATED 1 |
#define | HT_UNUSED(x) static_cast<void>(x) |
#define | HT_EXCEPTION(_code_, _msg_) Exception(_code_, _msg_, __LINE__, HT_FUNC, __FILE__) |
#define | HT_EXCEPTION2(_code_, _ex_, _msg_) Exception(_code_, _msg_, _ex_, __LINE__, HT_FUNC, __FILE__) |
#define | HT_THROW(_code_, _msg_) throw HT_EXCEPTION(_code_, _msg_) |
#define | HT_THROW_(_code_) HT_THROW(_code_, "") |
#define | HT_THROW2(_code_, _ex_, _msg_) throw HT_EXCEPTION2(_code_, _ex_, _msg_) |
#define | HT_THROW2_(_code_, _ex_) HT_THROW2(_code_, _ex_, "") |
#define | HT_THROWF(_code_, _fmt_,...) throw HT_EXCEPTION(_code_, Hypertable::format(_fmt_, __VA_ARGS__)) |
#define | HT_THROW2F(_code_, _ex_, _fmt_,...) throw HT_EXCEPTION2(_code_, _ex_, Hypertable::format(_fmt_, __VA_ARGS__)) |
#define | HT_RETHROWF(_fmt_,...) |
#define | HT_RETHROW(_s_) HT_RETHROWF("%s", _s_) |
#define | HT_TRY(_s_, _code_) |
#define | HT_LOG_EXCEPTION(_s_) |
#define | HT_TRY_OR_LOG(_s_, _code_) |
#define | HT_TCLHASH_DO2(p, i) ret += (ret << 3) + p[i]; ret += (ret << 3) + p[i+1] |
#define | HT_TCLHASH_DO4(p, i) HT_TCLHASH_DO2(p, i); HT_TCLHASH_DO2(p, i+2); |
#define | HT_TCLHASH_DO8(p, i) HT_TCLHASH_DO4(p, i); HT_TCLHASH_DO4(p, i+4); |
#define | HT_THREAD_ID_DECL(_var_) |
#define | HT_THREAD_ID_SET(_var_) |
#define | HT_DELIM_CHECK(_l_, _c_) |
#define | HT_RANGE_CHECK(_v_, _min_, _max_) |
Typedefs | |
typedef BasicBloomFilter | Hypertable::BloomFilter |
typedef BasicBloomFilterWithChecksum | Hypertable::BloomFilterWithChecksum |
typedef PropertiesDesc | Hypertable::Config::Desc |
typedef std::shared_ptr < DiscreteRandomGenerator > | Hypertable::DiscreteRandomGeneratorPtr |
typedef std::shared_ptr < DynamicBuffer > | Hypertable::DynamicBufferPtr |
typedef std::unordered_map < String, failure_inducer_state * > | Hypertable::FailureInducer::StateMap |
typedef std::shared_ptr < Filesystem > | Hypertable::FilesystemPtr |
Smart pointer to Filesystem. More... | |
typedef std::shared_ptr < MetricsCollectorGanglia > | Hypertable::MetricsCollectorGangliaPtr |
Smart pointer to MetricsCollectorGanglia. More... | |
typedef PageArena | Hypertable::CharArena |
typedef PageArena< unsigned char > | Hypertable::ByteArena |
typedef std::vector< String > | Hypertable::Strings |
typedef std::vector< int64_t > | Hypertable::Int64s |
typedef std::vector< double > | Hypertable::Doubles |
typedef Po::options_description | Hypertable::PropertiesDesc |
typedef Po::positional_options_description | Hypertable::PositionalDesc |
typedef std::shared_ptr < Properties > | Hypertable::PropertiesPtr |
typedef const ScopeGuardImplBase & | Hypertable::ScopeGuard |
typedef std::shared_ptr < StaticBuffer > | Hypertable::StaticBufferPtr |
Smart pointer to StaticBuffer. More... | |
typedef std::shared_ptr < StatsSystem > | Hypertable::StatsSystemPtr |
typedef PageArena< uint8_t, DefaultPageAllocator > | Hypertable::StlArena |
typedef std::string | Hypertable::String |
A String is simply a typedef to std::string. More... | |
typedef long unsigned int | Hypertable::Lu |
Shortcut for printf formats. More... | |
typedef long long unsigned int | Hypertable::Llu |
Shortcut for printf formats. More... | |
typedef long long int | Hypertable::Lld |
Shortcut for printf formats. More... | |
typedef NumericUnsignedFormatter < uint8_t > | Hypertable::UInt8Formatter |
typedef NumericUnsignedFormatter < uint16_t > | Hypertable::UInt16Formatter |
typedef NumericUnsignedFormatter < uint32_t > | Hypertable::UInt32Formatter |
typedef NumericUnsignedFormatter < uint64_t > | Hypertable::UInt64Formatter |
typedef NumericSignedFormatter < int8_t > | Hypertable::Int8Formatter |
typedef NumericSignedFormatter < int16_t > | Hypertable::Int16Formatter |
typedef NumericSignedFormatter < int32_t > | Hypertable::Int32Formatter |
typedef NumericSignedFormatter < int64_t > | Hypertable::Int64Formatter |
typedef std::set< String > | StringSet |
STL Set managing Strings. More... | |
typedef std::set< const char *, LtCstr > | CstrSet |
STL Set managing c-style strings. More... | |
typedef std::map< const char *, int32_t, LtCstr > | CstrToInt32Map |
STL map from c-style string to int32_t. More... | |
typedef std::map< const char *, int64_t, LtCstr > | CstrToInt64MapT |
STL map from c-style string to int64_t. More... | |
typedef Cons< TestPolicy, DefaultPolicy > | Hypertable::Config::DefaultTestPolicy |
typedef boost::thread | Hypertable::Thread |
typedef boost::thread_group | Hypertable::ThreadGroup |
typedef std::shared_ptr < WordStream > | Hypertable::WordStreamPtr |
Functions | |
void | Hypertable::destruct (char *) |
helper functions which call the destructor of an object; destructor is not called on POD types (using template specialization) More... | |
void | Hypertable::destruct (unsigned char *) |
void | Hypertable::destruct (short *) |
void | Hypertable::destruct (unsigned short *) |
void | Hypertable::destruct (int *) |
void | Hypertable::destruct (unsigned int *) |
void | Hypertable::destruct (long *) |
void | Hypertable::destruct (unsigned long *) |
void | Hypertable::destruct (long long *) |
void | Hypertable::destruct (unsigned long long *) |
void | Hypertable::destruct (float *) |
void | Hypertable::destruct (double *) |
void | Hypertable::destruct (long double *) |
template<typename T > | |
void | Hypertable::destruct (T *p) |
size_t | Hypertable::get_align_offset (void *p) |
Convenience function returning a size aligned to 8 or 4 bytes, depending on the system's architecture. More... | |
Hypertable::BasicBloomFilterWithChecksum< HasherT >::BasicBloomFilterWithChecksum (size_t items_estimate, float false_positive_prob) | |
Constructor. More... | |
Hypertable::BasicBloomFilterWithChecksum< HasherT >::BasicBloomFilterWithChecksum (size_t items_estimate, float bits_per_item, size_t num_hashes) | |
Alternative constructor. More... | |
Hypertable::BasicBloomFilterWithChecksum< HasherT >::BasicBloomFilterWithChecksum (size_t items_estimate, size_t items_actual, int64_t length, size_t num_hashes) | |
Alternative constructor. More... | |
Hypertable::BasicBloomFilterWithChecksum< HasherT >::~BasicBloomFilterWithChecksum () | |
Destructor; releases resources. More... | |
void | Hypertable::BasicBloomFilterWithChecksum< HasherT >::insert (const void *key, size_t len) |
Inserts a new blob into the hash. More... | |
void | Hypertable::BasicBloomFilterWithChecksum< HasherT >::insert (const String &key) |
Overloaded insert function for Strings. More... | |
bool | Hypertable::BasicBloomFilterWithChecksum< HasherT >::may_contain (const void *key, size_t len) const |
Checks if the data set "may" contain the key. More... | |
bool | Hypertable::BasicBloomFilterWithChecksum< HasherT >::may_contain (const String &key) const |
Overloaded may_contain function for Strings. More... | |
void | Hypertable::BasicBloomFilterWithChecksum< HasherT >::serialize (StaticBuffer &buf) |
Serializes the BloomFilter into a static memory buffer. More... | |
uint8_t * | Hypertable::BasicBloomFilterWithChecksum< HasherT >::base () |
Getter for the serialized bloom filter data, including metadata and checksums. More... | |
void | Hypertable::BasicBloomFilterWithChecksum< HasherT >::validate (String &filename) |
Validates the checksum of the BloomFilter. More... | |
size_t | Hypertable::BasicBloomFilterWithChecksum< HasherT >::size () |
Getter for the bloom filter size. More... | |
size_t | Hypertable::BasicBloomFilterWithChecksum< HasherT >::total_size () |
Getter for the total size (including checksum and metadata) More... | |
size_t | Hypertable::BasicBloomFilterWithChecksum< HasherT >::get_num_hashes () |
Getter for the number of hash functions. More... | |
size_t | Hypertable::BasicBloomFilterWithChecksum< HasherT >::get_length_bits () |
Getter for the number of bits. More... | |
size_t | Hypertable::BasicBloomFilterWithChecksum< HasherT >::get_items_estimate () |
Getter for the estimated number of items. More... | |
size_t | Hypertable::BasicBloomFilterWithChecksum< HasherT >::get_items_actual () |
Getter for the actual number of items. More... | |
void | Hypertable::append_as_byte_string (DynamicBuffer &dst_buf, const void *value, uint32_t value_len) |
Serializes and appends a byte array to a DynamicBuffer object. More... | |
void | Hypertable::append_as_byte_string (DynamicBuffer &dst_buf, const char *str) |
Serializes and appends a string to a DynamicBuffer object. More... | |
uint32_t | Hypertable::fletcher32 (const void *data, size_t len) |
Compute fletcher32 checksum for arbitary data. More... | |
template<typename T , typename... Ts> | |
std::unique_ptr< T > | make_unique (Ts &&...params) |
bool | Hypertable::Config::has (const String &name) |
Check existence of a configuration value. More... | |
bool | Hypertable::Config::defaulted (const String &name) |
Check if a configuration value is defaulted. More... | |
template<typename T > | |
T | Hypertable::Config::get (const String &name) |
Retrieves a configuration value. More... | |
template<typename T > | |
T | Hypertable::Config::get (const String &name, const T &default_value) |
Retrieves a configuration value (or a default value, if the value was not set) More... | |
Desc & | Hypertable::Config::cmdline_desc (const char *usage=nullptr) |
A macro which definds global functions like get_bool(), get_str(), get_i16() etc. More... | |
void | Hypertable::Config::cmdline_desc (const Desc &desc) |
Set the command line options description. More... | |
Desc & | Hypertable::Config::cmdline_hidden_desc () |
Get the command line hidden options description (for positional options) More... | |
PositionalDesc & | Hypertable::Config::cmdline_positional_desc () |
Get the command line positional options description. More... | |
Desc & | Hypertable::Config::file_desc (const char *usage=NULL) |
Get the config file options description. More... | |
void | Hypertable::Config::file_desc (const Desc &desc) |
Set the config file options description. More... | |
void | Hypertable::Config::parse_args (int argc, char *argv[]) |
Initialization helper; parses the argc/argv parameters into properties, reads the configuration file, handles "help" and "help-config" parameters. More... | |
void | Hypertable::Config::parse_file (const String &fname, const Desc &desc) |
Parses a configuration file and stores all configuration options into the option descriptor. More... | |
void | Hypertable::Config::alias (const String &cmdline_opt, const String &file_opt, bool overwrite=false) |
Setup command line option alias for config file option. More... | |
void | Hypertable::Config::sync_aliases () |
Sync alias values. More... | |
bool | Hypertable::Config::allow_unregistered_options (bool choice) |
Toggle allow unregistered options. More... | |
bool | Hypertable::Config::allow_unregistered_options () |
Returns true if unregistered options are allowed. More... | |
void | Hypertable::Config::cleanup () |
Free all resources used. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &os, const crontab_entry &entry) |
Helper function to write crontab_entry to an ostream. More... | |
template<int N> | |
void | Hypertable::reconstruct_spec (const std::bitset< N > &bits, String &spec) |
Converts binary crontab spec back into string spec. More... | |
size_t | Hypertable::hash_case_cstr (const char *s) |
template<class _Key , class _Tp > | |
bool | Hypertable::operator== (const directory_entry< _Key, _Tp > &lhs, const directory_entry< _Key, _Tp > &rhs) |
template<class _Key , class _Tp > | |
bool | Hypertable::operator!= (const directory_entry< _Key, _Tp > &lhs, const directory_entry< _Key, _Tp > &rhs) |
template<class _Key , class _Tp > | |
bool | Hypertable::operator< (const directory_entry< _Key, _Tp > &lhs, const directory_entry< _Key, _Tp > &rhs) |
template<class _Key , class _Tp , class _Compare , class _Allocator > | |
bool | Hypertable::operator== (const directory< _Key, _Tp, _Compare, _Allocator > &__x, const directory< _Key, _Tp, _Compare, _Allocator > &__y) |
template<class _Key , class _Tp , class _Compare , class _Allocator > | |
bool | Hypertable::operator!= (const directory< _Key, _Tp, _Compare, _Allocator > &__x, const directory< _Key, _Tp, _Compare, _Allocator > &__y) |
template<class _Key , class _Tp , class _Compare , class _Allocator > | |
bool | Hypertable::operator< (const directory< _Key, _Tp, _Compare, _Allocator > &__x, const directory< _Key, _Tp, _Compare, _Allocator > &__y) |
template<class _Key , class _Tp , class _Compare , class _Allocator > | |
bool | Hypertable::operator> (const directory< _Key, _Tp, _Compare, _Allocator > &__x, const directory< _Key, _Tp, _Compare, _Allocator > &__y) |
template<class _Key , class _Tp , class _Compare , class _Allocator > | |
bool | Hypertable::operator>= (const directory< _Key, _Tp, _Compare, _Allocator > &__x, const directory< _Key, _Tp, _Compare, _Allocator > &__y) |
template<class _Key , class _Tp , class _Compare , class _Allocator > | |
bool | Hypertable::operator<= (const directory< _Key, _Tp, _Compare, _Allocator > &__x, const directory< _Key, _Tp, _Compare, _Allocator > &__y) |
template<class _Key , class _Tp , class _Compare , class _Allocator > | |
void | Hypertable::swap (directory< _Key, _Tp, _Compare, _Allocator > &__x, directory< _Key, _Tp, _Compare, _Allocator > &__y) noexcept(noexcept(__x.swap(__y))) |
std::ostream & | Hypertable::operator<< (std::ostream &out, const Exception &) |
Global operator to print an Exception to a std::ostream. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &out, const ExceptionMessageRenderer &r) |
Global helper operator to print an Exception to a std::ostream. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &out, const ExceptionMessagesRenderer &r) |
Global helper operator to print an Exception to a std::ostream. More... | |
void | Hypertable::escape (String &str, const String &escape_chars) |
Escapes a string. More... | |
void | Hypertable::unescape (String &str) |
Unescapes a string. More... | |
static bool | Hypertable::FailureInducer::enabled () |
Returns true if the FailureInducer is enabled (= if an instance was allocated) More... | |
void | Hypertable::FailureInducer::parse_option (String spec) |
Parses a spec string (as explained above) and stores it in an internal structure. More... | |
void | Hypertable::FailureInducer::maybe_fail (const String &label) |
Tests and executes the induced failures. More... | |
bool | Hypertable::FailureInducer::failure_signalled (const String &label) |
Returns true if a failure was signalled. More... | |
void | Hypertable::FailureInducer::clear () |
Clears the failure inducer. More... | |
void | Hypertable::FailureInducer::parse_option_single (String option) |
Helper function to parse a single option. More... | |
bool | Hypertable::operator< (const Filesystem::Dirent &lhs, const Filesystem::Dirent &rhs) |
Filesystem::Flags | Hypertable::convert (std::string str) |
Converts string mnemonic to corresponding Filesystem::Flags value. More... | |
template<class PolicyT > | |
void | Hypertable::Config::init_with_policy (int argc, char *argv[], const Desc *desc=0) |
Init with policy (with init_options (called before parse_args) and init (called after parse_args) methods. More... | |
template<class PolicyListT > | |
void | Hypertable::Config::init_with_policies (int argc, char *argv[], const Desc *desc=0) |
Convenience function (more of a demo) to init with a list of polices. More... | |
void | Hypertable::Config::init (int argc, char *argv[], const Desc *desc=NULL) |
Initialize with default policy. More... | |
void | Hypertable::Logger::initialize (const String &name) |
Public initialization function - creates a singleton instance of LogWriter. More... | |
LogWriter * | Hypertable::Logger::get () |
Accessor for the LogWriter singleton instance. More... | |
void | md5_starts (md5_context *ctx) |
Initialize and setup a MD5 context structure. More... | |
void | md5_update (md5_context *ctx, const unsigned char *input, int ilen) |
Adds data to the MD5 process buffer. More... | |
void | md5_finish (md5_context *ctx, unsigned char output[16]) |
Retrieve the final MD5 digest. More... | |
void | md5_csum (const unsigned char *input, int ilen, unsigned char output[16]) |
Convenience function to calculate the MD5 sum of an input buffer. More... | |
int | md5_file (const char *path, unsigned char output[16]) |
Convenience function to calculate the MD5 sum of a file. More... | |
void | md5_hmac (unsigned char *key, int keylen, const unsigned char *input, int ilen, unsigned char output[16]) |
Calculates a "Hashed MAC" of an input buffer combined with a secret key. More... | |
int | md5_self_test (void) |
Runs a self test. More... | |
void | md5_hex (const void *input, size_t ilen, char output[33]) |
Convenience function to calculate the MD5 sum of an input buffer; returns string with the MD5 encoded in hexadecimal. More... | |
void | md5_string (const char *input, char output[33]) |
Calculates the hex string of MD5 of null terminated input. More... | |
int64_t | md5_hash (const char *input) |
Returns a 64-bit hash checksum of a null terminated input buffer. More... | |
void | md5_trunc_modified_base64 (const char *input, char output[17]) |
Get the modified base64 encoded string of the first 12 Bytes of the 16 Byte MD5 code of a null terminated output; see http://en.wikipedia.org/wiki/Base64#URL_applications for more information. More... | |
void | digest_to_trunc_modified_base64 (const char digest[16], char output[17]) |
Get the modified base64 encoded string of a 16 byte message digest see http://en.wikipedia.org/wiki/Base64#URL_applications for more information. More... | |
uint32_t | Hypertable::murmurhash2 (const void *data, size_t len, uint32_t hash) |
The murmurhash2 implementation. More... | |
template<typename CharT , class PageAlloc > | |
std::ostream & | Hypertable::operator<< (std::ostream &out, const PageArena< CharT, PageAlloc > &m) |
template<typename FunT > | |
ScopeGuardImpl0< FunT > | Hypertable::make_guard (FunT fun) |
template<typename FunT , typename P1T > | |
ScopeGuardImpl1< FunT, P1T > | Hypertable::make_guard (FunT fun, P1T p1) |
template<typename FunT , typename P1T , typename P2T > | |
ScopeGuardImpl2< FunT, P1T, P2T > | Hypertable::make_guard (FunT fun, P1T p1, P2T p2) |
template<typename FunT , typename P1T , typename P2T , typename P3T > | |
ScopeGuardImpl3< FunT, P1T, P2T, P3T > | Hypertable::make_guard (FunT fun, P1T p1, P2T p2, P3T p3) |
template<class ObjT , typename MethodT > | |
ObjScopeGuardImpl0< ObjT, MethodT > | Hypertable::make_obj_guard (ObjT &obj, MethodT method) |
template<class ObjT , typename MethodT , typename P1T > | |
ObjScopeGuardImpl1< ObjT, MethodT, P1T > | Hypertable::make_obj_guard (ObjT &obj, MethodT method, P1T p1) |
template<class ObjT , typename MethodT , typename P1T , typename P2T > | |
ObjScopeGuardImpl2< ObjT, MethodT, P1T, P2T > | Hypertable::make_obj_guard (ObjT &obj, MethodT method, P1T p1, P2T p2) |
template<class T > | |
RefHolder< T > | Hypertable::by_ref (T &t) |
void | Hypertable::Serialization::encode_i8 (uint8_t **bufp, uint8_t val) |
Encodes a byte into the given buffer. More... | |
uint8_t | Hypertable::Serialization::decode_i8 (const uint8_t **bufp, size_t *remainp) |
Decode a 8-bit integer (a byte/character) More... | |
uint8_t | Hypertable::Serialization::decode_byte (const uint8_t **bufp, size_t *remainp) |
Decodes a single byte from the given buffer. More... | |
void | Hypertable::Serialization::encode_bool (uint8_t **bufp, bool bval) |
Encodes a boolean into the given buffer. More... | |
bool | Hypertable::Serialization::decode_bool (const uint8_t **bufp, size_t *remainp) |
Decodes a boolean value from the given buffer. More... | |
void | Hypertable::Serialization::encode_i16 (uint8_t **bufp, uint16_t val) |
Encode a 16-bit integer in little-endian order. More... | |
uint16_t | Hypertable::Serialization::decode_i16 (const uint8_t **bufp, size_t *remainp) |
Decode a 16-bit integer in little-endian order. More... | |
void | Hypertable::Serialization::encode_i32 (uint8_t **bufp, uint32_t val) |
Encode a 32-bit integer in little-endian order. More... | |
uint32_t | Hypertable::Serialization::decode_i32 (const uint8_t **bufp, size_t *remainp) |
Decode a 32-bit integer in little-endian order. More... | |
void | Hypertable::Serialization::encode_i64 (uint8_t **bufp, uint64_t val) |
Encode a 64-bit integer in little-endian order. More... | |
uint64_t | Hypertable::Serialization::decode_i64 (const uint8_t **bufp, size_t *remainp) |
Decode a 64-bit integer in little-endian order. More... | |
int | Hypertable::Serialization::encoded_length_vi32 (uint32_t val) |
Length of a variable length encoded 32-bit integer (up to 5 bytes) More... | |
int | Hypertable::Serialization::encoded_length_vi64 (uint64_t val) |
Length of a variable length encoded 64-bit integer (up to 9 bytes) More... | |
void | Hypertable::Serialization::encode_vi32 (uint8_t **bufp, uint32_t val) |
Encode a integer (up to 32-bit) in variable length encoding. More... | |
void | Hypertable::Serialization::encode_vi64 (uint8_t **bufp, uint64_t val) |
Encode a integer (up to 64-bit) in variable length encoding. More... | |
uint32_t | Hypertable::Serialization::decode_vi32 (const uint8_t **bufp, size_t *remainp) |
Decode a variable length encoded integer up to 32-bit. More... | |
uint64_t | Hypertable::Serialization::decode_vi64 (const uint8_t **bufp, size_t *remainp) |
Decode a variable length encoded integer up to 64-bit. More... | |
uint32_t | Hypertable::Serialization::decode_vi32 (const uint8_t **bufp) |
Decode a variable length encoded integer up to 32-bit. More... | |
uint64_t | Hypertable::Serialization::decode_vi64 (const uint8_t **bufp) |
Decode a variable length encoded integer up to 64-bit. More... | |
size_t | Hypertable::Serialization::encoded_length_bytes32 (int32_t len) |
Computes the encoded length of a 32-bit length byte array (i32, bytes) More... | |
void | Hypertable::Serialization::encode_bytes32 (uint8_t **bufp, const void *data, int32_t len) |
Encodes a variable sized byte array into the given buffer. More... | |
uint8_t * | Hypertable::Serialization::decode_bytes32 (const uint8_t **bufp, size_t *remainp, uint32_t *lenp) |
Decodes a variable sized byte array from the given buffer. More... | |
size_t | Hypertable::Serialization::encoded_length_str16 (const char *str) |
Computes the encoded length of a string16 encoding. More... | |
size_t | Hypertable::Serialization::encoded_length_str16 (const String &str) |
Computes the encoded length of a String. More... | |
void | Hypertable::Serialization::encode_str16 (uint8_t **bufp, const void *str, uint16_t len) |
Encodes a string buffer into the given buffer. More... | |
void | Hypertable::Serialization::encode_str16 (uint8_t **bufp, const char *str) |
Encodes a c-style null-terminated string into the given buffer. More... | |
template<class StringT > | |
void | Hypertable::Serialization::encode_str16 (uint8_t **bufp, const StringT &str) |
Encodes a string into the given buffer. More... | |
const char * | Hypertable::Serialization::decode_str16 (const uint8_t **bufp, size_t *remainp) |
Decodes a c-style string from the given buffer. More... | |
char * | Hypertable::Serialization::decode_str16 (const uint8_t **bufp, size_t *remainp, uint16_t *lenp) |
Decodes a c-style string from the given buffer. More... | |
size_t | Hypertable::Serialization::encoded_length_vstr (size_t len) |
Computes the encoded length of vstr (vint64, data, null) More... | |
size_t | Hypertable::Serialization::encoded_length_vstr (const char *s) |
Computes the encoded length of vstr. More... | |
size_t | Hypertable::Serialization::encoded_length_vstr (const String &s) |
Computes the encoded length of vstr. More... | |
void | Hypertable::Serialization::encode_vstr (uint8_t **bufp, const void *buf, size_t len) |
Encode a buffer as variable length string (vint64, data, null) More... | |
void | Hypertable::Serialization::encode_vstr (uint8_t **bufp, const char *s) |
Encode a c-style string as vstr. More... | |
template<class StringT > | |
void | Hypertable::Serialization::encode_vstr (uint8_t **bufp, const StringT &s) |
Encode a String as vstr. More... | |
char * | Hypertable::Serialization::decode_vstr (const uint8_t **bufp, size_t *remainp) |
Decode a vstr (vint64, data, null). More... | |
char * | Hypertable::Serialization::decode_vstr (const uint8_t **bufp, size_t *remainp, uint32_t *lenp) |
Decode a vstr (vint64, data, null) More... | |
void | Hypertable::Serialization::encode_inet_addr (uint8_t **bufp, const InetAddr &addr) |
Encode an InetAddr structure. More... | |
InetAddr | Hypertable::Serialization::decode_inet_addr (const uint8_t **bufp, size_t *remainp) |
Decode an InetAddr structure. More... | |
void | Hypertable::Serialization::encode_double (uint8_t **bufp, double val) |
Encodes a double with 18 decimal digits of precision as 64-bit left-of-decimal, followed by 64-bit right-of-decimal, both in little-endian order. More... | |
double | Hypertable::Serialization::decode_double (const uint8_t **bufp, size_t *remainp) |
Decodes a double as 64-bit left-of-decimal, followed by 64-bit right-of-decimal, both in little-endian order. More... | |
int | Hypertable::Serialization::encoded_length_double () |
Length of an encoded double (16 bytes) More... | |
bool | Hypertable::Serialization::equal (double a, double b) |
Compare doubles that may have been serialized and unserialized. More... | |
bool | Hypertable::operator< (const StaticBuffer &sb1, const StaticBuffer &sb2) |
"Less than" operator for StaticBuffer; uses memcmp More... | |
bool | Hypertable::operator== (const StaticBuffer &sb1, const StaticBuffer &sb2) |
Equality operator for StaticBuffer; uses memcmp. More... | |
bool | Hypertable::operator!= (const StaticBuffer &sb1, const StaticBuffer &sb2) |
Inequality operator for StaticBuffer. More... | |
String | Hypertable::format (const char *fmt,...) __attribute__((format(printf |
Returns a String using printf like format facilities Vanilla snprintf is about 1.5x faster than this, which is about: 10x faster than boost::format; 1.5x faster than std::string append (operator+=); 3.5x faster than std::string operator+;. More... | |
String | Hypertable::format_number (int64_t n, int sep= ',') |
Return decimal number string separated by a separator (default: comma) for every 3 digits. More... | |
String | Hypertable::format_bytes (size_t n, const void *buf, size_t len, const char *trailer="...") |
Return first n bytes of buffer with an optional trailer if the size of the buffer exceeds n. More... | |
template<class SequenceT > | |
String | Hypertable::format_list (const SequenceT &seq, const char *sep=", ") |
Return a string presentation of a sequence. More... | |
bool | Hypertable::strip_enclosing_quotes (const char *input, size_t input_len, const char **output, size_t *output_len) |
Strips enclosing quotes. More... | |
String | operator+ (const String &s1, short sval) |
Append operator for shorts. More... | |
String | operator+ (const String &s1, uint16_t sval) |
Append operator for ushorts. More... | |
String | operator+ (const String &s1, int ival) |
Append operator for integers. More... | |
String | operator+ (const String &s1, uint32_t ival) |
Append operator for unsigned integers. More... | |
String | operator+ (const String &s1, int64_t llval) |
Append operator for 64bit integers. More... | |
String | operator+ (const String &s1, uint64_t llval) |
Append operator for 64bit unsigned integers. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &, const CpuInfo &) |
Global operator<< to print a CpuInfo. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &, const CpuStat &) |
Global operator<< to print a CpuStat. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &, const MemStat &) |
Global operator<< to print a MemStat. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &, const DiskStat &) |
Global operator<< to print a DiskStat. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &, const OsInfo &) |
Global operator<< to print a OsInfo. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &, const SwapStat &) |
Global operator<< to print a SwapStat. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &, const NetInfo &) |
Global operator<< to print a NetInfo. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &, const NetStat &) |
Global operator<< to print a NetStat. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &, const ProcInfo &) |
Global operator<< to print a ProcInfo. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &, const ProcStat &) |
Global operator<< to print a ProcStat. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &, const FsStat &) |
Global operator<< to print a FsStat. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &, const TermInfo &) |
Global operator<< to print a TermInfo. More... | |
const char * | Hypertable::system_info_lib_version () |
Returns a descriptive string of the libsigar version. More... | |
size_t | Hypertable::tcl_hash (const char *s) |
The Tcl hash by John Ousterhout for null-terminated c-strings, preferably alpha-numeric characters only. More... | |
size_t | Hypertable::tcl_hash (const void *data, size_t len, size_t seed) |
Tcl hash for data with known length. More... | |
size_t | Hypertable::tcl_hash2 (const void *data, size_t len, size_t seed) |
Unrolled Tcl hash, up to 20% faster for longer (> 8 bytes) strings. More... | |
void | Hypertable::print_proc_stat () |
Prints statistics about the current process. More... | |
Hypertable::TestStat::TestStat () | |
void | Hypertable::TestStat::operator() (double x) |
void | Hypertable::TestStat::add (double x) |
double | Hypertable::TestStat::min () const |
double | Hypertable::TestStat::max () const |
double | Hypertable::TestStat::mean () const |
double | Hypertable::TestStat::stdev () const |
std::ostream & | Hypertable::operator<< (std::ostream &out, const TestStat &stat) |
Prints a TestStat instance to a stream. More... | |
Hypertable::TestFun< FunT >::TestFun (FunT fun, bool proc_stat=false, TestStat *stat=NULL) | |
void | Hypertable::TestFun< FunT >::operator() () |
template<typename FunT > | |
void | Hypertable::serial_run (FunT fun, size_t n, bool proc_stat=false) |
Runs a test serially n times in a row while accumulating the benchmark results. More... | |
template<typename FunT > | |
void | Hypertable::parallel_run (FunT fun, size_t n, bool proc_stat=false) |
Runs a test in parallel n times in a row while accumulating the benchmark results. More... | |
template<typename FunT > | |
void | Hypertable::run_test (FunT fun, bool proc_stat=false, const Properties *props=0) |
Runs a test based on command line parameters: More... | |
int64_t | Hypertable::get_ts64 () |
Returns the current time in nanoseconds as a 64bit number. More... | |
ostream & | Hypertable::hires_ts (std::ostream &) |
Prints the current time as seconds and nanoseconds, delimited by '.'. More... | |
int64_t | Hypertable::parse_ts (const char *ts) |
Inline function which parses a string with a timestamp in localtime and returns a 64bit nanosecond timestamp. More... | |
int32_t | Hypertable::random_int32 (int32_t maximum) |
Generate random 32-bit integer. More... | |
void | Hypertable::random_generator_set_seed (unsigned seed) |
Sets random number generator seed. More... | |
void | Hypertable::random_fill_with_chars (char *buf, size_t len, const char *charset=nullptr) |
Fills a buffer with random values from a set of characters. More... | |
Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::directory (const key_compare &__comp) noexcept(std::is_nothrow_default_constructible< allocator_type >::value &&std::is_nothrow_copy_constructible< key_compare >::value) | |
Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::directory (const allocator_type &__a) | |
Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::directory (const key_compare &__comp, const allocator_type &__a) | |
Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::directory (const directory &__d) | |
Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::directory (directory &&__d) noexcept(std::is_nothrow_move_constructible< allocator_type >::value &&std::is_nothrow_move_constructible< value_compare >::value) | |
template<class _InputIterator > | |
void | Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::insert (const_iterator pos, _InputIterator __f, _InputIterator __l) |
void | Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::swap (directory &__d) noexcept(__is_nothrow_swappable< value_compare >::value &&(!__node_traits::propagate_on_container_swap::value||__is_nothrow_swappable< __node_allocator >::value)) |
template<class _InputIterator > | |
void | Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::insert (_InputIterator __f, _InputIterator __l) |
__node_pointer | Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::__create_node () |
template<class... _Args> | |
__node_pointer | Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::__create_node (_Args &&...__args) |
void | Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::__destroy_node (__node *np) |
std::ostream & | Hypertable::ExceptionMessageRenderer::render (std::ostream &out) const |
Global helper function to print an Exception to a std::ostream. More... | |
std::ostream & | Hypertable::ExceptionMessagesRenderer::render (std::ostream &out) const |
Global helper function to print an Exception to a std::ostream. More... | |
General purpose utility library.
The Common library contains general purpose utility classes used by all other modules within Hypertable. It is not dependent on any other library defined in Hypertable.
#define HT_DELIM_CHECK | ( | _l_, | |
_c_ | |||
) |
Definition at line 40 of file TimeInline.h.
#define HT_EXCEPTION | ( | _code_, | |
_msg_ | |||
) | Exception(_code_, _msg_, __LINE__, HT_FUNC, __FILE__) |
#define HT_EXCEPTION2 | ( | _code_, | |
_ex_, | |||
_msg_ | |||
) | Exception(_code_, _msg_, _ex_, __LINE__, HT_FUNC, __FILE__) |
#define HT_LOG_EXCEPTION | ( | _s_ | ) |
#define HT_RANGE_CHECK | ( | _v_, | |
_min_, | |||
_max_ | |||
) |
Definition at line 47 of file TimeInline.h.
#define HT_RETHROW | ( | _s_ | ) | HT_RETHROWF("%s", _s_) |
#define HT_RETHROWF | ( | _fmt_, | |
... | |||
) |
#define HT_TCLHASH_DO2 | ( | p, | |
i | |||
) | ret += (ret << 3) + p[i]; ret += (ret << 3) + p[i+1] |
#define HT_TCLHASH_DO4 | ( | p, | |
i | |||
) | HT_TCLHASH_DO2(p, i); HT_TCLHASH_DO2(p, i+2); |
#define HT_TCLHASH_DO8 | ( | p, | |
i | |||
) | HT_TCLHASH_DO4(p, i); HT_TCLHASH_DO4(p, i+4); |
#define HT_THROW | ( | _code_, | |
_msg_ | |||
) | throw HT_EXCEPTION(_code_, _msg_) |
#define HT_THROW2 | ( | _code_, | |
_ex_, | |||
_msg_ | |||
) | throw HT_EXCEPTION2(_code_, _ex_, _msg_) |
#define HT_THROW2_ | ( | _code_, | |
_ex_ | |||
) | HT_THROW2(_code_, _ex_, "") |
#define HT_THROW2F | ( | _code_, | |
_ex_, | |||
_fmt_, | |||
... | |||
) | throw HT_EXCEPTION2(_code_, _ex_, Hypertable::format(_fmt_, __VA_ARGS__)) |
#define HT_THROWF | ( | _code_, | |
_fmt_, | |||
... | |||
) | throw HT_EXCEPTION(_code_, Hypertable::format(_fmt_, __VA_ARGS__)) |
#define HT_TRY | ( | _s_, | |
_code_ | |||
) |
#define HT_TRY_OR_LOG | ( | _s_, | |
_code_ | |||
) |
Definition at line 284 of file BloomFilter.h.
Definition at line 318 of file BloomFilterWithChecksum.h.
typedef PageArena<unsigned char> Hypertable::ByteArena |
Definition at line 361 of file PageArena.h.
typedef PageArena Hypertable::CharArena |
Definition at line 360 of file PageArena.h.
STL Set managing c-style strings.
Definition at line 52 of file StringExt.h.
typedef std::map<const char *, int32_t, LtCstr> CstrToInt32Map |
STL map from c-style string to int32_t.
Definition at line 55 of file StringExt.h.
typedef std::map<const char *, int64_t, LtCstr> CstrToInt64MapT |
STL map from c-style string to int64_t.
Definition at line 58 of file StringExt.h.
typedef Cons<TestPolicy, DefaultPolicy> Hypertable::Config::DefaultTestPolicy |
Definition at line 218 of file TestUtils.h.
typedef PropertiesDesc Hypertable::Config::Desc |
typedef std::shared_ptr<DiscreteRandomGenerator> Hypertable::DiscreteRandomGeneratorPtr |
Definition at line 134 of file DiscreteRandomGenerator.h.
typedef std::vector<double> Hypertable::Doubles |
Definition at line 150 of file Properties.h.
typedef std::shared_ptr<DynamicBuffer> Hypertable::DynamicBufferPtr |
Definition at line 207 of file DynamicBuffer.h.
typedef std::shared_ptr<Filesystem> Hypertable::FilesystemPtr |
Smart pointer to Filesystem.
Definition at line 572 of file Filesystem.h.
typedef NumericSignedFormatter<int16_t> Hypertable::Int16Formatter |
typedef NumericSignedFormatter<int32_t> Hypertable::Int32Formatter |
typedef NumericSignedFormatter<int64_t> Hypertable::Int64Formatter |
typedef std::vector<int64_t> Hypertable::Int64s |
Definition at line 149 of file Properties.h.
typedef NumericSignedFormatter<int8_t> Hypertable::Int8Formatter |
typedef long long int Hypertable::Lld |
typedef long long unsigned int Hypertable::Llu |
typedef long unsigned int Hypertable::Lu |
typedef std::shared_ptr<MetricsCollectorGanglia> Hypertable::MetricsCollectorGangliaPtr |
Smart pointer to MetricsCollectorGanglia.
Definition at line 144 of file MetricsCollectorGanglia.h.
typedef Po::positional_options_description Hypertable::PositionalDesc |
Definition at line 201 of file Properties.h.
typedef Po::options_description Hypertable::PropertiesDesc |
Definition at line 200 of file Properties.h.
typedef std::shared_ptr<Properties> Hypertable::PropertiesPtr |
Definition at line 447 of file Properties.h.
typedef const ScopeGuardImplBase& Hypertable::ScopeGuard |
Definition at line 68 of file ScopeGuard.h.
|
private |
Definition at line 120 of file FailureInducer.h.
typedef std::shared_ptr<StaticBuffer> Hypertable::StaticBufferPtr |
Smart pointer to StaticBuffer.
Definition at line 232 of file StaticBuffer.h.
typedef std::shared_ptr<StatsSystem> Hypertable::StatsSystemPtr |
Definition at line 150 of file StatsSystem.h.
typedef PageArena<uint8_t, DefaultPageAllocator> Hypertable::StlArena |
Definition at line 35 of file StlAllocator.h.
typedef std::string Hypertable::String |
A String is simply a typedef to std::string.
In the future we might want to use something better later, as std::string always causes a heap allocation, and is lacking in functionalities cf. http://www.and.org/vstr/comparison
typedef std::vector<String> Hypertable::Strings |
Definition at line 148 of file Properties.h.
STL Set managing Strings.
Definition at line 42 of file StringExt.h.
typedef boost::thread Hypertable::Thread |
typedef boost::thread_group Hypertable::ThreadGroup |
typedef NumericUnsignedFormatter<uint16_t> Hypertable::UInt16Formatter |
typedef NumericUnsignedFormatter<uint32_t> Hypertable::UInt32Formatter |
typedef NumericUnsignedFormatter<uint64_t> Hypertable::UInt64Formatter |
typedef NumericUnsignedFormatter<uint8_t> Hypertable::UInt8Formatter |
typedef std::shared_ptr<WordStream> Hypertable::WordStreamPtr |
Definition at line 106 of file WordStream.h.
anonymous enum |
|
private |
The default page size is 8 kb.
Enumerator | |
---|---|
DEFAULT_PAGE_SIZE |
Definition at line 72 of file PageArena.h.
anonymous enum |
Enumerator | |
---|---|
SIZE |
Definition at line 129 of file PageArena.h.
|
private |
All statistics categories that are provided by this class.
Enumerator | |
---|---|
CPUINFO | |
CPU | |
LOADAVG | |
MEMORY | |
DISK | |
SWAP | |
NETINFO | |
NET | |
OSINFO | |
PROCINFO | |
PROC | |
FS | |
TERMINFO |
Definition at line 46 of file StatsSystem.h.
|
strong |
|
strong |
Enumeration type for append flags.
Enumerator | |
---|---|
NONE |
None. |
FLUSH |
Flush. |
SYNC |
Sync. |
Definition at line 76 of file Filesystem.h.
|
protected |
Statistics identifer; assigned in constructor.
Enumerator | |
---|---|
SYSTEM | |
RANGE | |
TABLE | |
RANGE_SERVER |
Definition at line 81 of file StatsSerializable.h.
Enumerator | |
---|---|
OPEN_FLAG_DIRECTIO | |
OPEN_FLAG_OVERWRITE | |
OPEN_FLAG_VERIFY_CHECKSUM |
Definition at line 85 of file Filesystem.h.
|
private |
Definition at line 766 of file directory.h.
|
private |
Definition at line 798 of file directory.h.
|
private |
Definition at line 807 of file directory.h.
|
inline |
Definition at line 92 of file TestUtils.h.
void Hypertable::Config::alias | ( | const String & | cmdline_opt, |
const String & | file_opt, | ||
bool | overwrite = false |
||
) |
Setup command line option alias for config file option.
Typically used in policy init_options functions. The command line option has higher priority.
Requires use of sync_alias() afterwards.
cmdline_opt | Command line option name |
file_opt | Configuration file option name |
overwrite | If true then existing aliases are overwritten |
bool Hypertable::Config::allow_unregistered_options | ( | bool | choice | ) |
bool Hypertable::Config::allow_unregistered_options | ( | ) |
|
inline |
Serializes and appends a byte array to a DynamicBuffer object.
dst_buf | The DynamicBuffer which will receive the data |
value | A pointer to the data which is appended |
value_len | The size of the data, in bytes |
Definition at line 130 of file ByteString.h.
|
inline |
Serializes and appends a string to a DynamicBuffer object.
dst_buf | The DynamicBuffer which will receive the data |
str | A pointer to a zero-terminated buffer with the data |
Definition at line 146 of file ByteString.h.
|
inline |
Getter for the serialized bloom filter data, including metadata and checksums.
Definition at line 232 of file BloomFilterWithChecksum.h.
|
inline |
Constructor.
items_estimate | An estimated number of items that will be inserted |
false_positive_prob | The probability for false positives |
Definition at line 62 of file BloomFilterWithChecksum.h.
|
inline |
Alternative constructor.
items_estimate | An estimated number of items that will be inserted |
bits_per_item | Average bits per item |
num_hashes | Number of hash functions for the filter |
Definition at line 92 of file BloomFilterWithChecksum.h.
|
inline |
Alternative constructor.
items_estimate | An estimated number of items that will be inserted |
items_actual | Actual number of items |
length | Number of bits |
num_hashes | Number of hash functions for the filter |
Definition at line 121 of file BloomFilterWithChecksum.h.
|
inline |
Definition at line 286 of file ScopeGuard.h.
void Hypertable::Config::cleanup | ( | ) |
void FailureInducer::clear | ( | ) |
Clears the failure inducer.
Definition at line 106 of file FailureInducer.cc.
Desc & Hypertable::Config::cmdline_desc | ( | const char * | usage = nullptr | ) |
A macro which definds global functions like get_bool(), get_str(), get_i16() etc.
usage | Optional usage string (first time) |
void Hypertable::Config::cmdline_desc | ( | const Desc & | desc | ) |
Desc & Hypertable::Config::cmdline_hidden_desc | ( | ) |
PositionalDesc & Hypertable::Config::cmdline_positional_desc | ( | ) |
Filesystem::Flags Hypertable::convert | ( | std::string | str | ) |
Converts string mnemonic to corresponding Filesystem::Flags value.
str | String mnemonic for append flag ("NONE", "FLUSH", or "SYNC") |
Exception | with code equal to Error::INVALID_ARGUMENT if string mnemonic is not recognized |
Definition at line 180 of file Filesystem.cc.
|
inline |
Decodes a boolean value from the given buffer.
Increments buffer pointer and decrements remainp on success.
bufp | Pointer to the source buffer pointer |
remainp | Pointer to number of bytes remaining in buffer |
Definition at line 96 of file Serialization.h.
|
inline |
Decodes a single byte from the given buffer.
Increments buffer pointer and decrements remainp on success.
bufp | Pointer to the source buffer pointer |
remainp | Pointer to the number of bytes remaining in buffer |
Definition at line 73 of file Serialization.h.
|
inline |
Decodes a variable sized byte array from the given buffer.
Byte array i encoded as a 4 byte length followed by the data. Increments buffer pointer and decrements remainp on success.
bufp | Address of buffer containing encoded byte array |
remainp | Address of variable containing number of bytes remaining |
lenp | Address of length of decoded byte array |
Definition at line 287 of file Serialization.h.
|
inline |
Decodes a double as 64-bit left-of-decimal, followed by 64-bit right-of-decimal, both in little-endian order.
bufp | Pointer to pointer of the source buffer |
remainp | Pointer to remaining size variable |
Definition at line 577 of file Serialization.h.
|
inline |
Decode a 16-bit integer in little-endian order.
bufp | Pointer to the source buffer pointer |
remainp | Pointer to the remaining size variable |
Definition at line 117 of file Serialization.h.
|
inline |
Decode a 32-bit integer in little-endian order.
bufp | Pointer to the source buffer pointer |
remainp | Pointer to the remaining size variable |
Definition at line 140 of file Serialization.h.
|
inline |
Decode a 64-bit integer in little-endian order.
bufp | Pointer to the source buffer pointer |
remainp | Pointer to the remaining size variable |
Definition at line 163 of file Serialization.h.
|
inline |
Decode a 8-bit integer (a byte/character)
bufp | The pointer to the source buffer |
remainp | The pointer to the remaining size variable |
Definition at line 60 of file Serialization.h.
|
inline |
Decode an InetAddr structure.
bufp | Pointer to pointer of the source buffer |
remainp | Pointer to remaining size variable |
Definition at line 545 of file Serialization.h.
|
inline |
Decodes a c-style string from the given buffer.
Decodes a str16 from the given buffer to a String.
The encoding of the string is a 2 byte length followed by the string, followed by a '\0' termination byte. The length does not include the '\0' terminator. The decoded string pointer points back into the encoding buffer. Increments buffer pointer and decrements remainp on success.
bufp | Pointer to pointer of buffer containing encoded string |
remainp | Address of variable of number of bytes remaining in buffer |
The encoding of the string is a 2 byte length followed by the string, followed by a '\0' termination byte. The length does not include the '\0' terminator. Increments buffer pointer and decrements remainp on success.
bufp | Pointer to pointer of buffer containing encoded string |
remainp | Address of variable of number of bytes remaining in buffer |
Definition at line 370 of file Serialization.h.
|
inline |
Decodes a c-style string from the given buffer.
The encoding of the string is a 2 byte length followed by the string, followed by a '\0' termination byte. The length does not include the '\0' terminator. The decoded string pointer points back into the encoding buffer. Increments buffer pointer and decrements remainp on success.
bufp | Pointer to pointer of buffer containing encoded string |
remainp | Address of variable of number of bytes remaining in buffer |
lenp | Address of varaible to hold the len of the string |
Definition at line 389 of file Serialization.h.
|
inline |
Decode a variable length encoded integer up to 32-bit.
bufp | Pointer to the source buffer pointer |
remainp | Pointer to the remaining size variable |
Definition at line 216 of file Serialization.h.
|
inline |
Decode a variable length encoded integer up to 32-bit.
bufp | Pointer to the source buffer pointer |
Definition at line 239 of file Serialization.h.
|
inline |
Decode a variable length encoded integer up to 64-bit.
bufp | Pointer to the source buffer pointer |
remainp | Pointer to the remaining size variable |
Definition at line 228 of file Serialization.h.
|
inline |
Decode a variable length encoded integer up to 64-bit.
bufp | Pointer to the source buffer pointer |
Definition at line 250 of file Serialization.h.
|
inline |
Decode a vstr (vint64, data, null).
Decode a vstr (vint64, data, null)
Note: decoding a vstr longer than 4GiB on a 32-bit platform is obviously futile (throws bad vstr exception)
bufp | Pointer to pointer of the source buffer |
remainp | Pointer to the remaining size variable |
bufp | Pointer to pointer of the source buffer |
remainp | Pointer to the remaining size variable |
Definition at line 487 of file Serialization.h.
|
inline |
Decode a vstr (vint64, data, null)
bufp | Pointer to pointer of the source buffer |
remainp | Pointer to the remaining size variable |
lenp | Pointer to the string length |
Definition at line 518 of file Serialization.h.
|
inline |
|
inline |
helper functions which call the destructor of an object; destructor is not called on POD types (using template specialization)
There used to be std::destroy's, but they never made it into the final standard.
Definition at line 46 of file Allocator.h.
|
inline |
Definition at line 47 of file Allocator.h.
|
inline |
Definition at line 48 of file Allocator.h.
|
inline |
Definition at line 49 of file Allocator.h.
|
inline |
Definition at line 50 of file Allocator.h.
|
inline |
Definition at line 51 of file Allocator.h.
|
inline |
Definition at line 52 of file Allocator.h.
|
inline |
Definition at line 53 of file Allocator.h.
|
inline |
Definition at line 54 of file Allocator.h.
|
inline |
Definition at line 55 of file Allocator.h.
|
inline |
Definition at line 56 of file Allocator.h.
|
inline |
Definition at line 57 of file Allocator.h.
|
inline |
Definition at line 58 of file Allocator.h.
|
inline |
Definition at line 61 of file Allocator.h.
void digest_to_trunc_modified_base64 | ( | const char | digest[16], |
char | output[17] | ||
) |
Get the modified base64 encoded string of a 16 byte message digest see http://en.wikipedia.org/wiki/Base64#URL_applications for more information.
digest | The 16 byte input buffer |
output | Hex string representation of MD5 checksum |
|
explicitnoexcept |
Definition at line 657 of file directory.h.
|
explicit |
Definition at line 664 of file directory.h.
Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::directory | ( | const key_compare & | __comp, |
const allocator_type & | __a | ||
) |
Definition at line 669 of file directory.h.
Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::directory | ( | const directory< _Key, _Tp, _Compare, _Allocator > & | __d | ) |
Definition at line 675 of file directory.h.
|
noexcept |
Definition at line 682 of file directory.h.
|
inlinestatic |
Returns true if the FailureInducer is enabled (= if an instance was allocated)
Definition at line 80 of file FailureInducer.h.
|
inline |
Encodes a boolean into the given buffer.
Assumes there is enough space available. Increments buffer pointer.
bufp | Address of the destination buffer |
bval | The boolean value |
Definition at line 84 of file Serialization.h.
|
inline |
Encodes a variable sized byte array into the given buffer.
Encoded as a 4 byte length followed by the data. Assumes there is enough space available. Increments buffer pointer.
bufp | Address of the destination buffer |
data | Pointer to array of bytes |
len | The length of the byte array |
Definition at line 274 of file Serialization.h.
|
inline |
Encodes a double with 18 decimal digits of precision as 64-bit left-of-decimal, followed by 64-bit right-of-decimal, both in little-endian order.
bufp | Pointer to the destination buffer |
val | The double to encode |
Definition at line 562 of file Serialization.h.
|
inline |
Encode a 16-bit integer in little-endian order.
bufp | Pointer to the destination buffer |
val | The value to encode |
Definition at line 106 of file Serialization.h.
|
inline |
Encode a 32-bit integer in little-endian order.
bufp | Pointer to the destination buffer pointer |
val | The value to encode |
Definition at line 129 of file Serialization.h.
|
inline |
Encode a 64-bit integer in little-endian order.
bufp | Pointer to the destination buffer pointer |
val | The value to encode |
Definition at line 152 of file Serialization.h.
|
inline |
Encodes a byte into the given buffer.
Assumes there is enough space available. Increments buffer pointer.
bufp | Address of the destination buffer |
val | The byte |
Definition at line 49 of file Serialization.h.
|
inline |
Encode an InetAddr structure.
bufp | Pointer to pointer of the destination buffer |
addr | Reference to the InetAddr object to encode |
Definition at line 532 of file Serialization.h.
|
inline |
Encodes a string buffer into the given buffer.
Encoded as a 2 byte length followed by the string data, followed by a '\0' termination byte. The length value does not include the '\0'. Assumes there is enough space available. Increments buffer pointer.
bufp | Address of the destination buffer |
str | The c-style string to encode |
len | Length of the string |
Definition at line 325 of file Serialization.h.
|
inline |
Encodes a c-style null-terminated string into the given buffer.
Encoded as a 2 byte length followed by the string data, followed by a '\0' termination byte. The length value does not include the '\0'. Assumes there is enough space available. Increments buffer pointer.
bufp | Pointer to pointer of destination buffer |
str | The c-style string to encode |
Definition at line 339 of file Serialization.h.
|
inline |
Encodes a string into the given buffer.
Encoded as a 2 byte length followed by the string data, followed by a '\0' termination byte. The length value does not include the '\0'. Assumes there is enough space available. Increments buffer pointer.
bufp | Pointer to pointer of the destinatin buffer |
str | The String to encode |
Definition at line 355 of file Serialization.h.
|
inline |
Encode a integer (up to 32-bit) in variable length encoding.
bufp | Pointer to the destination buffer pointer |
val | The value to encode |
Definition at line 195 of file Serialization.h.
|
inline |
Encode a integer (up to 64-bit) in variable length encoding.
bufp | The pointer to the destination buffer pointer |
val | The value to encode |
Definition at line 205 of file Serialization.h.
|
inline |
Encode a buffer as variable length string (vint64, data, null)
bufp | Pointer to pointer of destination buffer |
buf | Pointer to the start of the input buffer |
len | Length of the input buffer |
Definition at line 453 of file Serialization.h.
|
inline |
Encode a c-style string as vstr.
bufp | Pointer to pointer of destination buffer |
s | Pointer to the start of the string |
Definition at line 463 of file Serialization.h.
|
inline |
Encode a String as vstr.
bufp | Pointer to pointer of destination buffer |
s | The string to encode |
Definition at line 474 of file Serialization.h.
|
inline |
Computes the encoded length of a 32-bit length byte array (i32, bytes)
len | Length of the byte array to be encoded |
Definition at line 261 of file Serialization.h.
|
inline |
Length of an encoded double (16 bytes)
Definition at line 589 of file Serialization.h.
|
inline |
Computes the encoded length of a string16 encoding.
str | Pointer to the c-style string |
Definition at line 300 of file Serialization.h.
|
inline |
Computes the encoded length of a String.
str | Reference to string object |
Definition at line 310 of file Serialization.h.
|
inline |
Length of a variable length encoded 32-bit integer (up to 5 bytes)
val | The 32-bit integer to encode |
Definition at line 175 of file Serialization.h.
|
inline |
Length of a variable length encoded 64-bit integer (up to 9 bytes)
val | The 64-bit integer to encode |
Definition at line 185 of file Serialization.h.
|
inline |
Computes the encoded length of vstr (vint64, data, null)
len | The string length |
Definition at line 420 of file Serialization.h.
|
inline |
Computes the encoded length of vstr.
Assumes that the string length can be encoded in 32-bit integer
s | Pointer to the the c-style string |
Definition at line 431 of file Serialization.h.
|
inline |
Computes the encoded length of vstr.
Assumes that the string length can be encoded in 32-bit integer
s | The string to encode |
Definition at line 442 of file Serialization.h.
|
inline |
Compare doubles that may have been serialized and unserialized.
The serialization process loses precision, so this function is necessary to compare pre-serialized with post-serialized values
a | First value to compare |
b | Second value to compare |
Definition at line 602 of file Serialization.h.
Escapes a string.
str | The string to escape [in/out] |
escape_chars | All characters that are escaped |
Definition at line 34 of file Escaper.cc.
bool FailureInducer::failure_signalled | ( | const String & | label | ) |
Returns true if a failure was signalled.
This function is usually not invoked directly; use HT_FAILURE_SIGNALLED instead
Definition at line 94 of file FailureInducer.cc.
Desc & Hypertable::Config::file_desc | ( | const char * | usage = NULL | ) |
void Hypertable::Config::file_desc | ( | const Desc & | desc | ) |
uint32_t Hypertable::fletcher32 | ( | const void * | data, |
size_t | len | ||
) |
Compute fletcher32 checksum for arbitary data.
See http://en.wikipedia.org/wiki/Fletcher%27s_checksum for more information about the algorithm. Fletcher32 is the default checksum used in Hypertable.
data | Pointer to the input data |
len | Input data length in bytes |
Definition at line 42 of file Checksum.cc.
String Hypertable::format | ( | const char * | fmt, |
... | |||
) |
Returns a String using printf like format facilities Vanilla snprintf is about 1.5x faster than this, which is about: 10x faster than boost::format; 1.5x faster than std::string append (operator+=); 3.5x faster than std::string operator+;.
fmt | A printf-like format string |
String Hypertable::format_bytes | ( | size_t | n, |
const void * | buf, | ||
size_t | len, | ||
const char * | trailer = "..." |
||
) |
Return first n bytes of buffer with an optional trailer if the size of the buffer exceeds n.
n | The max. displayed size of the buffer |
buf | The memory buffer |
len | The size of the memory buffer |
trailer | Appended if len exceeds n |
String Hypertable::format_list | ( | const SequenceT & | seq, |
const char * | sep = ", " |
||
) |
Return a string presentation of a sequence.
Is quite slow but versatile, as it uses ostringstream.
seq | A STL-compatible sequence with forward-directional iterators |
sep | A separator which is inserted after each list item |
LogWriter * Hypertable::Logger::get | ( | ) |
T Hypertable::Config::get | ( | const String & | name | ) |
Retrieves a configuration value.
This is a template function and usually not used directly. The file Properties.h provides global functions like get_bool(), get_string() that are usually used.
name | The name of the option |
T Hypertable::Config::get | ( | const String & | name, |
const T & | default_value | ||
) |
|
inline |
Convenience function returning a size aligned to 8 or 4 bytes, depending on the system's architecture.
Definition at line 66 of file Allocator.h.
|
inline |
Getter for the actual number of items.
Definition at line 287 of file BloomFilterWithChecksum.h.
|
inline |
Getter for the estimated number of items.
Definition at line 281 of file BloomFilterWithChecksum.h.
|
inline |
Getter for the number of bits.
Definition at line 275 of file BloomFilterWithChecksum.h.
|
inline |
Getter for the number of hash functions.
Definition at line 269 of file BloomFilterWithChecksum.h.
int64_t Hypertable::get_ts64 | ( | ) |
|
inline |
|
inline |
Definition at line 58 of file CstrHashTraits.h.
std::ostream & Hypertable::hires_ts | ( | ostream & | out | ) |
|
inline |
|
inline |
|
inline |
Init with policy (with init_options (called before parse_args) and init (called after parse_args) methods.
The Policy template class is usually a list of configuration policies, i.e.
typedef Meta::list<Policy1, Policy2, ...> MyPolicy;
void Hypertable::Logger::initialize | ( | const String & | name | ) |
|
inline |
Inserts a new blob into the hash.
Runs through each hash function and sets the appropriate bit for each hash.
key | Pointer to the key's data |
len | Size of the data (in bytes) |
Definition at line 162 of file BloomFilterWithChecksum.h.
|
inline |
Overloaded insert function for Strings.
key | Reference to the string. |
Definition at line 176 of file BloomFilterWithChecksum.h.
void Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::insert | ( | const_iterator | pos, |
_InputIterator | __f, | ||
_InputIterator | __l | ||
) |
Definition at line 693 of file directory.h.
void Hypertable::directory< _Key, _Tp, _Compare, _Allocator >::insert | ( | _InputIterator | __f, |
_InputIterator | __l | ||
) |
Definition at line 756 of file directory.h.
|
inline |
Definition at line 89 of file ScopeGuard.h.
|
inline |
Definition at line 114 of file ScopeGuard.h.
|
inline |
Definition at line 140 of file ScopeGuard.h.
|
inline |
Definition at line 170 of file ScopeGuard.h.
|
inline |
Definition at line 198 of file ScopeGuard.h.
|
inline |
Definition at line 227 of file ScopeGuard.h.
|
inline |
Definition at line 257 of file ScopeGuard.h.
std::unique_ptr<T> make_unique | ( | Ts &&... | params | ) |
|
inline |
Definition at line 98 of file TestUtils.h.
|
inline |
Checks if the data set "may" contain the key.
This can return false positives.
This function runs through all hash tables and checks if the hashed bit is set. If any of them is not set then the key is definitely not part of the data set. If all bits are set then the key "may" be in the data set.
key | Pointer to the key's data |
len | Size of the data (in bytes) |
Definition at line 191 of file BloomFilterWithChecksum.h.
|
inline |
Overloaded may_contain function for Strings.
key | The String to look for |
Definition at line 213 of file BloomFilterWithChecksum.h.
void FailureInducer::maybe_fail | ( | const String & | label | ) |
Tests and executes the induced failures.
This function is usually not invoked directly; use HT_MAYBE_FAIL and HT_MAYBE_FAIL_X instead
Definition at line 63 of file FailureInducer.cc.
void md5_csum | ( | const unsigned char * | input, |
int | ilen, | ||
unsigned char | output[16] | ||
) |
int md5_file | ( | const char * | path, |
unsigned char | output[16] | ||
) |
Convenience function to calculate the MD5 sum of a file.
path | input file name |
output | MD5 checksum result |
void md5_finish | ( | md5_context * | ctx, |
unsigned char | output[16] | ||
) |
int64_t md5_hash | ( | const char * | input | ) |
void md5_hex | ( | const void * | input, |
size_t | ilen, | ||
char | output[33] | ||
) |
void md5_hmac | ( | unsigned char * | key, |
int | keylen, | ||
const unsigned char * | input, | ||
int | ilen, | ||
unsigned char | output[16] | ||
) |
int md5_self_test | ( | void | ) |
void md5_starts | ( | md5_context * | ctx | ) |
void md5_string | ( | const char * | input, |
char | output[33] | ||
) |
void md5_trunc_modified_base64 | ( | const char * | input, |
char | output[17] | ||
) |
Get the modified base64 encoded string of the first 12 Bytes of the 16 Byte MD5 code of a null terminated output; see http://en.wikipedia.org/wiki/Base64#URL_applications for more information.
input | Pointer to the input string |
output | Hex string representation of MD5 checksum |
void md5_update | ( | md5_context * | ctx, |
const unsigned char * | input, | ||
int | ilen | ||
) |
|
inline |
Definition at line 99 of file TestUtils.h.
|
inline |
Definition at line 97 of file TestUtils.h.
uint32_t Hypertable::murmurhash2 | ( | const void * | data, |
size_t | len, | ||
uint32_t | hash | ||
) |
The murmurhash2 implementation.
data | Pointer to the input buffer |
len | Size of the input buffer |
hash | Initial seed for the hash; usually set to 0 |
Definition at line 29 of file MurmurHash.cc.
|
inline |
Definition at line 122 of file directory.h.
|
inline |
Inequality operator for StaticBuffer.
Definition at line 227 of file StaticBuffer.h.
|
inline |
Definition at line 825 of file directory.h.
|
inline |
Definition at line 81 of file TestUtils.h.
|
inline |
Definition at line 125 of file TestUtils.h.
Append operator for shorts.
Definition at line 61 of file StringExt.h.
Append operator for ushorts.
Definition at line 66 of file StringExt.h.
Append operator for integers.
Definition at line 71 of file StringExt.h.
Append operator for unsigned integers.
Definition at line 76 of file StringExt.h.
Append operator for 64bit integers.
Definition at line 81 of file StringExt.h.
Append operator for 64bit unsigned integers.
Definition at line 86 of file StringExt.h.
|
inline |
Definition at line 128 of file directory.h.
|
inline |
"Less than" operator for StaticBuffer; uses memcmp
Definition at line 209 of file StaticBuffer.h.
|
inline |
Definition at line 574 of file Filesystem.h.
|
inline |
Definition at line 834 of file directory.h.
|
inline |
Prints a TestStat instance to a stream.
Definition at line 110 of file TestUtils.h.
std::ostream & Hypertable::operator<< | ( | std::ostream & | os, |
const crontab_entry & | entry | ||
) |
Helper function to write crontab_entry to an ostream.
os | Output stream |
entry | Binary crontab specification structure |
os
) Definition at line 301 of file Crontab.cc.
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const Exception & | e | ||
) |
|
inline |
Definition at line 365 of file PageArena.h.
|
inline |
|
inline |
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const CpuInfo & | i | ||
) |
Global operator<< to print a CpuInfo.
Definition at line 821 of file SystemInfo.cc.
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const CpuStat & | s | ||
) |
Global operator<< to print a CpuStat.
Definition at line 829 of file SystemInfo.cc.
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const MemStat & | s | ||
) |
Global operator<< to print a MemStat.
Definition at line 837 of file SystemInfo.cc.
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const DiskStat & | s | ||
) |
Global operator<< to print a DiskStat.
Definition at line 844 of file SystemInfo.cc.
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const OsInfo & | i | ||
) |
Global operator<< to print a OsInfo.
Definition at line 851 of file SystemInfo.cc.
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const SwapStat & | s | ||
) |
Global operator<< to print a SwapStat.
Definition at line 860 of file SystemInfo.cc.
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const NetInfo & | i | ||
) |
Global operator<< to print a NetInfo.
Definition at line 866 of file SystemInfo.cc.
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const NetStat & | s | ||
) |
Global operator<< to print a NetStat.
Definition at line 873 of file SystemInfo.cc.
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const ProcInfo & | i | ||
) |
Global operator<< to print a ProcInfo.
Definition at line 881 of file SystemInfo.cc.
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const ProcStat & | s | ||
) |
Global operator<< to print a ProcStat.
Definition at line 892 of file SystemInfo.cc.
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const FsStat & | s | ||
) |
Global operator<< to print a FsStat.
Definition at line 903 of file SystemInfo.cc.
std::ostream & Hypertable::operator<< | ( | std::ostream & | out, |
const TermInfo & | i | ||
) |
Global operator<< to print a TermInfo.
Definition at line 910 of file SystemInfo.cc.
|
inline |
Definition at line 868 of file directory.h.
|
inline |
Definition at line 112 of file directory.h.
|
inline |
Equality operator for StaticBuffer; uses memcmp.
Definition at line 216 of file StaticBuffer.h.
|
inline |
Definition at line 817 of file directory.h.
|
inline |
Definition at line 852 of file directory.h.
|
inline |
Definition at line 860 of file directory.h.
void Hypertable::parallel_run | ( | FunT | fun, |
size_t | n, | ||
bool | proc_stat = false |
||
) |
Runs a test in parallel n times in a row while accumulating the benchmark results.
Definition at line 167 of file TestUtils.h.
void Hypertable::Config::parse_args | ( | int | argc, |
char * | argv[] | ||
) |
void Hypertable::Config::parse_file | ( | const String & | fname, |
const Desc & | desc | ||
) |
Parses a configuration file and stores all configuration options into the option descriptor.
fname | The filename of the configuration file |
desc | Reference to the Description object |
Error::CONFIG_BAD_CFG_FILE | on error |
void FailureInducer::parse_option | ( | String | spec | ) |
Parses a spec string (as explained above) and stores it in an internal structure.
There can be multiple calls to parse_options, and multiple failure inducer specs can be concatenated by ';'.
spec | The spec string |
Definition at line 56 of file FailureInducer.cc.
|
private |
Helper function to parse a single option.
Definition at line 114 of file FailureInducer.cc.
|
inline |
Inline function which parses a string with a timestamp in localtime and returns a 64bit nanosecond timestamp.
ts | c-string with the timestamp formatted as YYYY-mm-dd[ HH:MM[:SS[.SS|:NS]]] |
std::range_error | if a range (i.e. 0..59) is exceeded |
std::runtime_error | if a delimiter is missing |
Definition at line 64 of file TimeInline.h.
|
inline |
Prints statistics about the current process.
Definition at line 64 of file TestUtils.h.
void Hypertable::random_fill_with_chars | ( | char * | buf, |
size_t | len, | ||
const char * | charset = nullptr |
||
) |
Fills a buffer with random values from a set of characters.
buf | Pointer to the buffer |
len | Number of bytes to fill |
charset | A string containing the allowed characters |
Definition at line 44 of file DataGeneratorRandom.cc.
void Hypertable::random_generator_set_seed | ( | unsigned | seed | ) |
Sets random number generator seed.
seed | Random number generator seed |
Definition at line 40 of file DataGeneratorRandom.cc.
int32_t Hypertable::random_int32 | ( | int32_t | maximum | ) |
Generate random 32-bit integer.
maximum
) Definition at line 35 of file DataGeneratorRandom.cc.
void Hypertable::reconstruct_spec | ( | const std::bitset< N > & | bits, |
String & | spec | ||
) |
Converts binary crontab spec back into string spec.
N | Number of bits in bits |
bits | Bit set representing crontab field |
spec | Crontab field string equivalent of bits |
Definition at line 319 of file Crontab.cc.
|
inline |
|
inline |
void Hypertable::run_test | ( | FunT | fun, |
bool | proc_stat = false , |
||
const Properties * | props = 0 |
||
) |
Runs a test based on command line parameters:
–threads The number of threads (runs serially if not specified) –repeats How often the test function is invoked
Definition at line 185 of file TestUtils.h.
void Hypertable::serial_run | ( | FunT | fun, |
size_t | n, | ||
bool | proc_stat = false |
||
) |
Runs a test serially n times in a row while accumulating the benchmark results.
Definition at line 152 of file TestUtils.h.
|
inline |
Serializes the BloomFilter into a static memory buffer.
buf | The static memory buffer |
Definition at line 221 of file BloomFilterWithChecksum.h.
|
inline |
Getter for the bloom filter size.
Definition at line 254 of file BloomFilterWithChecksum.h.
|
inline |
Definition at line 100 of file TestUtils.h.
|
inline |
Strips enclosing quotes.
Inspects the first and last characters of the string defined by input
and input_len
and if they are either both single quotes or double quotes, it sets output
and output_len
to contained between them. Otherwise, *output
is set to input
and *output_len
is set to input_len
.
input | Input char string |
input_len | Input char string length |
output | Address of output char string pointer |
output_len | Address of output char string pointer |
|
noexcept |
Definition at line 742 of file directory.h.
|
inlinenoexcept |
Definition at line 876 of file directory.h.
void Hypertable::Config::sync_aliases | ( | ) |
const char * Hypertable::system_info_lib_version | ( | ) |
Returns a descriptive string of the libsigar version.
Definition at line 816 of file SystemInfo.cc.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 121 of file TestUtils.h.
|
inline |
Definition at line 75 of file TestUtils.h.
|
inline |
Getter for the total size (including checksum and metadata)
Definition at line 261 of file BloomFilterWithChecksum.h.
void Hypertable::unescape | ( | String & | str | ) |
Unescapes a string.
str | The string to unescape [in/out] |
Definition at line 57 of file Escaper.cc.
|
inline |
Validates the checksum of the BloomFilter.
filename | The filename of this BloomFilter; required to calculate the checksum |
Error::BLOOMFILTER_CHECKSUM_MISMATCH | If the checksum does not match |
Definition at line 241 of file BloomFilterWithChecksum.h.
|
inline |
Destructor; releases resources.
Definition at line 144 of file BloomFilterWithChecksum.h.
int Hypertable::FailureInducer::failure_inducer_state::error_code |
The error code which is thrown (if type is FAILURE_TYPE_THROW)
Definition at line 115 of file FailureInducer.h.
int Hypertable::FailureInducer::failure_inducer_state::failure_type |
The failure type; an enum in FailureInducer.cc.
Definition at line 113 of file FailureInducer.h.
FunT Hypertable::TestFun< FunT >::fun |
Definition at line 142 of file TestUtils.h.
|
static |
This is a singleton class.
When initializing an application, the FailureInducer is usually instantiated like this:
if (FailureInducer::instance == 0) FailureInducer::instance = new FailureInducer();
Definition at line 75 of file FailureInducer.h.
uint32_t Hypertable::FailureInducer::failure_inducer_state::iteration |
Current iteration of the failure.
Definition at line 109 of file FailureInducer.h.
|
private |
Definition at line 106 of file TestUtils.h.
|
private |
Definition at line 106 of file TestUtils.h.
|
private |
The serialized bloom filter data, including metadata and checksums.
Definition at line 315 of file BloomFilterWithChecksum.h.
|
private |
The actual bloom filter bit-array.
Definition at line 312 of file BloomFilterWithChecksum.h.
|
private |
Probability of returning a false positive.
Definition at line 300 of file BloomFilterWithChecksum.h.
|
private |
The hash function implementation.
Definition at line 291 of file BloomFilterWithChecksum.h.
|
private |
Definition at line 105 of file TestUtils.h.
|
private |
Actual number of items.
Definition at line 297 of file BloomFilterWithChecksum.h.
|
private |
Estimated number of items.
Definition at line 294 of file BloomFilterWithChecksum.h.
|
private |
Definition at line 104 of file TestUtils.h.
|
private |
Definition at line 104 of file TestUtils.h.
|
mutableprivate |
Definition at line 103 of file TestUtils.h.
|
private |
A mutex to serialize access.
Definition at line 123 of file FailureInducer.h.
|
private |
Number of bits.
Definition at line 306 of file BloomFilterWithChecksum.h.
|
private |
|
private |
Number of hash functions.
Definition at line 303 of file BloomFilterWithChecksum.h.
|
private |
Definition at line 106 of file TestUtils.h.
|
private |
Definition at line 106 of file TestUtils.h.
|
private |
A list of all failure settings.
Definition at line 126 of file FailureInducer.h.
int Hypertable::FailureInducer::failure_inducer_state::pause_millis |
Milliseconds to pause (if type is FAILURE_TYPE_PAUSE)
Definition at line 117 of file FailureInducer.h.
bool Hypertable::TestFun< FunT >::proc_stat |
Definition at line 143 of file TestUtils.h.
PropertiesPtr Hypertable::Config::properties |
std::recursive_mutex Hypertable::Config::rec_mutex |
TestStat* Hypertable::TestFun< FunT >::stat_acc |
Definition at line 144 of file TestUtils.h.
uint32_t Hypertable::FailureInducer::failure_inducer_state::trigger_iteration |
Number of iterations after which the failure is triggered.
Definition at line 111 of file FailureInducer.h.