0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Hypertable::MaintenanceScheduler Class Reference

Schedules range server maintenance. More...

#include <MaintenanceScheduler.h>

Collaboration diagram for Hypertable::MaintenanceScheduler:
Collaboration graph
[legend]

Public Member Functions

 MaintenanceScheduler (MaintenanceQueuePtr &queue, TableInfoMapPtr &live_map)
 Constructor. More...
 
void schedule ()
 Schedules maintenance. More...
 
void include (const TableIdentifier &table)
 Includes a table for maintenance scheduling. More...
 
void exclude (const TableIdentifier &table)
 Excludes a table from maintenance scheduling. More...
 
void set_low_memory_mode (bool on)
 Sets low memory maintenance prioritization. More...
 

Private Member Functions

int get_level (RangeData &rd)
 
bool low_memory_mode ()
 Checks if low memory maintenance prioritization is enabled. More...
 
bool debug_signal_file_exists (std::chrono::steady_clock::time_point now)
 Checks to see if scheduler debug signal file exists. More...
 
void write_debug_output (std::chrono::steady_clock::time_point now, Ranges &ranges, const String &header_str)
 Writes debugging output and removes signal file. More...
 

Private Attributes

std::mutex m_mutex
 Mutex to serialize concurrent access More...
 
std::set< std::string > m_table_blacklist
 Set of table IDs to exclude from maintenance scheduling. More...
 
MaintenanceQueuePtr m_queue
 Maintenance queue. More...
 
TableInfoMapPtr m_live_map
 
MaintenancePrioritizerm_prioritizer
 
MaintenancePrioritizerLogCleanup m_prioritizer_log_cleanup
 
MaintenancePrioritizerLowMemory m_prioritizer_low_memory
 
std::chrono::steady_clock::time_point m_last_low_memory
 
std::chrono::steady_clock::time_point m_last_check
 
int64_t m_query_cache_memory
 
int32_t m_maintenance_interval
 
int32_t m_low_memory_limit_percentage
 
int32_t m_merging_delay
 
int32_t m_merges_per_interval
 
int32_t m_move_compactions_per_interval
 
int32_t m_initialization_per_interval
 
int32_t m_maintenance_queue_worker_count
 
int32_t m_start_offset {}
 
bool m_initialized {}
 
bool m_low_memory_prioritization
 
bool m_low_memory_mode {}
 

Detailed Description

Schedules range server maintenance.

Definition at line 47 of file MaintenanceScheduler.h.

Constructor & Destructor Documentation

MaintenanceScheduler::MaintenanceScheduler ( MaintenanceQueuePtr queue,
TableInfoMapPtr live_map 
)

Constructor.

Definition at line 67 of file MaintenanceScheduler.cc.

Member Function Documentation

bool MaintenanceScheduler::debug_signal_file_exists ( std::chrono::steady_clock::time_point  now)
private

Checks to see if scheduler debug signal file exists.

Returns
true if scheduler debug signal file exists, false otherwise.

Definition at line 505 of file MaintenanceScheduler.cc.

void MaintenanceScheduler::exclude ( const TableIdentifier table)

Excludes a table from maintenance scheduling.

Definition at line 93 of file MaintenanceScheduler.cc.

int MaintenanceScheduler::get_level ( RangeData rd)
private

Definition at line 494 of file MaintenanceScheduler.cc.

void MaintenanceScheduler::include ( const TableIdentifier table)

Includes a table for maintenance scheduling.

Definition at line 104 of file MaintenanceScheduler.cc.

bool Hypertable::MaintenanceScheduler::low_memory_mode ( )
inlineprivate

Checks if low memory maintenance prioritization is enabled.

Returns
true if in low memory mode, false otherwise

Definition at line 84 of file MaintenanceScheduler.h.

void MaintenanceScheduler::schedule ( )

Schedules maintenance.

Update current time to compute "low activity" window

Purge commit log fragments

Definition at line 111 of file MaintenanceScheduler.cc.

