From: Yehuda Sadeh Date: Tue, 27 Sep 2016 21:35:31 +0000 (-0700) Subject: rgw_admin: better bucket reshard logging X-Git-Tag: v11.1.0~548^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ac88b5d9e6bc3c8b59c500bf79a0e3daa923a47c;p=ceph.git rgw_admin: better bucket reshard logging Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 6eead05f25bd..58600a791b26 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -4918,6 +4918,8 @@ next: formatter->open_array_section("entries"); + uint64_t total_entries = 0; + for (int i = 0; i < num_source_shards; ++i) { bool is_truncated = true; marker.clear(); @@ -4931,6 +4933,12 @@ next: list::iterator iter; for (iter = entries.begin(); iter != entries.end(); ++iter) { + formatter->open_object_section("entry"); + + encode_json("shard_id", i, formatter); + encode_json("num_entry", total_entries, formatter); + total_entries++; + rgw_cls_bi_entry& entry = *iter; encode_json("entry", entry, formatter); marker = entry.idx; @@ -4954,9 +4962,9 @@ next: if (ret < 0) { return ret; } + formatter->close_section(); + formatter->flush(cout); } - - formatter->flush(cout); } } formatter->close_section();