In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 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 is related to DamageTable. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
DamageTable mainly contains Damage information of DIRFRAG/DENTRY/BACKTRACE.
The DamageEntry class is the base class of DamageTable, which contains two members (damage_entry_id_t/utime_t) corresponding to the ID value of damage_entry and the time when the Damage was recorded.
Class DamageEntry {
Damage_entry_id_t id
Utime_t reported_at
}
The DirFragDamage class inherits DamageEntry, and the information (inodeno_t/frag_t) that mainly contains DirFrag corresponds to inode and frag id, respectively. These two id values can uniquely correspond to a DirFrag.
Class DirFragDamage: public DamageEntry {
Inodeno_t ino
Frag_t frag
}
Class DentryDamage: public DamageEntry {
Inodeno_t ino
Frag_t frag
Std::string dname
Snapid_t snap_id
}
Class BacktraceDamage: public DamageEntry {
Inodeno_t ino
}
Class DirFragIdent {uniquely identifies a DirFrag
Inodeno_t ino
Frag_t frag
}
Class DentryIdent {uniquely identifies a Dentry
Std::string dname
Snapid_t snap_id
}
Class DamageTable {
Std::map dirfrags; records damaged dirfrages information
Std::map dentries; records damaged dentries information
Std::map remotes; records remote damaged information
All damged information is recorded by std::map by_id; and indexed by id
Const mds_rank_t rank
}
DamgeTable::notify_dentry ()
| | _ _ create DamageEntry class object |
| | _ _ insert DamageEntry class objects into the dentries array |
| | _ _ insert DamageEntry class objects into the by_id array |
DamageTable::notify_dirfrag ()
| | _ _ create DamageEntry class object |
| | _ _ insert DamageEntry class objects into the dirfrags array |
| | _ _ insert DamageEntry class objects into the by_id array |
DamageTable::notify_remote_damaged ()
| | _ _ create BackTraceDamage class object |
| | _ _ insert BackTraceDamage class objects into the remotes array |
| | _ _ insert BackTraceDamage class objects into the by_id array |
DamageTable::is_*_damaged ()
| | _ _ find the corresponding item from the corresponding dmaged array (dirfrags/dentries/remotes) |
DamageTable::erase ()
| | _ _ according to the type of Damage item to be deleted, call dirfrags.erase () / dentries.erase () / remotes.erase () to delete the item. |
| | _ _ deletes the specified entry from the by_id array |
The correspondence between DamageTable and its subclasses is shown in the following figure:
Thank you for reading! This is the end of this article on "what is the content related to DamageTable?". 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: 239
*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.