![]() |
CernVM-FS
2.11.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) | |
virtual | ~CatalogMergeTool () |
bool | Run (const Params ¶ms, std::string *new_manifest_path, uint64_t *final_rev) |
![]() | |
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) | |
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) |
![]() | |
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_ |
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 54 of file catalog_merge_tool.h.
|
inline |
Definition at line 71 of file catalog_merge_tool.h.
|
inlinevirtual |
Definition at line 90 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 89 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 100 of file catalog_merge_tool_impl.h.
|
protectedvirtual |
Implements CatalogDiffTool< RoCatalogMgr >.
Definition at line 110 of file catalog_merge_tool_impl.h.
|
protectedvirtual |
Implements CatalogDiffTool< RoCatalogMgr >.
Definition at line 173 of file catalog_merge_tool_impl.h.
|
protectedvirtual |
Implements CatalogDiffTool< RoCatalogMgr >.
Definition at line 146 of file catalog_merge_tool_impl.h.
bool receiver::CatalogMergeTool< RwCatalogMgr, RoCatalogMgr >::Run | ( | const Params & | params, |
std::string * | new_manifest_path, | ||
uint64_t * | final_rev | ||
) |
|
private |
Definition at line 128 of file catalog_merge_tool.h.
|
private |
Definition at line 119 of file catalog_merge_tool.h.
|
private |
Definition at line 116 of file catalog_merge_tool.h.
|
private |
Definition at line 121 of file catalog_merge_tool.h.
|
private |
Definition at line 125 of file catalog_merge_tool.h.
|
private |
Definition at line 123 of file catalog_merge_tool.h.
|
private |
Definition at line 114 of file catalog_merge_tool.h.
|
private |
Definition at line 127 of file catalog_merge_tool.h.
|
private |
Definition at line 117 of file catalog_merge_tool.h.