CernVM-FS  2.9.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 "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  file_item->path(),
31  file_item->bulk_hash(),
32  FileChunkList(*file_item->GetChunksPtr()),
33  file_item->compression_algorithm()));
34 
35  delete file_item;
37 }
#define LogCvmfs(source, mask,...)
Definition: logging.h:20
bool IsNull() const
Definition: hash.h:379
std::string ToString(const bool with_suffix=false) const
Definition: hash.h:245
shash::Algorithms hash_algorithm()
Definition: item.h:62
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:123
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
Tube< FileItem > * tube_counter_
Definition: task_register.h:34
zlib::Algorithms compression_algorithm()
Definition: item.h:61
const int kLogVerboseMsg
Suffix suffix
Definition: hash.h:124