CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
task_register.cc
Go to the documentation of this file.
1 
5 #include "cvmfs_config.h"
6 #include "task_register.h"
7 
8 #include <cassert>
9 
10 #include "util/logging.h"
11 
12 void TaskRegister::Process(FileItem *file_item) {
13  assert(file_item != NULL);
14  assert(!file_item->path().empty());
15  assert(!file_item->has_legacy_bulk_chunk() ||
16  !file_item->bulk_hash().IsNull());
17  assert(file_item->nchunks_in_fly() == 0);
18  assert((file_item->GetNumChunks() > 1) || !file_item->bulk_hash().IsNull());
19  assert(file_item->GetNumChunks() != 1);
20  assert(file_item->hash_suffix() == file_item->bulk_hash().suffix);
21  assert(file_item->bulk_hash().algorithm == file_item->hash_algorithm());
22 
24  "File '%s' processed (bulk hash: %s suffix: %c)",
25  file_item->path().c_str(),
26  file_item->bulk_hash().ToString().c_str(),
27  file_item->hash_suffix());
28 
30 
32  file_item->path(),
33  file_item->bulk_hash(),
34  FileChunkList(*file_item->GetChunksPtr()),
35  file_item->compression_algorithm()));
36 
37  delete file_item;
38 
40 }
bool IsNull() const
Definition: hash.h:383
Tube< FileItem > * tube_ctr_inflight_post_
Definition: task_register.h:37
std::string ToString(const bool with_suffix=false) const
Definition: hash.h:249
shash::Algorithms hash_algorithm()
Definition: item.h:62
Tube< FileItem > * tube_ctr_inflight_pre_
Definition: task_register.h:36
void NotifyListeners(const upload::SpoolerResult &parameter)
assert((mem||(size==0))&&"Out Of Memory")
virtual void Process(FileItem *file_item)
uint64_t GetNumChunks()
Definition: item.h:73
Algorithms algorithm
Definition: hash.h:125
ItemT * PopFront()
Definition: tube.h:123
shash::Any bulk_hash()
Definition: item.h:60
FileChunkList * GetChunksPtr()
Definition: item.h:74
BigVector< FileChunk > FileChunkList
Definition: file_chunk.h:51
uint64_t nchunks_in_fly()
Definition: item.h:71
bool has_legacy_bulk_chunk()
Definition: item.h:65
Definition: item.h:34
shash::Suffix hash_suffix()
Definition: item.h:63
std::string path()
Definition: item.h:57
zlib::Algorithms compression_algorithm()
Definition: item.h:61
const int kLogVerboseMsg
Suffix suffix
Definition: hash.h:126
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)
Definition: logging.cc:528