CernVM-FS
2.12.0
|
#include <catalog_mgr_ro.h>
Public Member Functions | |
SimpleCatalogManager (const shash::Any &base_hash, const std::string &stratum0, const std::string &dir_temp, download::DownloadManager *download_manager, perf::Statistics *statistics, const bool manage_catalog_files=false, const std::string &dir_cache="", const bool copy_to_tmp_dir=false) | |
Public Member Functions inherited from catalog::AbstractCatalogManager< Catalog > | |
AbstractCatalogManager (perf::Statistics *statistics) | |
virtual | ~AbstractCatalogManager () |
void | SetInodeAnnotation (InodeAnnotation *new_annotation) |
virtual bool | Init () |
LoadReturn | RemountDryrun () |
LoadReturn | Remount () |
LoadReturn | ChangeRoot (const shash::Any &root_hash) |
void | DetachNested () |
bool | LookupPath (const PathString &path, const LookupOptions options, DirectoryEntry *entry) |
bool | LookupPath (const std::string &path, const LookupOptions options, DirectoryEntry *entry) |
bool | LookupXattrs (const PathString &path, XattrList *xattrs) |
bool | LookupNested (const PathString &path, PathString *mountpoint, shash::Any *hash, uint64_t *size) |
bool | ListCatalogSkein (const PathString &path, std::vector< PathString > *result_list) |
bool | Listing (const PathString &path, DirectoryEntryList *listing, const bool expand_symlink) |
bool | Listing (const PathString &path, DirectoryEntryList *listing) |
bool | Listing (const std::string &path, DirectoryEntryList *listing) |
bool | ListingStat (const PathString &path, StatEntryList *listing) |
bool | ListFileChunks (const PathString &path, const shash::Algorithms interpret_hashes_as, FileChunkList *chunks) |
void | SetOwnerMaps (const OwnerMap &uid_map, const OwnerMap &gid_map) |
void | SetCatalogWatermark (unsigned limit) |
shash::Any | GetNestedCatalogHash (const PathString &mountpoint) |
Statistics | statistics () const |
uint64_t | inode_gauge () |
bool | volatile_flag () const |
uint64_t | GetRevision () const |
uint64_t | GetTimestamp () const |
uint64_t | GetTTL () const |
bool | HasExplicitTTL () const |
bool | GetVOMSAuthz (std::string *authz) const |
int | GetNumCatalogs () const |
std::string | PrintHierarchy () const |
std::string | PrintAllMemStatistics () const |
inode_t | GetRootInode () const |
Catalog * | GetRootCatalog () const |
inode_t | MangleInode (const inode_t inode) const |
catalog::Counters | LookupCounters (const PathString &path, std::string *subcatalog_path, shash::Any *hash) |
Protected Member Functions | |
virtual LoadReturn | GetNewRootCatalogContext (CatalogContext *result) |
virtual LoadReturn | LoadCatalogByHash (CatalogContext *ctlg_context) |
virtual Catalog * | CreateCatalog (const PathString &mountpoint, const shash::Any &catalog_hash, Catalog *parent_catalog) |
const shash::Any & | base_hash () const |
void | set_base_hash (const shash::Any &hash) |
const std::string & | dir_temp () const |
std::string | MakeRelativePath (const std::string &relative_path) const |
bool | UseLocalCache () const |
Protected Member Functions inherited from catalog::AbstractCatalogManager< Catalog > | |
virtual void | UnloadCatalog (const Catalog *catalog) |
virtual void | ActivateCatalog (Catalog *catalog) |
const std::vector< Catalog * > & | GetCatalogs () const |
virtual void | StageNestedCatalogByHash (const shash::Any &, const PathString &) |
void | StageNestedCatalogAndUnlock (const PathString &path, const Catalog *parent, bool is_listable) |
Catalog * | MountCatalog (const PathString &mountpoint, const shash::Any &hash, Catalog *parent_catalog) |
bool | MountSubtree (const PathString &path, const Catalog *entry_point, bool can_listing, Catalog **leaf_catalog) |
Catalog * | LoadFreeCatalog (const PathString &mountpoint, const shash::Any &hash) |
bool | AttachCatalog (const std::string &db_path, Catalog *new_catalog) |
void | DetachCatalog (Catalog *catalog) |
void | DetachSubtree (Catalog *catalog) |
void | DetachSiblings (const PathString ¤t_tree) |
void | DetachAll () |
bool | IsAttached (const PathString &root_path, Catalog **attached_catalog) const |
Catalog * | FindCatalog (const PathString &path) const |
uint64_t | GetRevisionNoLock () const |
uint64_t | GetTimestampNoLock () const |
void | ReadLock () const |
void | WriteLock () const |
void | Unlock () const |
virtual void | EnforceSqliteMemLimit () |
Protected Member Functions inherited from SingleCopy | |
SingleCopy () | |
Protected Attributes | |
std::string | dir_cache_ |
bool | copy_to_tmp_dir_ |
Private Member Functions | |
std::string | CopyCatalogToTempFile (const std::string &cache_path) |
Private Attributes | |
shash::Any | base_hash_ |
std::string | stratum0_ |
std::string | dir_temp_ |
download::DownloadManager * | download_manager_ |
const bool | manage_catalog_files_ |
Additional Inherited Members | |
Public Types inherited from catalog::AbstractCatalogManager< Catalog > | |
typedef std::vector< Catalog * > | CatalogList |
typedef Catalog | catalog_t |
Static Public Attributes inherited from catalog::AbstractCatalogManager< Catalog > | |
static const inode_t | kInodeOffset |
Definition at line 32 of file catalog_mgr_ro.h.
catalog::SimpleCatalogManager::SimpleCatalogManager | ( | const shash::Any & | base_hash, |
const std::string & | stratum0, | ||
const std::string & | dir_temp, | ||
download::DownloadManager * | download_manager, | ||
perf::Statistics * | statistics, | ||
const bool | manage_catalog_files = false , |
||
const std::string & | dir_cache = "" , |
||
const bool | copy_to_tmp_dir = false |
||
) |
|
inlineprotected |
Definition at line 51 of file catalog_mgr_ro.h.
Referenced by catalog::WritableCatalogManager::FinalizeCatalog().
|
private |
Definition at line 58 of file catalog_mgr_ro.cc.
Referenced by LoadCatalogByHash().
|
protectedvirtual |
Create a new Catalog object. Every derived class has to implement this and return a newly created (derived) Catalog structure of it's desired type.
mountpoint | the future mountpoint of the catalog to create |
catalog_hash | the content hash of the catalog database |
parent_catalog | the parent of the catalog to create |
Implements catalog::AbstractCatalogManager< Catalog >.
Reimplemented in catalog::WritableCatalogManager.
Definition at line 161 of file catalog_mgr_ro.cc.
|
inlineprotected |
Definition at line 53 of file catalog_mgr_ro.h.
Referenced by catalog::WritableCatalogManager::CreateNestedCatalog().
|
protectedvirtual |
Load the catalog and return a file name and the catalog hash.
GetNewRootCatalogContext() populates CatalogContext object with the information needed to retrieve the most recent root catalog independent of its location. The CatalogContext object must be populated with at least hash and mountpoint to call LoadCatalogByHash().
See class description of CatalogContext for more information.
Implements catalog::AbstractCatalogManager< Catalog >.
Definition at line 47 of file catalog_mgr_ro.cc.
|
protectedvirtual |
Loads a catalog via HTTP from Statum 0 into a temporary file. See CatalogContext class description for correct usage
Depending on the initialization of SimpleCatalogManager, it can locally cache catalogs.
Independent of the catalog being downloaded or being already locally cached, for WriteableCatalog it creates a new copy of the catalog in a tmp dir. This is due to write actions having to be transaction-based and therefore cannot work on standard file locations for cvmfs - someone else could try to access them in a non-clean state.
Implements catalog::AbstractCatalogManager< Catalog >.
Definition at line 92 of file catalog_mgr_ro.cc.
|
inlineprotected |
Makes the given path relative to the catalog structure Paths coming out here can be used for lookups in catalogs
relativePath | the path to be mangled |
Definition at line 61 of file catalog_mgr_ro.h.
Referenced by catalog::WritableCatalogManager::AddChunkedFile(), catalog::WritableCatalogManager::AddDirectory(), catalog::WritableCatalogManager::AddFile(), catalog::WritableCatalogManager::AddHardlinkGroup(), catalog::WritableCatalogManager::Clone(), catalog::WritableCatalogManager::CloneTree(), catalog::WritableCatalogManager::CloneTreeImpl(), catalog::WritableCatalogManager::CreateNestedCatalog(), catalog::WritableCatalogManager::GetHostingCatalog(), catalog::WritableCatalogManager::IsTransitionPoint(), catalog::WritableCatalogManager::RemoveDirectory(), catalog::WritableCatalogManager::RemoveFile(), catalog::WritableCatalogManager::RemoveNestedCatalog(), catalog::WritableCatalogManager::ShrinkHardlinkGroup(), catalog::WritableCatalogManager::SwapNestedCatalog(), and catalog::WritableCatalogManager::TouchDirectory().
|
inlineprotected |
Definition at line 52 of file catalog_mgr_ro.h.
Referenced by catalog::WritableCatalogManager::Commit().
|
inlineprotected |
Definition at line 65 of file catalog_mgr_ro.h.
Referenced by catalog::WritableCatalogManager::CatalogUploadCallback(), catalog::WritableCatalogManager::CatalogUploadSerializedCallback(), and LoadCatalogByHash().
|
private |
Definition at line 77 of file catalog_mgr_ro.h.
Referenced by base_hash(), GetNewRootCatalogContext(), and set_base_hash().
|
protected |
Definition at line 69 of file catalog_mgr_ro.h.
Referenced by LoadCatalogByHash(), and SimpleCatalogManager().
|
protected |
Definition at line 67 of file catalog_mgr_ro.h.
Referenced by catalog::WritableCatalogManager::CopyCatalogToLocalCache(), LoadCatalogByHash(), SimpleCatalogManager(), and UseLocalCache().
|
private |
Definition at line 79 of file catalog_mgr_ro.h.
Referenced by CopyCatalogToTempFile(), dir_temp(), and LoadCatalogByHash().
|
private |
Definition at line 80 of file catalog_mgr_ro.h.
Referenced by LoadCatalogByHash().
|
private |
Definition at line 81 of file catalog_mgr_ro.h.
Referenced by CreateCatalog().
|
private |
Definition at line 78 of file catalog_mgr_ro.h.
Referenced by LoadCatalogByHash().