In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you what Mutation related classes have. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The MutationImpl class description:
Struct MutationImpl {metareqid_t reqid; _ U32 attempt; LogSegment * log fragment submitted by ls; utime_t mds_st mds local timestamp utime_t op_stamp If the timestamp mds_rank_t slave_to_mds; provided by the client is slave_to_mds > 0, it means that this Mutation is the remote auth pins set auth_pins of set pins; mds cache pins set stickydirs; map remote_auth_pins; initiated by slave. Local auth pins list projected_inodes; list projected_fnodes; list updated_locks; list dirty_cow_inodes; list dirty_cow_dentries;}
MutationImpl class methods:
MutationImpl::get_client ()
| | _ _ reqid.name.is _ client () is not empty |
| | _ _ indicates that the request is sent from client and returns client information, that is, client_t (reqid.name.num ()) |
| | _ return-1 |
MutationImpl::apply ()
| | _ _ traverse and empty the projected_inodes array and each array member executes the pop_and_dirty_projected_inode (ls) function |
| | _ _ traverse and empty the projected_fnodes array and each array member executes the pop_and_dirty_projected_fnode (ls) function |
| | _ _ traverse the dirty_cow_inodes array |
| | _ _ each member of the array executes _ mark_dirty (ls) |
| | _ _ traverse the dirty_cow_dentries array |
| | _ _ each member of the array executes _ mark_dirty (ls) |
| | _ _ traverse the updated_locks array |
| | each member of the _ _ array executes mark_dirty () |
MutationImpl::cleanup ()
| | _ _ traverse the auth_pins array |
| | each member of the _ _ array executes auth_unpin () |
| | _ _ empty the auth_pins array |
| | _ _ traverse the pins array |
| | each member of the _ _ array executes put () |
| | _ _ empty the pins array |
MDRequestImpl mainly records requests from client, requests from slave, and internal operation internal_op.
Struct MDRequestImpl: public MutationImpl, public TrackedOp {Session * session; record session information elist::item item_session_request; request item MClientRequest * client_request; client request vector dn [2]; save two sets of dentry CInode * in [2]; save two sets of inode CDentry * straydn; records stray dentry snapid_t snapid Record the snap ID information indoeno_t alloc_ino, the inode number assigned by used_prealloc_ino;, the pre-assigned inode number int snap_caps; snap capability int getattr_caps;, the permission to execute getattr bool did_early_reply; bool o_trunc Request is an O_TRUNC event bool has_completed; request has completed the additional content contained in the reply by bufferlist reply_extra_bl; map cap_releases; MMDSSlaveRequest * slave_request; slave request int internal_op; internal operation Context * internal_op_finish Callback function of internal operation void * internal_op_private; the private object int retry; of internal operation records whether the number of times of rety bool waited_for_osdmap; needs to wait for updated osmap struct More {the collection set waiting_on_slave of slave request initiated by int slave_error; set slaves; Wait for slavereq reply's peer set witnessed; CInode * rename_inode; to save freeze's inode information whether bool is_freeze_authpin; save performed freeze authpin operation bool is_remote_frozen_authpin; save performed remote frozen authpin operation bool is_ambiguous_auth Save whether the ambiguous auth operation was performed} _ more;}
MDRequestImpl class methods:
MDRequestImpl::~MDRequestImpl ()
| | _ _ if client _ request is not empty |
| | _ _ execute the client_request- > put () method to try to release client_request |
| | _ _ if _ request is not empty |
| | _ _ execute the slave_request- > put () method to try to release slave_request |
| | _ _ delete _ more class object |
MDRequestImpl::freeze_auth_pin (inode)
| | _ _ set the rename_inode in _ more to inode |
| | _ _ set the is_freeze_authpin in _ more to true |
| | _ _ call auth_pin (inode) |
| | _ _ execute the freeze_auth_pin of inode () |
MDRequestImpl::unfreeze_auth_pin (clear_inode)
| | _ _ get the inode of freeze from the rename_inode in _ more |
| | _ _ if inode is currently is_frozen_auth_pin () |
| | _ _ execute unfreeze_auth_pin () of inode to remove freeze |
| | _ _ if inode is not is_frozen_auth_pin () |
| | _ _ execute the unfreeze_inode of inode () |
| | _ _ set the is_freeze_autpin in _ more to false |
| | _ _ clear _ inode==true |
| | _ _ set the rename_inode in _ more to null |
MDRequestImpl::set_remote_frozen_auth_pin (inode)
| | _ _ set the rename_inode in _ more to inode |
| | _ _ set the is_remote_frozen_authpin in _ more to true |
MDRequestImpl::set_ambiguous_auth (inode)
| | _ _ execute the set_ambiguous_auth () function of inode |
| | _ _ set the rename_inode in _ more to inode |
| | _ _ set the is_ambiguous_auth in _ more to true |
MDRequestImpl::clear_ambiguous_auth ()
| | _ _ get the inode of ambiguous from the rename_inode in _ more |
| | _ _ execute the clear_ambiguous_auth () function of inode |
| | _ _ set the is_ambiguous_auth in _ more to false |
MDRequestImpl::can_auth_pin (object)
| | _ _ if object can authpin or object is in auth_pin or remote authpin or is_freeze_authpin in _ more is true or rename_inode==object in _ more |
| | _ _ returns true |
| | _ _ returns false |
MDRequestImpl::drop_local_auth_pins ()
| | _ _ if _ more is not empty |
| | _ _ call unfreeze_auth_pin (true) to clear the auth pin of freeze |
| | _ _ call MutationImpl::drop_local_auth_pins () to clear the local auth pins |
MDRequestImpl::set_filepath (fp)
| | _ _ set the filepath2 in _ more to fp |
MDRequestImpl::set_filepath3 (fp)
| | _ _ set the filepath3 in _ more to fp |
MDRequestImpl::get_filepath ()
| | _ _ if client _ request is not empty |
| | _ _ returns client_request- > get_filepath () |
| | _ _ returns the filepath2 in _ more |
MDRequestImpl::get_filepath3 ()
| | _ _ if client _ request is not empty |
| | _ _ returns client_request- > get_filepath3 () |
| | _ _ returns the filepath3 in _ more |
Thank you for reading! This is the end of this article on "what are the related classes of Mutation?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.