CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
swissknife::CommandCheck Class Reference

#include <swissknife_check.h>

Inheritance diagram for swissknife::CommandCheck:
Collaboration diagram for swissknife::CommandCheck:

Public Member Functions

 CommandCheck ()
 
 ~CommandCheck ()
 
virtual std::string GetName () const
 
virtual std::string GetDescription () const
 
virtual ParameterList GetParams () const
 
int Main (const ArgumentList &args)
 
- Public Member Functions inherited from swissknife::Command
 Command ()
 
virtual ~Command ()
 
- Public Member Functions inherited from ServerTool
 ServerTool ()
 
virtual ~ServerTool ()
 
bool InitDownloadManager (const bool follow_redirects, const std::string &proxy, const unsigned max_pool_handles=1)
 
bool InitVerifyingSignatureManager (const std::string &pubkey_path)
 
bool InitSigningSignatureManager (const std::string &certificate_path, const std::string &private_key_path, const std::string &private_key_password)
 
manifest::ManifestOpenLocalManifest (const std::string path) const
 
manifest::Failures FetchRemoteManifestEnsemble (const std::string &repository_url, const std::string &repository_name, manifest::ManifestEnsemble *ensemble) const
 
manifest::ManifestFetchRemoteManifest (const std::string &repository_url, const std::string &repository_name, const shash::Any &base_hash=shash::Any()) const
 
template<class ObjectFetcherT >
manifest::ReflogFetchReflog (ObjectFetcherT *object_fetcher, const std::string &repo_name, const shash::Any &reflog_hash)
 
manifest::ReflogCreateEmptyReflog (const std::string &temp_directory, const std::string &repo_name)
 
download::DownloadManagerdownload_manager () const
 
signature::SignatureManagersignature_manager () const
 
perf::Statisticsstatistics ()
 
const perf::Statisticsstatistics () const
 

Protected Member Functions

bool InspectTree (const std::string &path, const shash::Any &catalog_hash, const uint64_t catalog_size, const bool is_nested_catalog, const catalog::DirectoryEntry *transition_point, catalog::DeltaCounters *computed_counters)
 
catalog::CatalogFetchCatalog (const std::string &path, const shash::Any &catalog_hash, const uint64_t catalog_size=0)
 
bool FindSubtreeRootCatalog (const std::string &subtree_path, shash::Any *root_hash, uint64_t *root_size)
 
std::string DecompressPiece (const shash::Any catalog_hash)
 
std::string DownloadPiece (const shash::Any catalog_hash)
 
std::string FetchPath (const std::string &path)
 
bool InspectReflog (const shash::Any &reflog_hash, manifest::Manifest *manifest)
 
bool InspectHistory (history::History *history)
 
bool Find (const catalog::Catalog *catalog, const PathString &path, catalog::DeltaCounters *computed_counters, std::set< PathString > *bind_mountpoints)
 
bool Exists (const std::string &file)
 
bool CompareCounters (const catalog::Counters &a, const catalog::Counters &b)
 
bool CompareEntries (const catalog::DirectoryEntry &a, const catalog::DirectoryEntry &b, const bool compare_names, const bool is_transition_point=false)
 

Private Attributes

std::string temp_directory_
 
std::string repo_base_path_
 
bool check_chunks_
 
bool no_duplicates_map_
 
bool is_remote_
 
SmallHashDynamic< shash::Any,
char > 
duplicates_map_
 

Additional Inherited Members

- Static Public Attributes inherited from swissknife::Command
static const char kGenericParam = '+'
 
static const char kGenericParamSeparator = ','
 
- Protected Attributes inherited from ServerTool
UniquePtr
< download::DownloadManager
download_manager_
 
UniquePtr
< signature::SignatureManager
signature_manager_
 
perf::Statistics statistics_
 

Detailed Description

Definition at line 31 of file swissknife_check.h.

Constructor & Destructor Documentation

swissknife::CommandCheck::CommandCheck ( )

Definition at line 49 of file swissknife_check.cc.

Here is the call graph for this function:

swissknife::CommandCheck::~CommandCheck ( )
inline

Definition at line 34 of file swissknife_check.h.

Member Function Documentation

bool swissknife::CommandCheck::CompareCounters ( const catalog::Counters a,
const catalog::Counters b 
)
protected

Definition at line 136 of file swissknife_check.cc.

Referenced by InspectTree().

Here is the call graph for this function:

Here is the caller graph for this function:

bool swissknife::CommandCheck::CompareEntries ( const catalog::DirectoryEntry a,
const catalog::DirectoryEntry b,
const bool  compare_names,
const bool  is_transition_point = false 
)
protected

Definition at line 57 of file swissknife_check.cc.

Referenced by Find(), and InspectTree().

Here is the call graph for this function:

Here is the caller graph for this function:

string swissknife::CommandCheck::DecompressPiece ( const shash::Any  catalog_hash)
protected

Definition at line 691 of file swissknife_check.cc.

