]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: remove PGStatService
authorSage Weil <sage@redhat.com>
Mon, 28 Aug 2017 20:34:30 +0000 (16:34 -0400)
committerSage Weil <sage@redhat.com>
Wed, 6 Sep 2017 14:18:04 +0000 (10:18 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/MgrMonitor.cc
src/mon/MgrStatMonitor.h
src/mon/Monitor.h
src/mon/PGMap.h
src/mon/PGStatService.h [deleted file]

index e5fe9d64bbd85ad32ac0819ef8178c72e6d07433..ae501b3593d9c41b1fd3e2fa7d6dedf49474ca3a 100644 (file)
@@ -17,7 +17,6 @@
 #include "messages/MMgrMap.h"
 #include "messages/MMgrDigest.h"
 
-#include "PGStatService.h"
 #include "include/stringify.h"
 #include "mgr/MgrContext.h"
 #include "mgr/mgr_commands.h"
index 8fa68b405a241769225647fb053f74bdbd52b3dc..4f076105fb0cf72991c28a7cb1df67b42a50f42b 100644 (file)
@@ -8,11 +8,7 @@
 #include "mon/PGMap.h"
 #include "mgr/ServiceMap.h"
 
-class PGStatService;
-class MgrPGStatService;
-
-class MgrStatMonitor : public PaxosService,
-                      public PGStatService {
+class MgrStatMonitor : public PaxosService {
   // live version
   version_t version = 0;
   PGMapDigest digest;
@@ -68,8 +64,8 @@ public:
     return service_map;
   }
 
-  // PGStatService
-  const pool_stat_t* get_pool_stat(int64_t poolid) const override {
+  // pg stat access
+  const pool_stat_t* get_pool_stat(int64_t poolid) const {
     auto i = digest.pg_pool_sum.find(poolid);
     if (i != digest.pg_pool_sum.end()) {
       return &i->second;
@@ -78,23 +74,23 @@ public:
   }
 
   ceph_statfs get_statfs(OSDMap& osdmap,
-                        boost::optional<int64_t> data_pool) const override {
+                        boost::optional<int64_t> data_pool) const {
     return digest.get_statfs(osdmap, data_pool);
   }
 
-  void print_summary(Formatter *f, ostream *out) const override {
+  void print_summary(Formatter *f, ostream *out) const {
     digest.print_summary(f, out);
   }
-  void dump_info(Formatter *f) const override {
+  void dump_info(Formatter *f) const {
     digest.dump(f);
   }
   void dump_fs_stats(stringstream *ss,
                     Formatter *f,
-                    bool verbose) const override {
+                    bool verbose) const {
     digest.dump_fs_stats(ss, f, verbose);
   }
   void dump_pool_stats(const OSDMap& osdm, stringstream *ss, Formatter *f,
-                      bool verbose) const override {
+                      bool verbose) const {
     digest.dump_pool_stats_full(osdm, ss, f, verbose);
   }
 
index c3fe86692a2d380442a760b4fc8232153fc9538e..130cf032f27cb23a021cc4d33210c49dee654af2 100644 (file)
@@ -37,7 +37,6 @@
 #include "Elector.h"
 #include "Paxos.h"
 #include "Session.h"
-#include "PGStatService.h"
 #include "MonCommand.h"
 
 #include "common/LogClient.h"
index 0e61f02d8bfdf569816a2344ab054b51b25aa5aa..cfb1d6d6bb25bfb995f92f65c2a37307bad3bf4f 100644 (file)
@@ -28,7 +28,6 @@
 #include "include/mempool.h"
 #include "mon/health_check.h"
 #include <sstream>
-#include "mon/PGStatService.h"
 
 // FIXME: don't like including this here to get OSDMap::Incremental, maybe
 // PGMapUpdater needs its own header.
diff --git a/src/mon/PGStatService.h b/src/mon/PGStatService.h
deleted file mode 100644 (file)
index b87284f..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2017 Greg Farnum/Red Hat <gfarnum@redhat.com>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-/**
- * This service abstracts out the specific implementation providing information
- * needed by parts of the Monitor based around PGStats. This'll make for
- * an easier transition from the PGMonitor-based queries where we handle
- * PGStats directly, to where we are getting information passed in from
- * the Ceph Manager.
- *
- * This initial implementation cheats by wrapping a PGMap so we don't need
- * to reimplement everything in one go.
- */
-
-#ifndef CEPH_PGSTATSERVICE_H
-#define CEPH_PGSTATSERVICE_H
-
-struct creating_pgs_t;
-
-class PGStatService {
-public:
-  PGStatService() {}
-  virtual ~PGStatService() {}
-
-  virtual const pool_stat_t* get_pool_stat(int64_t poolid) const = 0;
-  virtual ceph_statfs get_statfs(OSDMap &osd_map,
-                                boost::optional<int64_t> data_pool) const = 0;
-  virtual void print_summary(Formatter *f, ostream *out) const = 0;
-  virtual void dump_info(Formatter *f) const = 0;
-  virtual void dump_fs_stats(stringstream *ss, Formatter *f, bool verbose) const = 0;
-  virtual void dump_pool_stats(const OSDMap& osdm, stringstream *ss, Formatter *f,
-                              bool verbose) const = 0;
-
-};
-
-#endif