Thrill
0.1
|
Implements BlockSink class writing to files with size limit.
Definition at line 110 of file write_binary.hpp.
Public Member Functions | |
SysFileSink (api::Context &context, size_t local_worker_id, const std::string &path, size_t max_file_size, size_t &stats_total_elements, size_t &stats_total_writes) | |
void | AppendBlock (const data::Block &block, bool is_last_block) |
Appends the (unpinned) Block. More... | |
void | AppendBlock (data::Block &&block, bool is_last_block) |
Appends the (unpinned) Block. More... | |
void | AppendPinnedBlock (data::PinnedBlock &&b, bool) final |
Appends the PinnedBlock. More... | |
void | Close () final |
Closes the sink. Must not be called multiple times. More... | |
Public Member Functions inherited from BoundedBlockSink | |
BoundedBlockSink (BlockPool &block_pool, size_t local_worker_id, size_t max_size) | |
constructor with reference to BlockPool More... | |
PinnedByteBlockPtr | AllocateByteBlock (size_t block_size) final |
size_t | max_size () const |
void | ReleaseByteBlock (ByteBlockPtr &block) final |
Release an unused ByteBlock with n bytes backing memory. More... | |
Public Member Functions inherited from BlockSink | |
BlockSink (BlockPool &block_pool, size_t local_worker_id) | |
constructor with reference to BlockPool More... | |
BlockSink (BlockPool *block_pool, size_t local_worker_id) | |
constructor with reference to BlockPool More... | |
BlockSink (const BlockSink &)=default | |
default copy-constructor More... | |
BlockSink (BlockSink &&)=default | |
move-constructor: default More... | |
virtual | ~BlockSink () |
required virtual destructor More... | |
BlockPool * | block_pool () const |
Returns block_pool_. More... | |
size_t | local_worker_id () const |
local worker id to associate pinned block with More... | |
common::JsonLogger & | logger () |
Returns BlockPool.logger_. More... | |
BlockSink & | operator= (const BlockSink &)=default |
default assignment operator More... | |
BlockSink & | operator= (BlockSink &&)=default |
move-assignment operator: default More... | |
size_t | workers_per_host () const |
return number of workers per host More... | |
Private Attributes | |
size_t & | stats_total_elements_ |
size_t & | stats_total_writes_ |
vfs::WriteStreamPtr | stream_ |
Additional Inherited Members | |
Static Public Attributes inherited from BoundedBlockSink | |
static constexpr bool | allocate_can_fail_ = true |
Static Public Attributes inherited from BlockSink | |
static constexpr bool | allocate_can_fail_ = false |
Protected Attributes inherited from BlockSink | |
size_t | local_worker_id_ |
local worker id to associate pinned block with More... | |
|
inline |
Definition at line 113 of file write_binary.hpp.
Referenced by WriteBinaryNode< ValueType >::OpenNextFile().
|
inlinevirtual |
Appends the (unpinned) Block.
Implements BlockSink.
Definition at line 131 of file write_binary.hpp.
References WriteBinaryNode< ValueType >::SysFileSink::AppendPinnedBlock(), BlockSink::local_worker_id(), and Block::PinWait().
|
inlinevirtual |
Appends the (unpinned) Block.
Implements BlockSink.
Definition at line 136 of file write_binary.hpp.
References WriteBinaryNode< ValueType >::SysFileSink::AppendPinnedBlock(), and BlockSink::local_worker_id().
|
inlinefinalvirtual |
Appends the PinnedBlock.
Reimplemented from BlockSink.
Definition at line 124 of file write_binary.hpp.
References sLOG, WriteBinaryNode< ValueType >::SysFileSink::stats_total_writes_, and WriteBinaryNode< ValueType >::SysFileSink::stream_.
Referenced by WriteBinaryNode< ValueType >::SysFileSink::AppendBlock().
|
inlinefinalvirtual |
Closes the sink. Must not be called multiple times.
Implements BlockSink.
Definition at line 141 of file write_binary.hpp.
References WriteBinaryNode< ValueType >::SysFileSink::stream_.
|
private |
Definition at line 147 of file write_binary.hpp.
Referenced by WriteBinaryNode< ValueType >::OpenNextFile().
|
private |
Definition at line 148 of file write_binary.hpp.
Referenced by WriteBinaryNode< ValueType >::SysFileSink::AppendPinnedBlock(), and WriteBinaryNode< ValueType >::OpenNextFile().
|
private |
Definition at line 146 of file write_binary.hpp.
Referenced by WriteBinaryNode< ValueType >::SysFileSink::AppendPinnedBlock(), and WriteBinaryNode< ValueType >::SysFileSink::Close().