CernVM-FS
2.12.0
|
Public Member Functions | |
void | ExtractChildren (CatalogMgrT *catalog_mgr) |
void | FixWeight () |
VirtualNode (const std::string &path, CatalogMgrT *catalog_mgr) | |
VirtualNode (const std::string &path, const DirectoryEntry &dirent, CatalogMgrT *catalog_mgr) | |
bool | IsDirectory () |
bool | IsCatalog () |
Public Attributes | |
std::vector< VirtualNode > | children |
unsigned | weight |
DirectoryEntry | dirent |
std::string | path |
bool | is_new_nested_catalog |
A VirtualNode is the abstract representation of an entry in a catalog. It is used by the CatalogBalancer to "virtually" represent the file-system tree of a concrete catalog and spot the nodes where a new catalog should be created.
One of its main functions is to keep track of the current weight of a file or directory, i.e., the number of entries it contains. Concretely:
Definition at line 94 of file catalog_balancer.h.
|
inline |
Definition at line 112 of file catalog_balancer.h.
|
inline |
void catalog::CatalogBalancer< CatalogMgrT >::VirtualNode::ExtractChildren | ( | CatalogMgrT * | catalog_mgr | ) |
Extracts not only the direct children of this VirtualNode, but recursively all the VirtualNodes of this catalog. When a VirtualNode that is the root of a nested catalog is created, it won't be expanded. In order to actually expand that node it will be necessary to manually call this method on it.
catalog_mgr | catalog manager that contains the file system tree |
Definition at line 165 of file catalog_balancer_impl.h.
Referenced by catalog::CatalogBalancer< CatalogMgrT >::Balance(), and catalog::CatalogBalancer< CatalogMgrT >::VirtualNode::VirtualNode().
void catalog::CatalogBalancer< CatalogMgrT >::VirtualNode::FixWeight | ( | ) |
This function is called in the father node when one of its children has changed its weight. This phenomenon only occurs when one of its children has become a new autogenerated nested catalog, and its weight is now 1 (which represents the sole DirectoryEntry of that directory). However this is not propagated to the top or the bottom of the tree, but each VirtualNode that represents a directory is responsible for calling it when previous operations might have changed the weight of its children (and consequently its own weight). This function is also called the first time this VirtualNodeit is used to set its weight to the actual value. Initially the weight of any VirtualNode is always 1.
Definition at line 191 of file catalog_balancer_impl.h.
Referenced by catalog::CatalogBalancer< CatalogMgrT >::PartitionOptimally().
|
inline |
Definition at line 125 of file catalog_balancer.h.
Referenced by catalog::CatalogBalancer< CatalogMgrT >::MaxChild(), catalog::CatalogBalancer< CatalogMgrT >::PartitionOptimally(), and catalog::CatalogBalancer< CatalogMgrT >::VirtualNode::VirtualNode().
|
inline |
Definition at line 124 of file catalog_balancer.h.
Referenced by catalog::CatalogBalancer< CatalogMgrT >::MaxChild(), catalog::CatalogBalancer< CatalogMgrT >::PartitionOptimally(), and catalog::CatalogBalancer< CatalogMgrT >::VirtualNode::VirtualNode().
std::vector<VirtualNode> catalog::CatalogBalancer< CatalogMgrT >::VirtualNode::children |
Definition at line 95 of file catalog_balancer.h.
Referenced by catalog::CatalogBalancer< CatalogMgrT >::MaxChild(), and catalog::CatalogBalancer< CatalogMgrT >::PartitionOptimally().
DirectoryEntry catalog::CatalogBalancer< CatalogMgrT >::VirtualNode::dirent |
bool catalog::CatalogBalancer< CatalogMgrT >::VirtualNode::is_new_nested_catalog |
Definition at line 99 of file catalog_balancer.h.
Referenced by catalog::CatalogBalancer< CatalogMgrT >::AddCatalog(), catalog::CatalogBalancer< CatalogMgrT >::VirtualNode::IsCatalog(), and catalog::CatalogBalancer< CatalogMgrT >::MaxChild().
std::string catalog::CatalogBalancer< CatalogMgrT >::VirtualNode::path |
Definition at line 98 of file catalog_balancer.h.
Referenced by spec_builder.SpecPoint::__eq__(), spec_builder.SpecPoint::__gt__(), spec_builder.TracePoint::__gt__(), spec_builder.SpecPoint::__lt__(), spec_builder.TracePoint::__lt__(), spec_builder.SpecPoint::__ne__(), spec_builder.TracePoint::__ne__(), spec_builder.SpecPoint::__str__(), catalog::CatalogBalancer< CatalogMgrT >::AddCatalog(), spec_builder.SpecPoint::isParentOf(), and catalog::CatalogBalancer< CatalogMgrT >::PartitionOptimally().
unsigned catalog::CatalogBalancer< CatalogMgrT >::VirtualNode::weight |
Definition at line 96 of file catalog_balancer.h.
Referenced by catalog::CatalogBalancer< CatalogMgrT >::AddCatalog(), catalog::CatalogBalancer< CatalogMgrT >::MaxChild(), and catalog::CatalogBalancer< CatalogMgrT >::PartitionOptimally().