libfoedus-core
FOEDUS Core Library
|
Shared data for LogGleaner. More...
Shared data for LogGleaner.
Definition at line 45 of file snapshot_manager_pimpl.hpp.
#include <snapshot_manager_pimpl.hpp>
Public Member Functions | |
LogGleanerControlBlock ()=delete | |
~LogGleanerControlBlock ()=delete | |
void | initialize () |
void | uninitialize () |
void | clear_counts () |
bool | is_error () const |
If this returns true, all mappers and reducers should exit as soon as possible. More... | |
Public Attributes | |
std::atomic< bool > | gleaning_ |
Whether the log gleaner is now running. More... | |
std::atomic< bool > | cancelled_ |
Whether the log gleaner has been cancalled. More... | |
std::atomic< bool > | terminating_ |
Whether the engine is being terminated. More... | |
Snapshot | cur_snapshot_ |
The snapshot we are now taking. More... | |
std::atomic< uint16_t > | completed_count_ |
count of mappers/reducers that have completed processing the current epoch. More... | |
std::atomic< uint16_t > | completed_mapper_count_ |
We also have a separate count for mappers only to know if all mappers are done. More... | |
std::atomic< uint16_t > | error_count_ |
count of mappers/reducers that have exitted with some error. More... | |
std::atomic< uint16_t > | exit_count_ |
count of mappers/reducers that have exitted. More... | |
uint16_t | mappers_count_ |
Total number of mappers. More... | |
uint16_t | reducers_count_ |
Total number of mappers. More... | |
uint16_t | all_count_ |
mappers_count_ + reducers_count_. More... | |
|
delete |
|
delete |
|
inline |
Definition at line 59 of file snapshot_manager_pimpl.hpp.
References cancelled_, foedus::snapshot::Snapshot::clear(), completed_count_, completed_mapper_count_, cur_snapshot_, error_count_, exit_count_, and gleaning_.
Referenced by initialize().
|
inline |
Definition at line 50 of file snapshot_manager_pimpl.hpp.
References all_count_, clear_counts(), mappers_count_, reducers_count_, and terminating_.
Referenced by foedus::snapshot::SnapshotManagerControlBlock::initialize().
|
inline |
If this returns true, all mappers and reducers should exit as soon as possible.
Gleaner 'does its best' to wait for the exit of them, and then exit asap, too.
Definition at line 73 of file snapshot_manager_pimpl.hpp.
References cancelled_, error_count_, and terminating_.
|
inline |
Definition at line 57 of file snapshot_manager_pimpl.hpp.
Referenced by foedus::snapshot::SnapshotManagerControlBlock::uninitialize().
uint16_t foedus::snapshot::LogGleanerControlBlock::all_count_ |
mappers_count_ + reducers_count_.
Not a mutable information, just for convenience.
Definition at line 116 of file snapshot_manager_pimpl.hpp.
Referenced by initialize(), and foedus::snapshot::SnapshotManagerPimpl::initialize_once().
std::atomic<bool> foedus::snapshot::LogGleanerControlBlock::cancelled_ |
Whether the log gleaner has been cancalled.
Definition at line 78 of file snapshot_manager_pimpl.hpp.
Referenced by clear_counts(), is_error(), and foedus::snapshot::SnapshotManagerPimpl::stop_snapshot_thread().
std::atomic<uint16_t> foedus::snapshot::LogGleanerControlBlock::completed_count_ |
count of mappers/reducers that have completed processing the current epoch.
the gleaner thread is woken up when this becomes mappers_.size() + reducers_.size(). the gleaner thread sets this to zero and starts next epoch.
Definition at line 90 of file snapshot_manager_pimpl.hpp.
Referenced by clear_counts(), and foedus::snapshot::operator<<().
std::atomic<uint16_t> foedus::snapshot::LogGleanerControlBlock::completed_mapper_count_ |
We also have a separate count for mappers only to know if all mappers are done.
Reducers can go into sleep only after all mappers went into sleep (otherwise reducers might receive more logs!), so they have to also check this.
Definition at line 97 of file snapshot_manager_pimpl.hpp.
Referenced by clear_counts(), and foedus::snapshot::operator<<().
Snapshot foedus::snapshot::LogGleanerControlBlock::cur_snapshot_ |
The snapshot we are now taking.
Definition at line 83 of file snapshot_manager_pimpl.hpp.
Referenced by clear_counts(), foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_child(), and foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_triggered().
std::atomic<uint16_t> foedus::snapshot::LogGleanerControlBlock::error_count_ |
count of mappers/reducers that have exitted with some error.
if there happens any error, gleaner cancels all mappers/reducers.
Definition at line 103 of file snapshot_manager_pimpl.hpp.
Referenced by clear_counts(), is_error(), and foedus::snapshot::operator<<().
std::atomic<uint16_t> foedus::snapshot::LogGleanerControlBlock::exit_count_ |
count of mappers/reducers that have exitted.
for sanity check only.
Definition at line 109 of file snapshot_manager_pimpl.hpp.
Referenced by clear_counts(), and foedus::snapshot::operator<<().
std::atomic<bool> foedus::snapshot::LogGleanerControlBlock::gleaning_ |
Whether the log gleaner is now running.
Definition at line 76 of file snapshot_manager_pimpl.hpp.
Referenced by clear_counts(), and foedus::snapshot::SnapshotManagerPimpl::is_gleaning().
uint16_t foedus::snapshot::LogGleanerControlBlock::mappers_count_ |
Total number of mappers.
Not a mutable information, just for convenience.
Definition at line 112 of file snapshot_manager_pimpl.hpp.
Referenced by initialize(), and foedus::snapshot::SnapshotManagerPimpl::initialize_once().
uint16_t foedus::snapshot::LogGleanerControlBlock::reducers_count_ |
Total number of mappers.
Not a mutable information, just for convenience.
Definition at line 114 of file snapshot_manager_pimpl.hpp.
Referenced by initialize(), and foedus::snapshot::SnapshotManagerPimpl::initialize_once().
std::atomic<bool> foedus::snapshot::LogGleanerControlBlock::terminating_ |
Whether the engine is being terminated.
Definition at line 80 of file snapshot_manager_pimpl.hpp.
Referenced by initialize(), is_error(), and foedus::snapshot::SnapshotManagerPimpl::stop_snapshot_thread().