36 int32_t priority,
String *trace) {
38 std::vector<RangeData> range_data_root;
39 std::vector<RangeData> range_data_metadata;
40 std::vector<RangeData> range_data_system;
41 std::vector<RangeData> range_data_user;
43 for (
size_t i=0; i<range_data.size(); i++) {
44 if (range_data[i].range->is_root())
45 range_data_root.push_back(range_data[i]);
46 else if (range_data[i].data->is_metadata)
47 range_data_metadata.push_back(range_data[i]);
48 else if (range_data[i].data->is_system)
49 range_data_system.push_back(range_data[i]);
51 range_data_user.push_back(range_data[i]);
54 m_uninitialized_ranges_seen =
false;
59 if (!range_data_root.empty())
62 memory_state, priority, trace);
68 if (!range_data_metadata.empty())
71 memory_state, priority, trace);
83 *trace +=
format(
"%d prune threshold\t%lld\n", __LINE__, (
Lld)prune_threshold);
88 if (!range_data_system.empty())
90 memory_state, priority, trace);
96 if (!range_data_user.empty())
98 memory_state, priority, trace);
100 if (m_uninitialized_ranges_seen ==
false)
101 m_initialization_complete =
true;
110 int64_t available = memory_state.
limit - memory_state.
balance;
113 if (block_cache_available < available) {
114 HT_INFOF(
"Increasing block cache limit by %lld",
115 (
Lld)available - block_cache_available);
133 int32_t &priority,
String *trace) {
136 schedule_initialization_operations(range_data, priority);
139 schedule_inprogress_operations(range_data, memory_state, priority, trace);
142 schedule_splits_and_relinquishes(range_data, memory_state, priority, trace);
145 schedule_necessary_compactions(range_data, log, prune_threshold,
146 memory_state, priority, trace);
POD-style structure to hold statistics.
uint32_t scan_count
Scan count.
std::string String
A String is simply a typedef to std::string.
String format(const char *fmt,...)
Returns a String using printf like format facilities Vanilla snprintf is about 1.5x faster than this...
static int64_t log_prune_threshold_max
uint64_t update_bytes
Bytes updated.
static CommitLogPtr root_log
Compatibility Macros for C/C++.
static int64_t log_prune_threshold_min
void increase_limit(int64_t amount)
void assign_priorities(std::vector< RangeData > &range_data, CommitLogPtr &log, int64_t prune_threshold, MemoryState &memory_state, int32_t &priority, String *trace)
long long int Lld
Shortcut for printf formats.
static CommitLogPtr system_log
double update_mbps
Megabytes/s updated.
#define HT_INFOF(msg,...)
std::shared_ptr< CommitLog > CommitLogPtr
Smart pointer to CommitLog.
static CommitLogPtr user_log
static LoadStatisticsPtr load_statistics
virtual void prioritize(std::vector< RangeData > &range_data, MemoryState &memory_state, int32_t prioritize, String *trace)
Declarations for MaintenanceFlag This file contains declarations that are part of the MaintenanceFlag...
String extensions and helpers: sets, maps, append operators etc.
static Hypertable::FileBlockCache * block_cache
static CommitLogPtr metadata_log