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

#include <task_chunk.h>

Inheritance diagram for TaskChunk:
Collaboration diagram for TaskChunk:

Classes

struct  ChunkInfo
 

Public Member Functions

 TaskChunk (Tube< BlockItem > *tube_in, TubeGroup< BlockItem > *tubes_out, ItemAllocator *allocator)
 
- Public Member Functions inherited from TubeConsumer< BlockItem >
virtual ~TubeConsumer ()
 

Protected Member Functions

virtual void Process (BlockItem *input_block)
 
- Protected Member Functions inherited from TubeConsumer< BlockItem >
 TubeConsumer (Tube< BlockItem > *tube)
 
virtual void OnTerminate ()
 

Private Types

typedef SmallHashDynamic
< int64_t, ChunkInfo
TagMap
 

Static Private Member Functions

static uint32_t hasher_int64t (const int64_t &value)
 

Private Attributes

TubeGroup< BlockItem > * tubes_out_
 
ItemAllocatorallocator_
 
TagMap tag_map_
 

Static Private Attributes

static atomic_int64 tag_seq_ = 2 << 28
 

Additional Inherited Members

- Protected Attributes inherited from TubeConsumer< BlockItem >
Tube< BlockItem > * tube_
 

Detailed Description

Definition at line 22 of file task_chunk.h.

Member Typedef Documentation

typedef SmallHashDynamic<int64_t, ChunkInfo> TaskChunk::TagMap
private

Maps input block tag (hence: file) to the state information on chunks.

Definition at line 79 of file task_chunk.h.

Constructor & Destructor Documentation

TaskChunk::TaskChunk ( Tube< BlockItem > *  tube_in,
TubeGroup< BlockItem > *  tubes_out,
ItemAllocator allocator 
)
inline

Definition at line 24 of file task_chunk.h.

Here is the call graph for this function:

Member Function Documentation

static uint32_t TaskChunk::hasher_int64t ( const int64_t &  value)
inlinestaticprivate

Definition at line 38 of file task_chunk.h.

Referenced by TaskChunk().

Here is the call graph for this function:

Here is the caller graph for this function:

void TaskChunk::Process ( BlockItem input_block)
protectedvirtual

Consumes the stream of input blocks and produces new output blocks according to cut marks. The output blocks correspond to chunks.

Implements TubeConsumer< BlockItem >.

Definition at line 23 of file task_chunk.cc.

Here is the call graph for this function:

Member Data Documentation

ItemAllocator* TaskChunk::allocator_
private

Definition at line 88 of file task_chunk.h.

Referenced by Process().

TagMap TaskChunk::tag_map_
private

Definition at line 89 of file task_chunk.h.

Referenced by Process(), and TaskChunk().

atomic_int64 TaskChunk::tag_seq_ = 2 << 28
staticprivate

Every new chunk increases the tag sequence counter that is used to annotate BlockItems.

This file is part of the CernVM File System. The tags from the read stage in the pipeline and the tags given in the chunking stage can safely overlap. Nevertheless, debugging might be easier if they don't. So let's start with a high number.

Definition at line 85 of file task_chunk.h.

Referenced by Process().

TubeGroup<BlockItem>* TaskChunk::tubes_out_
private

Definition at line 87 of file task_chunk.h.

Referenced by Process().


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