#include <swcdb/ranger/RangerEnv.h>
Public Member Functions | |
Rgr () | |
Rgr (const Rgr &)=delete | |
Rgr (Rgr &&)=delete | |
Rgr & | operator= (const Rgr &)=delete |
Rgr & | operator= (Rgr &&)=delete |
~Rgr () noexcept | |
Static Public Member Functions | |
static void | init () |
static void | start () |
static void | shuttingdown () |
static void | wait_if_in_process () |
static SWC_CAN_INLINE DB::RgrData * | rgr_data () noexcept |
static SWC_CAN_INLINE bool | is_not_accepting () noexcept |
static SWC_CAN_INLINE bool | is_shuttingdown () noexcept |
static SWC_CAN_INLINE int64_t | in_process () noexcept |
static SWC_CAN_INLINE void | in_process (int64_t count) noexcept |
static SWC_CAN_INLINE int64_t | in_process_ranges () noexcept |
static SWC_CAN_INLINE void | in_process_ranges (int64_t count) noexcept |
static SWC_CAN_INLINE size_t | scan_reserved_bytes () noexcept |
static SWC_CAN_INLINE void | scan_reserved_bytes_add (uint32_t bytes) noexcept |
static SWC_CAN_INLINE void | scan_reserved_bytes_sub (uint32_t bytes) noexcept |
static SWC_CAN_INLINE Rgr * | get () noexcept |
static SWC_CAN_INLINE Comm::IoContextPtr | maintenance_io () noexcept |
static SWC_CAN_INLINE Comm::IoContextPtr | io () noexcept |
template<typename T_Handler > | |
static SWC_CAN_INLINE void | post (T_Handler &&handler) |
template<typename T_Handler > | |
static SWC_CAN_INLINE void | maintenance_post (T_Handler &&handler) |
template<typename T_Handler > | |
static SWC_CAN_INLINE void | block_loader_post (T_Handler &&handler) |
static SWC_CAN_INLINE System::Resources & | res () noexcept |
static bool | log_compact_possible () noexcept |
static void | log_compact_finished () noexcept |
static bool | compaction_available () noexcept |
static void | compaction_schedule (uint32_t ms) |
static SWC_CAN_INLINE Ranger::Columns * | columns () noexcept |
static SWC_CAN_INLINE client::Query::Update::Handlers::Common * | updater () noexcept |
static SWC_CAN_INLINE Ranger::Metric::Reporting::Ptr & | metrics_track () noexcept |
static void | reset () noexcept |
Private Attributes | |
DB::RgrData | m_rgr_data |
Core::AtomicBool | m_shuttingdown |
Core::AtomicBool | m_not_accepting |
Core::Atomic< int64_t > | m_in_process |
Core::Atomic< int64_t > | m_in_process_ranges |
Core::Atomic< size_t > | m_scan_reserved_bytes |
Static Private Attributes | |
static std::shared_ptr< Rgr > | m_env = nullptr |
Definition at line 33 of file RangerEnv.h.
|
explicit |
Definition at line 222 of file RangerEnv.h.
References _columns, and SWC::Ranger::Columns::release().
Referenced by init().
|
delete |
|
delete |
|
noexcept |
Definition at line 324 of file RangerEnv.h.
References _columns, and _compaction.
|
inlinestatic |
Definition at line 126 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::BlockLoader::run().
|
inlinestaticnoexcept |
Definition at line 144 of file RangerEnv.h.
References m_env.
Referenced by SWC::Comm::Protocol::Rgr::Handler::column_compact(), SWC::Comm::Protocol::Rgr::Handler::column_delete(), SWC::Comm::Protocol::Rgr::Handler::column_update(), SWC::Comm::Protocol::Rgr::Handler::columns_unload(), SWC::Ranger::Callback::ColumnDelete::complete(), SWC::Ranger::Callback::ColumnsUnload::complete(), SWC::Ranger::Range::issue_unload(), SWC::Ranger::Callback::RangeLoad::loaded(), SWC::Comm::Protocol::Rgr::Handler::RangeLoad::operator()(), SWC::Comm::Protocol::Rgr::Handler::RangeLocate::operator()(), SWC::Comm::Protocol::Rgr::Handler::RangeQuerySelect::operator()(), SWC::Comm::Protocol::Rgr::Handler::Report::operator()(), SWC::Comm::Protocol::Rgr::Handler::range_is_loaded(), SWC::Comm::Protocol::Rgr::Handler::range_query_update(), SWC::Comm::Protocol::Rgr::Handler::range_unload(), SWC::Ranger::Compaction::run(), SWC::Ranger::RangeSplit::run(), SWC::Ranger::CompactRange::split(), SWC::Ranger::Column::unload(), and SWC::Ranger::Column::unload_all().
|
staticnoexcept |
Definition at line 380 of file RangerEnv.h.
References m_env.
|
static |
Definition at line 385 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::Column::compact(), SWC::Ranger::Column::schema_update(), and SWC::Ranger::CommitLog::Fragments::try_compact().
|
inlinestaticnoexcept |
Definition at line 98 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::ColumnCfg::block_cells(), SWC::Ranger::ColumnCfg::block_enc(), SWC::Ranger::ColumnCfg::block_size(), SWC::Ranger::ColumnCfg::cellstore_max(), SWC::Ranger::ColumnCfg::cellstore_size(), SWC::Ranger::ColumnCfg::compact_percent(), SWC::Ranger::ColumnCfg::file_replication(), SWC::Ranger::ColumnCfg::log_compact_cointervaling(), SWC::Ranger::ColumnCfg::log_fragment_preload(), SWC::Ranger::ColumnCfg::log_rollout_ratio(), and SWC::Ranger::Range::run_add_queue().
|
inlinestaticnoexcept |
Definition at line 63 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::Column::Column(), SWC::Ranger::Callback::ManageBase::ManageBase(), wait_if_in_process(), SWC::Ranger::Column::~Column(), and SWC::Ranger::Callback::ManageBase::~ManageBase().
|
inlinestaticnoexcept |
Definition at line 68 of file RangerEnv.h.
References m_env.
|
inlinestaticnoexcept |
Definition at line 73 of file RangerEnv.h.
References m_env.
Referenced by SWC::Comm::Protocol::Rgr::Handler::Report::operator()(), SWC::Ranger::Range::Range(), wait_if_in_process(), and SWC::Ranger::Range::~Range().
|
inlinestaticnoexcept |
Definition at line 78 of file RangerEnv.h.
References m_env.
|
inlinestatic |
Definition at line 36 of file RangerEnv.h.
References m_env, Rgr(), and SWC_ASSERT.
Referenced by SWC::Ranger::AppContext::make().
|
inlinestaticnoexcept |
Definition at line 108 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::AppContext::init(), SWC::Ranger::AppContext::make(), SWC::Ranger::AppContext::shutting_down(), and SWC::Ranger::AppContext::stop().
|
inlinestaticnoexcept |
Definition at line 53 of file RangerEnv.h.
References m_env.
Referenced by SWC::Comm::Protocol::Rgr::Handler::assign_id(), SWC::Comm::Protocol::Rgr::Handler::column_update(), SWC::Ranger::Column::internal_create(), SWC::Ranger::Columns::load_range(), SWC::Ranger::Callback::RangeLoad::loaded(), SWC::Ranger::RangeSplit::mngr_create_range(), SWC::Ranger::CompactRange::mngr_create_range(), SWC::Ranger::mngr_remove_range(), SWC::Comm::Protocol::Mngr::Req::RgrMngId::request(), SWC::Ranger::RangeSplit::run(), SWC::Ranger::CompactRange::split(), SWC::Ranger::Range::state_unloading(), and SWC::Ranger::Callback::RangeUnloadInternal::ReqData::valid().
|
inlinestaticnoexcept |
Definition at line 58 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::AppContext::handle(), SWC::Ranger::Column::internal_create(), SWC::Ranger::Columns::load_range(), SWC::Ranger::Callback::RangeLoad::loaded(), SWC::Comm::Protocol::Mngr::Req::RgrMngId::request(), SWC::Ranger::Callback::RangeLocateScan::response(), SWC::Ranger::Callback::RangeQuerySelect::response(), and SWC::Ranger::Range::state_unloading().
|
staticnoexcept |
Definition at line 375 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::CommitLog::Fragments::finish_compact(), and SWC::Ranger::CommitLog::Fragments::try_compact().
|
staticnoexcept |
Definition at line 370 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::CommitLog::Fragments::try_compact().
|
inlinestaticnoexcept |
Definition at line 103 of file RangerEnv.h.
References m_env.
|
inlinestatic |
Definition at line 120 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::CompactRange::apply_new(), SWC::Ranger::Compaction::compact(), SWC::Ranger::CompactRange::process_encode(), SWC::Ranger::CompactRange::process_interval(), SWC::Ranger::CompactRange::request_more(), SWC::Ranger::CompactRange::response(), SWC::Ranger::Compaction::schedule(), and SWC::Ranger::CompactRange::split().
|
inlinestaticnoexcept |
Definition at line 154 of file RangerEnv.h.
References m_env.
|
inlinestatic |
Definition at line 114 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::Range::_run_scan_queue(), SWC::Ranger::Column::add_managing(), SWC::Ranger::Range::MetaRegOnAddReq::callback(), SWC::Ranger::CommitLog::Fragments::commit(), SWC::Ranger::Range::compacting(), SWC::Ranger::Range::compacting_ifnot_applying(), SWC::Ranger::CommitLog::Compact::Group::finalize(), SWC::Ranger::CommitLog::Compact::finished(), SWC::Ranger::AppContext::handle(), SWC::Ranger::Range::internal_take_ownership(), SWC::Ranger::Range::last_rgr_chk(), SWC::Ranger::CellStore::Block::Read::load(), SWC::Ranger::CommitLog::Fragment::load(), SWC::Ranger::CellStore::Block::Read::load_finish(), SWC::Ranger::CellStore::Block::Read::load_open(), SWC::Ranger::CommitLog::Fragment::load_read(), SWC::Ranger::CommitLog::Compact::Group::loaded(), SWC::Ranger::CommitLog::Splitter::loaded(), SWC::Ranger::Block::loader_loaded(), SWC::Ranger::Block::preload(), SWC::Ranger::Query::Select::CheckMeta::response(), SWC::Ranger::Query::Update::CommonMeta::response(), SWC::Ranger::Range::MetaRegOnLoadReq::response(), SWC::Ranger::Range::run_add_queue(), SWC::Ranger::Column::run_mng_queue(), and SWC::Ranger::CommitLog::Fragment::write().
|
inlinestaticnoexcept |
Definition at line 131 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::CommitLog::Fragments::_commit(), SWC::Ranger::CommitLog::Compact::Group::_loaded(), SWC::Ranger::CommitLog::Fragments::_need_roll(), SWC::Ranger::Blocks::_split(), SWC::Ranger::Block::_split(), SWC::Ranger::Compaction::available(), SWC::Ranger::Block::Block(), SWC::Ranger::CommitLog::Fragments::commit(), SWC::Ranger::Compaction::compact(), SWC::Ranger::CommitLog::Compact::Compact(), SWC::Ranger::Compaction::compacted(), SWC::Ranger::CommitLog::Fragment::Fragment(), SWC::Ranger::CellStore::Block::Read::load(), SWC::Ranger::CommitLog::Fragment::load(), SWC::Ranger::Block::load_cells(), SWC::Ranger::CellStore::Block::Read::load_cells(), SWC::Ranger::CommitLog::Fragment::load_cells(), SWC::Ranger::Block::load_final(), SWC::Ranger::CellStore::Block::Read::load_finish(), SWC::Ranger::CommitLog::Fragment::load_finish(), SWC::Ranger::CommitLog::Fragment::mark_removed(), SWC::Comm::Protocol::Rgr::Handler::RangeQuerySelect::operator()(), SWC::Comm::Protocol::Rgr::Handler::Report::operator()(), SWC::Ranger::Block::preload(), SWC::Ranger::Callback::RangeQueryUpdate::RangeQueryUpdate(), SWC::Ranger::CellStore::Block::Read::release(), SWC::Ranger::CommitLog::Fragment::release(), SWC::Ranger::Block::release(), SWC::Ranger::CompactRange::request_more(), SWC::Ranger::Blocks::scan(), SWC::Ranger::CommitLog::Fragments::try_compact(), SWC::Ranger::Columns::unload(), SWC::Ranger::CommitLog::Fragment::write(), SWC::Ranger::Block::~Block(), SWC::Ranger::CommitLog::Fragment::~Fragment(), SWC::Ranger::CommitLog::Fragments::~Fragments(), SWC::Ranger::Callback::RangeQueryUpdate::~RangeQueryUpdate(), and SWC::Ranger::CellStore::Block::Read::~Read().
|
inlinestaticnoexcept |
Definition at line 158 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::AppContext::stop().
|
inlinestaticnoexcept |
Definition at line 48 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::AppContext::handle(), SWC::Comm::Protocol::Mngr::Req::RgrMngId::handle(), SWC::Ranger::AppContext::init(), SWC::Ranger::Range::internal_take_ownership(), SWC::Ranger::Range::last_rgr_chk(), SWC::Ranger::RangeSplit::mngr_create_range(), SWC::Ranger::CompactRange::mngr_create_range(), SWC::Comm::Protocol::Rgr::Handler::Report::operator()(), SWC::Comm::Protocol::Mngr::Req::RgrMngId::request(), and SWC::Ranger::Range::set_rgr().
|
inlinestaticnoexcept |
Definition at line 83 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::Blocks::_split(), SWC::Comm::Protocol::Rgr::Handler::RangeQuerySelect::operator()(), and SWC::Ranger::Blocks::scan().
|
inlinestaticnoexcept |
Definition at line 88 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::ReqScan::ReqScan().
|
inlinestaticnoexcept |
Definition at line 93 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::ReqScan::~ReqScan().
|
static |
Definition at line 334 of file RangerEnv.h.
References m_env, and wait_if_in_process().
Referenced by SWC::Ranger::AppContext::shutting_down().
|
static |
Definition at line 329 of file RangerEnv.h.
References m_env.
Referenced by SWC::Ranger::AppContext::init().
|
inlinestaticnoexcept |
Definition at line 149 of file RangerEnv.h.
References m_env.
|
static |
Definition at line 357 of file RangerEnv.h.
References in_process(), in_process_ranges(), SWC::LOG_WARN, m_env, SWC_FMT_LD, SWC_FMT_LU, and SWC_LOGF.
Referenced by shuttingdown(), and SWC::Ranger::AppContext::stop().
Ranger::Columns* SWC::Env::Rgr::_columns |
Definition at line 183 of file RangerEnv.h.
Ranger::Compaction* SWC::Env::Rgr::_compaction |
Definition at line 182 of file RangerEnv.h.
Referenced by ~Rgr().
Ranger::Metric::Reporting::Ptr SWC::Env::Rgr::_reporting |
Definition at line 185 of file RangerEnv.h.
System::Resources SWC::Env::Rgr::_resources |
Definition at line 186 of file RangerEnv.h.
client::Query::Update::Handlers::Common::Ptr SWC::Env::Rgr::_update_hdlr |
Definition at line 184 of file RangerEnv.h.
Comm::IoContextPtr SWC::Env::Rgr::app_io |
Definition at line 178 of file RangerEnv.h.
const SWC::Config::Property::Value_int32_g::Ptr SWC::Env::Rgr::cfg_blk_cells |
Definition at line 175 of file RangerEnv.h.
Referenced by SWC::Ranger::ColumnCfg::block_cells().
const SWC::Config::Property::Value_enum_g::Ptr SWC::Env::Rgr::cfg_blk_enc |
Definition at line 176 of file RangerEnv.h.
const SWC::Config::Property::Value_int32_g::Ptr SWC::Env::Rgr::cfg_blk_size |
Definition at line 174 of file RangerEnv.h.
Referenced by SWC::Ranger::ColumnCfg::block_size().
const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_compact_percent |
Definition at line 171 of file RangerEnv.h.
Referenced by SWC::Ranger::ColumnCfg::compact_percent().
const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_cs_max |
Definition at line 164 of file RangerEnv.h.
Referenced by SWC::Ranger::ColumnCfg::cellstore_max().
const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_cs_replication |
Definition at line 172 of file RangerEnv.h.
Referenced by SWC::Ranger::ColumnCfg::file_replication().
const SWC::Config::Property::Value_int32_g::Ptr SWC::Env::Rgr::cfg_cs_sz |
Definition at line 165 of file RangerEnv.h.
Referenced by SWC::Ranger::ColumnCfg::cellstore_size().
const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_log_compact_cointervaling |
Definition at line 168 of file RangerEnv.h.
Referenced by SWC::Ranger::ColumnCfg::log_compact_cointervaling().
const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_log_fragment_preload |
Definition at line 169 of file RangerEnv.h.
Referenced by SWC::Ranger::ColumnCfg::log_fragment_preload().
const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_log_rollout_ratio |
Definition at line 167 of file RangerEnv.h.
Referenced by SWC::Ranger::ColumnCfg::log_rollout_ratio().
const SWC::Config::Property::Value_uint8_g::Ptr SWC::Env::Rgr::cfg_req_add_concurrency |
Definition at line 162 of file RangerEnv.h.
Referenced by SWC::Ranger::Range::run_add_queue().
Comm::IoContextPtr SWC::Env::Rgr::loader_io |
Definition at line 179 of file RangerEnv.h.
|
inlinestaticprivate |
Definition at line 198 of file RangerEnv.h.
Referenced by block_loader_post(), columns(), compaction_available(), compaction_schedule(), get(), in_process(), in_process_ranges(), init(), io(), is_not_accepting(), is_shuttingdown(), log_compact_finished(), log_compact_possible(), maintenance_io(), maintenance_post(), metrics_track(), post(), res(), reset(), rgr_data(), scan_reserved_bytes(), scan_reserved_bytes_add(), scan_reserved_bytes_sub(), shuttingdown(), start(), updater(), and wait_if_in_process().
|
private |
Definition at line 203 of file RangerEnv.h.
|
private |
Definition at line 204 of file RangerEnv.h.
|
private |
Definition at line 202 of file RangerEnv.h.
|
private |
Definition at line 200 of file RangerEnv.h.
|
private |
Definition at line 205 of file RangerEnv.h.
|
private |
Definition at line 201 of file RangerEnv.h.
Comm::IoContextPtr SWC::Env::Rgr::mnt_io |
Definition at line 180 of file RangerEnv.h.