void Hypertable::MaintenanceScheduler::set_low_memory_mode ( bool  on)
inline

Sets low memory maintenance prioritization.

Definition at line 64 of file MaintenanceScheduler.h.

void MaintenanceScheduler::write_debug_output ( std::chrono::steady_clock::time_point  now,
Ranges ranges,
const String header_str 
)
private

Writes debugging output and removes signal file.

Parameters
nowCurrent time
rangesSet of ranges for which to output scheduler debugging informantion
header_strBeginning content written to debugging output

Definition at line 514 of file MaintenanceScheduler.cc.

Member Data Documentation

int32_t Hypertable::MaintenanceScheduler::m_initialization_per_interval
private

Definition at line 119 of file MaintenanceScheduler.h.

bool Hypertable::MaintenanceScheduler::m_initialized {}
private

Definition at line 122 of file MaintenanceScheduler.h.

std::chrono::steady_clock::time_point Hypertable::MaintenanceScheduler::m_last_check
private

Definition at line 112 of file MaintenanceScheduler.h.

std::chrono::steady_clock::time_point Hypertable::MaintenanceScheduler::m_last_low_memory
private

Definition at line 111 of file MaintenanceScheduler.h.

TableInfoMapPtr Hypertable::MaintenanceScheduler::m_live_map
private

Definition at line 107 of file MaintenanceScheduler.h.

int32_t Hypertable::MaintenanceScheduler::m_low_memory_limit_percentage
private

Definition at line 115 of file MaintenanceScheduler.h.

bool Hypertable::MaintenanceScheduler::m_low_memory_mode {}
private

Definition at line 124 of file MaintenanceScheduler.h.

bool Hypertable::MaintenanceScheduler::m_low_memory_prioritization
private

Definition at line 123 of file MaintenanceScheduler.h.

int32_t Hypertable::MaintenanceScheduler::m_maintenance_interval
private

Definition at line 114 of file MaintenanceScheduler.h.

int32_t Hypertable::MaintenanceScheduler::m_maintenance_queue_worker_count
private

Definition at line 120 of file MaintenanceScheduler.h.

int32_t Hypertable::MaintenanceScheduler::m_merges_per_interval
private

Definition at line 117 of file MaintenanceScheduler.h.

int32_t Hypertable::MaintenanceScheduler::m_merging_delay
private

Definition at line 116 of file MaintenanceScheduler.h.

int32_t Hypertable::MaintenanceScheduler::m_move_compactions_per_interval
private

Definition at line 118 of file MaintenanceScheduler.h.

std::mutex Hypertable::MaintenanceScheduler::m_mutex
private

Mutex to serialize concurrent access

Definition at line 100 of file MaintenanceScheduler.h.

MaintenancePrioritizer* Hypertable::MaintenanceScheduler::m_prioritizer
private

Definition at line 108 of file MaintenanceScheduler.h.

MaintenancePrioritizerLogCleanup Hypertable::MaintenanceScheduler::m_prioritizer_log_cleanup
private

Definition at line 109 of file MaintenanceScheduler.h.

MaintenancePrioritizerLowMemory Hypertable::MaintenanceScheduler::m_prioritizer_low_memory
private

Definition at line 110 of file MaintenanceScheduler.h.

int64_t Hypertable::MaintenanceScheduler::m_query_cache_memory
private

Definition at line 113 of file MaintenanceScheduler.h.

MaintenanceQueuePtr Hypertable::MaintenanceScheduler::m_queue
private

Maintenance queue.

Definition at line 106 of file MaintenanceScheduler.h.

int32_t Hypertable::MaintenanceScheduler::m_start_offset {}
private

Definition at line 121 of file MaintenanceScheduler.h.

std::set<std::string> Hypertable::MaintenanceScheduler::m_table_blacklist
private

Set of table IDs to exclude from maintenance scheduling.

Definition at line 103 of file MaintenanceScheduler.h.


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