| libfoedus-core
    FOEDUS Core Library | 
Base class for LogMapper and LogReducer to share common code. More...
Base class for LogMapper and LogReducer to share common code.
The shared parts are:
Definition at line 51 of file mapreduce_base_impl.hpp.
#include <mapreduce_base_impl.hpp>


| Public Member Functions | |
| MapReduceBase (Engine *engine, uint16_t id) | |
| MapReduceBase ()=delete | |
| MapReduceBase (const MapReduceBase &other)=delete | |
| MapReduceBase & | operator= (const MapReduceBase &other)=delete | 
| LogGleanerRef * | get_parent () | 
| uint16_t | get_id () const | 
| uint16_t | get_numa_node () const | 
| virtual std::string | to_string () const =0 | 
| Expects "LogReducer-x", "LogMapper-y" etc.  More... | |
| void | launch_thread () | 
| Start executing.  More... | |
| void | join_thread () | 
|  Public Member Functions inherited from foedus::DefaultInitializable | |
| DefaultInitializable () | |
| virtual | ~DefaultInitializable () | 
| DefaultInitializable (const DefaultInitializable &)=delete | |
| DefaultInitializable & | operator= (const DefaultInitializable &)=delete | 
| ErrorStack | initialize () override final | 
| Typical implementation of Initializable::initialize() that provides initialize-once semantics.  More... | |
| ErrorStack | uninitialize () override final | 
| Typical implementation of Initializable::uninitialize() that provides uninitialize-once semantics.  More... | |
| bool | is_initialized () const override final | 
| Returns whether the object has been already initialized or not.  More... | |
| virtual ErrorStack | initialize_once ()=0 | 
| virtual ErrorStack | uninitialize_once ()=0 | 
|  Public Member Functions inherited from foedus::Initializable | |
| virtual | ~Initializable () | 
| Protected Member Functions | |
| virtual ErrorStack | handle_process ()=0 | 
| Implements the specific logics in derived class.  More... | |
| ErrorCode | check_cancelled () const | 
| Derived class's handle_process() should occasionally call this to exit if it's cancelled.  More... | |
| Protected Attributes | |
| Engine *const | engine_ | 
| LogGleanerRef | parent_ | 
| const uint16_t | id_ | 
| Unique ID of this mapper or reducer.  More... | |
| const uint16_t | numa_node_ | 
| std::atomic< bool > | running_ | 
| only for sanity check  More... | |
| std::thread | thread_ | 
| foedus::snapshot::MapReduceBase::MapReduceBase | ( | Engine * | engine, | 
| uint16_t | id | ||
| ) | 
Definition at line 37 of file mapreduce_base_impl.cpp.
| 
 | delete | 
| 
 | delete | 
| 
 | protected | 
Derived class's handle_process() should occasionally call this to exit if it's cancelled.
Definition at line 54 of file mapreduce_base_impl.cpp.
References foedus::snapshot::LogGleanerRef::is_error(), foedus::kErrorCodeOk, foedus::kErrorCodeSnapshotCancelled, and parent_.
Referenced by foedus::snapshot::LogMapper::handle_process(), and foedus::snapshot::LogReducer::handle_process().


| 
 | inline | 
Definition at line 60 of file mapreduce_base_impl.hpp.
References id_.
Referenced by foedus::snapshot::operator<<().

| 
 | inline | 
Definition at line 61 of file mapreduce_base_impl.hpp.
References numa_node_.
Referenced by foedus::snapshot::LogReducer::initialize_once(), and foedus::snapshot::operator<<().

| 
 | inline | 
| 
 | protectedpure virtual | 
Implements the specific logics in derived class.
Implemented in foedus::snapshot::LogReducer, and foedus::snapshot::LogMapper.
| void foedus::snapshot::MapReduceBase::join_thread | ( | ) | 
Definition at line 45 of file mapreduce_base_impl.cpp.
References thread_, and to_string().
Referenced by foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_child().


| void foedus::snapshot::MapReduceBase::launch_thread | ( | ) | 
Start executing.
Definition at line 40 of file mapreduce_base_impl.cpp.
References thread_, and to_string().
Referenced by foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_child().


| 
 | delete | 
| 
 | pure virtual | 
Expects "LogReducer-x", "LogMapper-y" etc.
Used only for logging/debugging.
Implemented in foedus::snapshot::LogReducer, and foedus::snapshot::LogMapper.
Referenced by join_thread(), and launch_thread().

| 
 | protected | 
Definition at line 71 of file mapreduce_base_impl.hpp.
Referenced by foedus::snapshot::LogMapper::handle_process(), foedus::snapshot::LogMapper::initialize_once(), foedus::snapshot::LogReducer::initialize_once(), and foedus::snapshot::LogReducer::LogReducer().
| 
 | protected | 
Unique ID of this mapper or reducer.
Definition at line 74 of file mapreduce_base_impl.hpp.
Referenced by get_id(), foedus::snapshot::LogMapper::handle_process(), foedus::snapshot::operator<<(), foedus::snapshot::LogMapper::to_string(), and foedus::snapshot::LogReducer::to_string().
| 
 | protected | 
Definition at line 75 of file mapreduce_base_impl.hpp.
Referenced by get_numa_node(), foedus::snapshot::LogMapper::handle_process(), foedus::snapshot::LogMapper::initialize_once(), foedus::snapshot::LogReducer::initialize_once(), foedus::snapshot::LogReducer::LogReducer(), and foedus::snapshot::operator<<().
| 
 | protected | 
Definition at line 72 of file mapreduce_base_impl.hpp.
Referenced by check_cancelled(), get_parent(), foedus::snapshot::LogMapper::handle_process(), and foedus::snapshot::LogReducer::handle_process().
| 
 | protected | 
only for sanity check
Definition at line 77 of file mapreduce_base_impl.hpp.
| 
 | protected | 
Definition at line 79 of file mapreduce_base_impl.hpp.
Referenced by join_thread(), and launch_thread().