static int bucket_stats(rgw::sal::RGWRadosStore *store,
			const std::string& tenant_name,
			const std::string& bucket_name,
			Formatter *formatter,
                        const DoutPrefixProvider *dpp)
{
  RGWBucketInfo bucket_info;
  map<RGWObjCategory, RGWStorageStats> stats;
  map<string, bufferlist> attrs;

  real_time mtime;
  int r = store->getRados()->get_bucket_info(store->svc(),
					     tenant_name, bucket_name, bucket_info,
					     &mtime, null_yield, dpp, &attrs);
  if (r < 0) {
    return r;
  }

  rgw_bucket& bucket = bucket_info.bucket;

  string bucket_ver, master_ver;
  string max_marker;
  int ret = store->getRados()->get_bucket_stats(dpp, bucket_info, RGW_NO_SHARD,
						&bucket_ver, &master_ver, stats,
						&max_marker);
  if (ret < 0) {
    cerr << "error getting bucket stats bucket=" << bucket.name << " ret=" <&l

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部