In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you the "ceph RGW interface source code parsing Rados data operation sample code", the content is easy to understand, well-organized, hope to help you solve doubts, the following let Xiaobian lead you to study and learn "ceph RGW interface source code parsing Rados data operation sample code" this article.
RGW business process:
Http reqest-- > apache to FastCgi module
FastCgi module-- > radosgw is implemented through a socket request (not sure if there is another way)
Radosgw-- > ceph cluster is implemented through socket and calls rados API
1. Data structure
The basic data structure is defined in Rgw_common.h, and decode and encode serialization are implemented to facilitate access to rados.
/ / create data for the permission of the bucket
Struct RGWBucketInfo
{
Rgw_bucket bucket
String owner
Uint32_t flags
String region
Time_t creation_time
String placement_rule
Bool has_instance_obj
RGWObjVersionTracker objv_tracker; / * we don't need to serialize this, for runtime tracking * /
Obj_version ep_objv; / * entry point object version, for runtime tracking only * /
RGWQuotaInfo quota
}
/ / composition of bucket pool location storage
Struct rgw_bucket {
Std::string name
Std::string data_pool
Std::string data_extra_pool; / * if not set, then we should use data_pool instead * /
Std::string index_pool
Std::string marker
Std::string bucket_id
Std::string oid
}
/ / user UID profile
Struct RGWUserInfo
2. S3 metadata atomic operation
Atomic operations on metadata are defined in rgw_op.h, with RGWOp as the base class
Create the atomic class definition of the bucket: class RGWCreateBucket: public RGWOp
3. Metadata manipulation handle
Defined in Rgw_bucket.h
Class RGWUserBuckets
Implemented in Rgw_bucket.cc
Class RGWBucketInstanceMetadataHandler: public RGWMetadataHandler
Class RGWBucketMetadataHandler: public RGWMetadataHandler
4. Implementation of rados interface
RGWRados is defined in rgw_rados.h, and all the operation interfaces related to rados are implemented.
The above is the "ceph RGW interface source code parsing Rados data operation sample code" all the content of this article, thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.