]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove unused RGWRemoteMetaLog::list_shards
authorCasey Bodley <cbodley@redhat.com>
Mon, 8 Feb 2016 20:03:05 +0000 (15:03 -0500)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 18 Feb 2016 22:04:18 +0000 (14:04 -0800)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_sync.cc
src/rgw/rgw_sync.h

index 7154c1cd68fb4a6cd9381b4aff60e1175453b0da..48a17ce2a1796e39548e5ed1fdbef77ff6a0b37a 100644 (file)
@@ -205,71 +205,6 @@ void RGWRemoteMetaLog::finish()
   stop();
 }
 
-int RGWRemoteMetaLog::list_shards(int num_shards)
-{
-  for (int i = 0; i < (int)num_shards; i++) {
-    int ret = list_shard(i);
-    if (ret < 0) {
-      ldout(store->ctx(), 10) << "failed to list shard: ret=" << ret << dendl;
-    }
-  }
-
-  return 0;
-}
-
-int RGWRemoteMetaLog::list_shard(int shard_id)
-{
-  conn = store->rest_master_conn;
-
-  char buf[32];
-  snprintf(buf, sizeof(buf), "%d", shard_id);
-
-  rgw_http_param_pair pairs[] = { { "type", "metadata" },
-                                  { "id", buf },
-                                  { NULL, NULL } };
-
-  rgw_mdlog_shard_data data;
-  int ret = conn->get_json_resource("/admin/log", pairs, data);
-  if (ret < 0) {
-    ldout(store->ctx(), 0) << "ERROR: failed to fetch mdlog data" << dendl;
-    return ret;
-  }
-
-  ldout(store->ctx(), 20) << "remote mdlog, shard_id=" << shard_id << " num of shard entries: " << data.entries.size() << dendl;
-
-  vector<rgw_mdlog_entry>::iterator iter;
-  for (iter = data.entries.begin(); iter != data.entries.end(); ++iter) {
-    rgw_mdlog_entry& entry = *iter;
-    ldout(store->ctx(), 20) << "entry: name=" << entry.name << dendl;
-  }
-
-  return 0;
-}
-
-int RGWRemoteMetaLog::get_shard_info(int shard_id)
-{
-  conn = store->rest_master_conn;
-
-  char buf[32];
-  snprintf(buf, sizeof(buf), "%d", shard_id);
-
-  rgw_http_param_pair pairs[] = { { "type", "metadata" },
-                                  { "id", buf },
-                                  { "info", NULL },
-                                  { NULL, NULL } };
-
-  RGWMetadataLogInfo info;
-  int ret = conn->get_json_resource("/admin/log", pairs, info);
-  if (ret < 0) {
-    ldout(store->ctx(), 0) << "ERROR: failed to fetch mdlog info" << dendl;
-    return ret;
-  }
-
-  ldout(store->ctx(), 20) << "remote mdlog, shard_id=" << shard_id << " marker=" << info.marker << dendl;
-
-  return 0;
-}
-
 #define CLONE_MAX_ENTRIES 100
 
 int RGWMetaSyncStatusManager::init()
index 29c5942b26bed091f20ff5d8894aed214e245af8..9d4ba49ee457a8bb37c2ec6682f4195a233b6103 100644 (file)
@@ -172,9 +172,6 @@ public:
   void finish();
 
   int read_log_info(rgw_mdlog_info *log_info);
-  int list_shard(int shard_id);
-  int list_shards(int num_shards);
-  int get_shard_info(int shard_id);
   int fetch(int num_shards, vector<string>& clone_markers);
   int read_sync_status(rgw_meta_sync_status *sync_status);
   int init_sync_status(int num_shards);