Merge "API: Cache service priod and bloom filter" from Amnon

"This series complete the changes for nodetool info

It adds the following: in cache service API save priod will be reported as 0,
to indicate never

In column family, as a workaround for the bloom filter memeory consumption
statistic, the API would return 0."
This commit is contained in:
Avi Kivity
2015-09-10 18:42:26 +03:00
2 changed files with 18 additions and 9 deletions

View File

@@ -12,8 +12,8 @@ namespace cs = httpd::cache_service_json;
void set_cache_service(http_context& ctx, routes& r) {
cs::get_row_cache_save_period_in_seconds.set(r, [](std::unique_ptr<request> req) {
// TBD
unimplemented();
// We never save the cache
// Origin uses 0 for never
return make_ready_future<json::json_return_type>(0);
});
@@ -25,8 +25,8 @@ void set_cache_service(http_context& ctx, routes& r) {
});
cs::get_key_cache_save_period_in_seconds.set(r, [](std::unique_ptr<request> req) {
// TBD
unimplemented();
// We never save the cache
// Origin uses 0 for never
return make_ready_future<json::json_return_type>(0);
});
@@ -38,8 +38,8 @@ void set_cache_service(http_context& ctx, routes& r) {
});
cs::get_counter_cache_save_period_in_seconds.set(r, [](std::unique_ptr<request> req) {
// TBD
unimplemented();
// We never save the cache
// Origin uses 0 for never
return make_ready_future<json::json_return_type>(0);
});

View File

@@ -475,7 +475,10 @@ void set_column_family(http_context& ctx, routes& r) {
cf::get_bloom_filter_off_heap_memory_used.set(r, [] (std::unique_ptr<request> req) {
//TBD
unimplemented();
// FIXME
// We are missing the off heap memory calculation
// Return 0 is the wrong value. It's a work around
// until the memory calculation will be available
//auto id = get_uuid(req->param["name"], ctx.db.local());
return make_ready_future<json::json_return_type>(0);
});
@@ -488,7 +491,10 @@ void set_column_family(http_context& ctx, routes& r) {
cf::get_index_summary_off_heap_memory_used.set(r, [] (std::unique_ptr<request> req) {
//TBD
unimplemented();
// FIXME
// We are missing the off heap memory calculation
// Return 0 is the wrong value. It's a work around
// until the memory calculation will be available
//auto id = get_uuid(req->param["name"], ctx.db.local());
return make_ready_future<json::json_return_type>(0);
});
@@ -501,7 +507,10 @@ void set_column_family(http_context& ctx, routes& r) {
cf::get_compression_metadata_off_heap_memory_used.set(r, [] (std::unique_ptr<request> req) {
//TBD
unimplemented();
// FIXME
// We are missing the off heap memory calculation
// Return 0 is the wrong value. It's a work around
// until the memory calculation will be available
//auto id = get_uuid(req->param["name"], ctx.db.local());
return make_ready_future<json::json_return_type>(0);
});