47 const char *base, *ptr;
48 string datadirs = props->get_str(
"Hypertable.RangeServer.Monitoring.DataDirectories");
50 std::vector<String> dirs;
52 boost::trim_if(datadirs, boost::is_any_of(
" \t\"'"));
54 base = datadirs.c_str();
55 while ((ptr = strchr(base,
',')) != 0) {
56 dir =
String(base, ptr-base);
132 for (
size_t i=0; i<
tables.size(); i++) {
142 if (group == PRIMARY_GROUP) {
148 for (
size_t i=0; i<
tables.size(); i++)
153 HT_FATALF(
"Invalid group number (%d)", group);
158 if (group == PRIMARY_GROUP) {
186 for (
size_t i=0; i<
tables.size(); i++)
190 HT_FATALF(
"Invalid group number (%d)", group);
194 if (group == PRIMARY_GROUP) {
223 for (
size_t i=0; i<table_count; i++) {
225 table.
decode(bufp, remainp);
230 HT_WARNF(
"Unrecognized StatsRangeServer group %d, skipping...", group);
Abstract base class for managing serialized statistics.
char * decode_vstr(const uint8_t **bufp, size_t *remainp)
Decode a vstr (vint64, data, null).
int encoded_length_double()
Length of an encoded double (16 bytes)
#define HT_WARNF(msg,...)
std::string String
A String is simply a typedef to std::string.
virtual void decode_group(int group, uint16_t len, const uint8_t **bufp, size_t *remainp)
Abstruct function to deserialize a group from a memory buffer.
uint64_t query_cache_max_memory
uint64_t block_cache_hits
uint64_t query_cache_hits
size_t encoded_length_vstr(size_t len)
Computes the encoded length of vstr (vint64, data, null)
std::vector< StatsTable > tables
uint32_t decode_i32(const uint8_t **bufp, size_t *remainp)
Decode a 32-bit integer in little-endian order.
static const int64_t TIMESTAMP_MIN
uint8_t group_count
Number of groups in group_ids.
uint64_t decode_i64(const uint8_t **bufp, size_t *remainp)
Decode a 64-bit integer in little-endian order.
int encoded_length_vi32(uint32_t val)
Length of a variable length encoded 32-bit integer (up to 5 bytes)
bool decode_bool(const uint8_t **bufp, size_t *remainp)
Decodes a boolean value from the given buffer.
size_t encoded_length() const
Returns the encoded length of this object.
std::shared_ptr< Properties > PropertiesPtr
Logging routines and macros.
void encode_i32(uint8_t **bufp, uint32_t val)
Encode a 32-bit integer in little-endian order.
Compatibility Macros for C/C++.
virtual void encode_group(int group, uint8_t **bufp) const
Abstruct function to serialize a group into a memory buffer.
uint64_t block_cache_max_memory
void encode_i64(uint8_t **bufp, uint64_t val)
Encode a 64-bit integer in little-endian order.
uint64_t query_cache_accesses
Functions to serialize/deserialize primitives to/from a memory buffer.
void decode(const uint8_t **bufp, size_t *remainp)
Deserializes this object from a buffer.
virtual size_t encoded_length_group(int group) const
Abstruct function returning the serialized length of a group.
void encode_vstr(uint8_t **bufp, const void *buf, size_t len)
Encode a buffer as variable length string (vint64, data, null)
#define HT_FATALF(msg,...)
void encode_vi32(uint8_t **bufp, uint32_t val)
Encode a integer (up to 32-bit) in variable length encoding.
void encode_bool(uint8_t **bufp, bool bval)
Encodes a boolean into the given buffer.
double 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-endia...
bool equal(double a, double b)
Compare doubles that may have been serialized and unserialized.
uint64_t block_cache_available_memory
void add_categories(int32_t categories)
Adds more categories to the already existing categories.
uint64_t query_cache_available_memory
uint8_t group_ids[32]
The actual group IDs.
void encode(uint8_t **bufp) const
Encodes the statistics to a serialized buffer.
bool operator==(const StatsRangeServer &other) const
uint32_t decode_vi32(const uint8_t **bufp, size_t *remainp)
Decode a variable length encoded integer up to 32-bit.
uint64_t block_cache_accesses
void 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 ri...