41 for (
size_t i = 0; i<results.size(); i++) {
42 m_index[results[i].addr] = &results[i];
44 results[i].fetch_timestamp = now;
45 results[i].stats = make_shared<StatsRangeServer>();
75 size_t remaining =
event->payload_len - 4;
76 const uint8_t *ptr =
event->payload + 4;
78 params.
decode(&ptr, &remaining);
94 HT_ERROR_OUT <<
"Received 'get_statistics' response from unexpected connection "
95 <<
event->addr.format() <<
HT_END;
virtual void result_callback(const EventPtr &event)
Post-request hook method.
static int32_t response_code(const Event *event)
Returns the response code from an event event generated in response to a request message.
std::string String
A String is simply a typedef to std::string.
static String string_format_message(const Event *event)
Returns error message decoded standard error MESSAGE generated in response to a request message...
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
void initialize(std::vector< RangeServerStatistics > &results)
virtual void start(const String &location)
Method overridden in derived class for issuing requests.
const StatsRangeServer & stats()
Gets range server statistics.
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
DispatchHandler class for managing async RangeServer requests.
StatsRangeServerPtr stats
Unordered map specialization for InetAddr keys.
Logging routines and macros.
void set_proxy(const String &str)
Sets address type to CommAddress::PROXY and proxy name to p.
Compatibility Macros for C/C++.
RangeServer::Client m_rsclient
Range server client object
SockAddrMap< RangeServerStatistics * > m_index
ContextPtr m_context
Master context
Time related declarations.
virtual void decode(const uint8_t **bufp, size_t *remainp)
Reads serialized representation of object from a buffer.
void get_statistics(const CommAddress &addr, std::vector< SystemVariable::Spec > &specs, int64_t generation, StatsRangeServer &stats)
Issues an synchronous "get_statistics" request.
std::vector< SystemVariable::Spec > m_specs
void start()
Starts the timer.
Request/response message event.
DispatchHandlerOperationGetStatistics(ContextPtr &context)
This is a generic exception class for Hypertable.
Declarations for GetStatistics response parameters.
Error codes, Exception handling, error logging.
Address abstraction to hold either proxy name or IPv4:port address.
Response parameters for get statistics function.
int64_t get_ts64()
Returns the current time in nanoseconds as a 64bit number.
int code() const
Returns the error code.