Referenced by FetchCatalog(), and Main().

Here is the call graph for this function:

Here is the caller graph for this function:

string swissknife::CommandCheck::DownloadPiece ( const shash::Any  catalog_hash)
protected

Definition at line 672 of file swissknife_check.cc.

Referenced by FetchCatalog(), and Main().

Here is the call graph for this function:

Here is the caller graph for this function:

bool swissknife::CommandCheck::Exists ( const std::string &  file)
protected

Checks for existence of a file either locally or via HTTP head

Definition at line 165 of file swissknife_check.cc.

Referenced by Find(), and Main().

Here is the call graph for this function:

Here is the caller graph for this function:

catalog::Catalog * swissknife::CommandCheck::FetchCatalog ( const std::string &  path,
const shash::Any catalog_hash,
const uint64_t  catalog_size = 0 
)
protected

Definition at line 701 of file swissknife_check.cc.

Referenced by FindSubtreeRootCatalog(), and InspectTree().

Here is the call graph for this function:

Here is the caller graph for this function:

string swissknife::CommandCheck::FetchPath ( const std::string &  path)
protected

Copies a file from the repository into a temporary file.

Definition at line 181 of file swissknife_check.cc.

Referenced by InspectReflog().

Here is the call graph for this function:

Here is the caller graph for this function:

bool swissknife::CommandCheck::Find ( const catalog::Catalog catalog,
const PathString path,
catalog::DeltaCounters computed_counters,
std::set< PathString > *  bind_mountpoints 
)
protected

Recursive catalog walk-through

TODO(vavolkl): This method is large and does a lot of checks that could be split into smaller ones.

Definition at line 334 of file swissknife_check.cc.

Referenced by InspectTree().

Here is the call graph for this function:

Here is the caller graph for this function:

bool swissknife::CommandCheck::FindSubtreeRootCatalog ( const std::string &  subtree_path,
shash::Any root_hash,
uint64_t *  root_size 
)
protected

Definition at line 734 of file swissknife_check.cc.

Referenced by Main().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual std::string swissknife::CommandCheck::GetDescription ( ) const
inlinevirtual

Implements swissknife::Command.

Definition at line 36 of file swissknife_check.h.

virtual std::string swissknife::CommandCheck::GetName ( ) const
inlinevirtual

Implements swissknife::Command.

Definition at line 35 of file swissknife_check.h.

virtual ParameterList swissknife::CommandCheck::GetParams ( ) const
inlinevirtual

Implements swissknife::Command.

Definition at line 41 of file swissknife_check.h.

Here is the call graph for this function:

bool swissknife::CommandCheck::InspectHistory ( history::History history)
protected

Verifies the logical consistency of the tag database.

Definition at line 270 of file swissknife_check.cc.

Referenced by Main().

Here is the call graph for this function:

Here is the caller graph for this function:

bool swissknife::CommandCheck::InspectReflog ( const shash::Any reflog_hash,
manifest::Manifest manifest 
)
protected

Verifies reflog checksum and looks for presence of the entry points referenced in the manifest.

Definition at line 211 of file swissknife_check.cc.

Referenced by Main().

Here is the call graph for this function:

Here is the caller graph for this function:

bool swissknife::CommandCheck::InspectTree ( const std::string &  path,
const shash::Any catalog_hash,
const uint64_t  catalog_size,
const bool  is_nested_catalog,
const catalog::DirectoryEntry transition_point,
catalog::DeltaCounters computed_counters 
)
protected

Recursion on nested catalog level. No ownership of computed_counters.

Definition at line 777 of file swissknife_check.cc.

Referenced by Main().

Here is the call graph for this function:

Here is the caller graph for this function:

int swissknife::CommandCheck::Main ( const ArgumentList args)
virtual

Implements swissknife::Command.

Definition at line 933 of file swissknife_check.cc.

Here is the call graph for this function:

Member Data Documentation

bool swissknife::CommandCheck::check_chunks_
private

Definition at line 97 of file swissknife_check.h.

Referenced by Find(), and Main().

SmallHashDynamic<shash::Any, char> swissknife::CommandCheck::duplicates_map_
private

Definition at line 100 of file swissknife_check.h.

Referenced by CommandCheck(), and Find().

bool swissknife::CommandCheck::is_remote_
private

Definition at line 99 of file swissknife_check.h.

Referenced by Exists(), FetchCatalog(), FetchPath(), and Main().

bool swissknife::CommandCheck::no_duplicates_map_
private

Definition at line 98 of file swissknife_check.h.

Referenced by Find(), and Main().

std::string swissknife::CommandCheck::repo_base_path_
private

Definition at line 96 of file swissknife_check.h.

Referenced by DownloadPiece(), Exists(), FetchPath(), and Main().

std::string swissknife::CommandCheck::temp_directory_
private

Definition at line 95 of file swissknife_check.h.

Referenced by DecompressPiece(), DownloadPiece(), FetchPath(), and Main().


The documentation for this class was generated from the following files: