CernVM-FS
2.12.0
|
#include <catalog_merge_tool.h>
Public Member Functions | |
CatalogMergeTool (RoCatalogMgr *old_catalog_mgr, RoCatalogMgr *new_catalog_mgr, RwCatalogMgr *output_catalog_mgr, const PathString &lease_path, const std::string &temp_dir_prefix, manifest::Manifest *manifest, perf::Statistics *statistics) | |
CatalogMergeTool (RoCatalogMgr *old_catalog_mgr, RoCatalogMgr *new_catalog_mgr, const std::string &repo_path, const PathString &lease_path, const std::string &temp_dir_prefix, download::DownloadManager *download_manager, manifest::Manifest *manifest, perf::Statistics *statistics) | |
CatalogMergeTool (const std::string &repo_path, const shash::Any &old_root_hash, const shash::Any &new_root_hash, const PathString &lease_path, const std::string &temp_dir_prefix, download::DownloadManager *download_manager, manifest::Manifest *manifest, perf::Statistics *statistics, const std::string &cache_dir) | |
virtual | ~CatalogMergeTool () |
bool | Run (const Params ¶ms, std::string *new_manifest_path, shash::Any *new_manifest_hash, uint64_t *final_rev) |
Public Member Functions inherited from CatalogDiffTool< RoCatalogMgr > | |
CatalogDiffTool (RoCatalogMgr *old_catalog_mgr, RoCatalogMgr *new_catalog_mgr) | |
CatalogDiffTool (const std::string &repo_path, const shash::Any &old_root_hash, const shash::Any &new_root_hash, const std::string &temp_dir_prefix, download::DownloadManager *download_manager, const std::string &cache_dir="") | |
virtual | ~CatalogDiffTool () |
bool | Init () |
bool | Run (const PathString &path) |
Protected Member Functions | |
virtual bool | IsIgnoredPath (const PathString &path) |
virtual bool | IsReportablePath (const PathString &path) |
virtual void | ReportAddition (const PathString &path, const catalog::DirectoryEntry &entry, const XattrList &xattrs, const FileChunkList &chunks) |
virtual void | ReportRemoval (const PathString &path, const catalog::DirectoryEntry &entry) |
virtual bool | ReportModification (const PathString &path, const catalog::DirectoryEntry &old_entry, const catalog::DirectoryEntry &new_entry, const XattrList &xattrs, const FileChunkList &chunks) |
Protected Member Functions inherited from CatalogDiffTool< RoCatalogMgr > | |
const catalog::Catalog * | GetOldCatalog () const |
const catalog::Catalog * | GetNewCatalog () const |
RoCatalogMgr * | GetOldCatalogMgr () |
RoCatalogMgr * | GetNewCatalogMgr () |
Private Member Functions | |
bool | CreateNewManifest (std::string *new_manifest_path) |
Private Attributes | |
std::string | repo_path_ |
const std::string | cache_dir_ |
PathString | lease_path_ |
std::string | temp_dir_prefix_ |
download::DownloadManager * | download_manager_ |
manifest::Manifest * | manifest_ |
UniquePtr< RwCatalogMgr > | output_catalog_mgr_ |
const bool | needs_setup_ |
perf::Statistics * | statistics_ |
UniquePtr< perf::FsCounters > | counters_ |
Definition at line 35 of file catalog_merge_tool.h.
|
inline |
Definition at line 37 of file catalog_merge_tool.h.
|
inline |
Definition at line 55 of file catalog_merge_tool.h.
|
inline |
Definition at line 73 of file catalog_merge_tool.h.
|
inlinevirtual |
Definition at line 96 of file catalog_merge_tool.h.
|
private |
|
protectedvirtual |
Check if a path (and, by implication, any subpath) should be ignored and not considered for comparison purposes.
This can be used to avoid unnecessary work by avoiding recursion into paths that will not be of interest (e.g. paths that are neither above nor within the lease path, when using a gateway).
Reimplemented from CatalogDiffTool< RoCatalogMgr >.
Definition at line 90 of file catalog_merge_tool_impl.h.
|
protectedvirtual |
Check if a difference found on a path should be reported via ReportAddition(), ReportRemoval(), or ReportModification().
This can be used to filter out differences that are not of interest (e.g. paths that are not within the lease path, when using a gateway).
Note that an ignored path must necessarily be a non-reportable path, since an ignored path will never even be compared (and so can never be reported upon). However, there do exist paths that are neither ignored nor reportable: when using a gateway, a parent of the lease path is not reportable (since it is not within the lease path) but must not be ignored (since we need to recurse into the parent path in order to reach the lease path).
As a concrete example, with a lease path of /foo/bar:
/foo <- not ignored, not reportable /foo/bar <- not ignored reportable /foo/bar/thing <- not ignored reportable /foo/baz <- ignored (and therefore not reportable)
Reimplemented from CatalogDiffTool< RoCatalogMgr >.
Definition at line 101 of file catalog_merge_tool_impl.h.
|
protectedvirtual |
Implements CatalogDiffTool< RoCatalogMgr >.
Definition at line 111 of file catalog_merge_tool_impl.h.
|
protectedvirtual |
Implements CatalogDiffTool< RoCatalogMgr >.
Definition at line 174 of file catalog_merge_tool_impl.h.
|
protectedvirtual |
Implements CatalogDiffTool< RoCatalogMgr >.
Definition at line 147 of file catalog_merge_tool_impl.h.
bool receiver::CatalogMergeTool< RwCatalogMgr, RoCatalogMgr >::Run | ( | const Params & | params, |
std::string * | new_manifest_path, | ||
shash::Any * | new_manifest_hash, | ||
uint64_t * | final_rev | ||
) |
|
private |
Definition at line 121 of file catalog_merge_tool.h.
|
private |
Definition at line 135 of file catalog_merge_tool.h.
|
private |
Definition at line 126 of file catalog_merge_tool.h.
|
private |
Definition at line 123 of file catalog_merge_tool.h.
|
private |
Definition at line 128 of file catalog_merge_tool.h.
|
private |
Definition at line 132 of file catalog_merge_tool.h.
|
private |
Definition at line 130 of file catalog_merge_tool.h.
|
private |
Definition at line 120 of file catalog_merge_tool.h.
|
private |
Definition at line 134 of file catalog_merge_tool.h.
|
private |
Definition at line 124 of file catalog_merge_tool.h.