diff options
-rw-r--r-- | src/mon/HealthMonitor.cc | 19 | ||||
-rw-r--r-- | src/mon/HealthMonitor.h | 18 |
2 files changed, 20 insertions, 17 deletions
diff --git a/src/mon/HealthMonitor.cc b/src/mon/HealthMonitor.cc index bfa4ca02bb3..6e8e01e622b 100644 --- a/src/mon/HealthMonitor.cc +++ b/src/mon/HealthMonitor.cc @@ -21,8 +21,7 @@ #include "include/assert.h" #include "mon/Monitor.h" -// #include "mon/QuorumService.h" -// #include "mon/HealthService.h" +#include "mon/HealthService.h" #include "mon/HealthMonitor.h" #include "mon/DataHealthService.h" @@ -66,6 +65,22 @@ bool HealthMonitor::service_dispatch(MonOpRequestRef op) return services[service_type]->service_dispatch(op); } +void HealthMonitor::start_epoch() { + for (map<int,HealthService*>::iterator it = services.begin(); + it != services.end(); ++it) { + it->second->start(get_epoch()); + } +} + +void HealthMonitor::finish_epoch() { + generic_dout(20) << "HealthMonitor::finish_epoch()" << dendl; + for (map<int,HealthService*>::iterator it = services.begin(); + it != services.end(); ++it) { + assert(it->second != NULL); + it->second->finish(); + } +} + void HealthMonitor::service_shutdown() { dout(0) << "HealthMonitor::service_shutdown " diff --git a/src/mon/HealthMonitor.h b/src/mon/HealthMonitor.h index 4a7e3842bb2..9fdc3251ffc 100644 --- a/src/mon/HealthMonitor.h +++ b/src/mon/HealthMonitor.h @@ -15,10 +15,10 @@ #define CEPH_HEALTH_MONITOR_H #include "mon/QuorumService.h" -#include "mon/HealthService.h" //forward declaration namespace ceph { class Formatter; } +class HealthService; class HealthMonitor : public QuorumService { @@ -44,21 +44,9 @@ public: list<pair<health_status_t,string> > *detail) override; bool service_dispatch(MonOpRequestRef op) override; - void start_epoch() override { - for (map<int,HealthService*>::iterator it = services.begin(); - it != services.end(); ++it) { - it->second->start(get_epoch()); - } - } + void start_epoch() override; - void finish_epoch() override { - generic_dout(20) << "HealthMonitor::finish_epoch()" << dendl; - for (map<int,HealthService*>::iterator it = services.begin(); - it != services.end(); ++it) { - assert(it->second != NULL); - it->second->finish(); - } - } + void finish_epoch() override; void cleanup() override { } void service_tick() override { } |