In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how the RGW in Ceph sends Message to the underlying OSD. The article is very detailed and has certain reference value. Interested friends must read it!
1. Read and write process of Librados
You can see the following functions in src/cls/rgw/cls_rgw_client.cc:
Int cls_rgw_lc_set_entry (IoCtx& io_ctx, string& oid, pair& entry) {bufferlist in, out; cls_rgw_lc_set_entry_op call; call.entry = entry;:: encode (call, in); int r = io_ctx.exec (oid, "rgw", "lc_set_entry", in, out); return r;}
Continue to trace the function call io_ctx.exec (). You can see the corresponding function implementation in src/librados/librados.cc as follows:
Int librados::IoCtx::exec (const std::string& oid, const char * cls, const char * method, bufferlist& inbl, bufferlist& outbl) {object_t obj (oid); return io_ctx_impl- > exec (obj, cls, method, inbl, outbl);}
Continue to trace the function call io_ctx_impl- > exec () and see the following implementation in librados/IoCtxImpl.cc:
Int librados::IoCtxImpl::exec (const object_t& oid, const char * cls, const char * method, bufferlist& inbl, bufferlist& outbl) {:: ObjectOperation rd; prepare_assert_ops (& rd); rd.call (cls, method, inbl); return operate_read (oid, & rd, & outbl);}
Rd.call () this function encapsulates the operation as OSDOp and puts it into the vector collection of the ObjectOperation object. Initiate a read-write request operation in the final operate_read (oid, & rd, & outbl) function:
Int librados::IoCtxImpl::operate_read (const object_t& oid,: ObjectOperation * o, bufferlist * pbl, int flags) {if (! o-> size ()) return 0; Mutex mylock ("IoCtxImpl::operate_read::mylock"); Cond cond; bool done Int r; version_t ver; Context * onack = new C_SafeCond (& mylock, & cond, & done, & r); int op = o-> ops [0] .op.op; ldout (client- > cct, 10)
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.