API: add get_load implementation to storage_service

Because of the different implementation the right way of getting the
load (which is the sum of all the live diskspace used) is using the
column_family api and not through the storage_service API.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This commit is contained in:
Amnon Heiman
2015-09-09 04:08:03 +03:00
parent ea5fa7e469
commit 037dfdcf35

View File

@@ -12,6 +12,7 @@
#include "http/exception.hh"
#include "repair/repair.hh"
#include "locator/snitch_base.hh"
#include "column_family.hh"
namespace api {
@@ -121,8 +122,8 @@ void set_storage_service(http_context& ctx, routes& r) {
get_token_metadata().get_endpoint_to_host_id_map_for_reading(), res);
});
ss::get_load.set(r, [](const_req req) {
return service::get_local_storage_service().get_load();
ss::get_load.set(r, [&ctx](std::unique_ptr<request> req) {
return get_cf_stats(ctx, &column_family::stats::live_disk_space_used);
});
ss::get_load_map.set(r, [](const_req req) {