52 #include <boost/algorithm/string.hpp>
53 #include <boost/algorithm/string/predicate.hpp>
73 const RangeState &state,
bool needs_compaction)
74 : m_master_client(master_client),
75 m_hints_file(identifier.id, range.start_row, range.end_row),
76 m_schema(schema), m_range_set(range_set),
77 m_load_metrics(identifier.id, range.start_row, range.end_row) {
78 m_metalog_entity = make_shared<MetaLogEntityRange>(identifier, range, state, needs_compaction);
84 : m_master_client(master_client), m_metalog_entity(range_entity),
85 m_hints_file(range_entity->get_table_id(), range_entity->get_start_row(),
86 range_entity->get_end_row()),
87 m_schema(schema), m_range_set(range_set),
88 m_load_metrics(range_entity->get_table_id(), range_entity->get_start_row(),
89 range_entity->get_end_row()) {
105 m_is_root = m_is_metadata && start_row.empty() &&
112 if (soft_limit == 0) {
136 if (split_row.compare(old_boundary_row) < 0)
140 String split_off = Config::get_str(
"Hypertable.RangeServer.Range.SplitOff");
141 if (split_off ==
"high")
156 std::map<String, const AccessGroup::Hints *> hints_map;
159 hints_map[h.ag_name] = &h;
163 for (
auto ag_spec :
m_schema->get_access_groups()) {
165 std::map<String, const AccessGroup::Hints *>::iterator iter = hints_map.find(ag_spec->get_name());
166 if (iter != hints_map.end())
168 ag = make_shared<AccessGroup>(&
m_table,
m_schema, ag_spec, &range_spec, h);
172 for (
auto cf_spec : ag_spec->columns())
198 auto expiration_time = chrono::fast_clock::now() +
199 chrono::milliseconds(timeout_millis);
214 auto now = chrono::fast_clock::now();
215 if (now < expire_time) {
216 this_thread::sleep_for(chrono::milliseconds(10000));
235 key.
row = metadata_key_str.c_str();
236 key.
row_len = metadata_key_str.length();
240 mutator->set(key, (uint8_t *)start_row.c_str(), start_row.length());
245 key.
row = metadata_key_str.c_str();
246 key.
row_len = metadata_key_str.length();
250 mutator->set_delete(key);
256 void delete_metadata_pointer(
Metadata **metadata) {
267 const char *base, *ptr, *end;
268 std::vector<String> csvec;
293 ag->pre_load_cellstores();
301 HT_ERRORF(
"Unrecognized access group name '%s' found in METADATA for "
302 "table '%s'", ag_name.c_str(),
m_table.
id);
306 ag->set_next_csid(nextcsid);
308 ptr = base = (
const char *)files.c_str();
309 end = base + strlen(base);
312 while (*ptr !=
';' && ptr < end)
315 file_str =
String(base, ptr-base);
316 boost::trim(file_str);
318 if (!file_str.empty()) {
319 if (file_str[0] ==
'#') {
325 csvec.push_back(file_str);
335 bool skip_not_found =
Config::properties->get_bool(
"Hypertable.RangeServer.CellStore.SkipNotFound");
336 bool skip_bad =
Config::properties->get_bool(
"Hypertable.RangeServer.CellStore.SkipBad");
338 for (
size_t i=0; i<csvec.size(); i++) {
340 files += csvec[i] +
";\n";
342 HT_INFOF(
"Loading CellStore %s", csvec[i].c_str());
346 start_row.c_str(), end_row.c_str());
353 if (skip_not_found) {
354 HT_WARNF(
"CellStore file '%s' not found, skipping", csvec[i].c_str());
360 HT_WARNF(
"CellStore file '%s' is corrupt, skipping", csvec[i].c_str());
364 HT_FATALF(
"Problem opening CellStore file '%s' - %s", csvec[i].c_str(),
368 int64_t revision = boost::any_cast<int64_t>
369 (cellstore->get_trailer()->get(
"revision"));
373 ag->load_cellstore(cellstore);
380 ag->post_load_cellstores();
390 vector<AccessGroupSpec*> new_access_groups;
392 AccessGroupMap::iterator ag_iter;
393 size_t max_column_family_id = schema->get_max_column_family_id();
396 if(schema->get_generation() <=
m_schema->get_generation())
404 for (
auto ag_spec : schema->get_access_groups()) {
407 ag_iter->second->update_schema(schema, ag_spec);
408 for (
auto cf_spec : ag_spec->columns()) {
409 if (!cf_spec->get_deleted())
414 new_access_groups.push_back(ag_spec);
425 for (
auto ag_spec : new_access_groups) {
426 ag = make_shared<AccessGroup>(&
m_table, schema, ag_spec, &range_spec);
429 for (
auto cf_spec : ag_spec->columns()) {
430 if (!cf_spec->get_deleted())
452 HT_ERRORF(
"Unknown key flag encountered (%d), skipping..", (
int)key.flag);
463 HT_ERRORF(
"Bad column family code encountered (%d) for table %s, skipping...",
464 (
int)key.column_family_code,
m_table.
id);
481 scanner = std::make_shared<MergeScannerRange>(
m_table.
id, scan_ctx);
493 for (
auto & ag : ag_vector) {
494 if (ag->include_in_scan(scan_ctx.get()))
495 scanner->add_scanner(ag->create_scanner(scan_ctx.get()));
506 const String &table_name) {
519 if (table_name !=
".cellstore.index")
525 for (
auto &ag : ag_vector)
526 ag->populate_cellstore_index_pseudo_table_scanner(scanner);
540 int64_t mem, disk, disk_total = 0;
567 int64_t starting_maintenance_generation;
603 for (
size_t i=0; i<ag_vector.size(); i++) {
605 mdata->
agdata = ag_vector[i]->get_maintenance_data(arena, now, flags);
609 (*tailp)->
next = ag_vector[i]->get_maintenance_data(arena, now, flags);
610 tailp = &(*tailp)->
next;
614 mdata->
compression_ratio += (double)(*tailp)->disk_used / (*tailp)->compression_ratio;
673 HT_INFOF(
"Cancelling relinquish because range is not in relinquishable state (%s)",
685 HT_WARNF(
"Aborting relinquish of %s because marked immovable.",
m_name.c_str());
708 HT_INFO(
"Relinquish Complete.");
741 for (
int i=0;
true; i++) {
749 this_thread::sleep_for(chrono::milliseconds(5000));
752 HT_ERRORF(
"Problem updating meta log entry with RELINQUISH_LOG_INSTALLED state for %s",
766 for (
size_t i=0; i<ag_vector.size(); i++)
767 ag_vector[i]->stage_compaction();
787 std::vector<AccessGroup::Hints> hints(ag_vector.size());
788 for (
size_t i=0; i<ag_vector.size(); i++)
801 key.
row = row.c_str();
807 mutator->set(key, 0, 0);
829 lock_guard<mutex> lock2(
m_mutex);
835 HT_INFOF(
"Reporting relinquished range %s to Master",
m_name.c_str());
844 table_frozen, range_spec,
855 std::vector<MetaLog::EntityPtr> entities;
861 make_shared<MetaLog::EntityTaskAcknowledgeRelinquish>(
m_metalog_entity->get_source(),
863 table_frozen, range_spec);
864 entities.push_back(acknowledge_relinquish_task);
869 for (
int i=0;
true; i++) {
877 this_thread::sleep_for(chrono::milliseconds(5000));
916 HT_INFOF(
"Cancelling split because range is not in splittable state (%s)",
922 HT_WARNF(
"Split attempted on range %s, but marked unsplittable",
952 HT_INFOF(
"Split Complete. New Range end_row=%s",
962 std::vector<String> split_rows;
989 for (
const auto &ag : ag_vector)
990 ag->split_row_estimate_data_stored(split_row_data);
993 for (
const auto &ag : ag_vector)
994 ag->split_row_estimate_data_cached(split_row_data);
1000 HT_WARNF(
"Split attempt aborted for range %s because it is marked unsplittable",
1006 "Unable to determine split row for range %s",
1011 if (split_row.compare(end_row) >= 0 || split_row.compare(start_row) <= 0) {
1013 String escaped_start_row, escaped_end_row, escaped_split_row;
1014 for (
auto &entry : split_row_data) {
1015 escaper.
escape(entry.first, strlen(entry.first), escaped_split_row);
1016 HT_ERRORF(
"[split_row_data] %lld %s", (
Lld)entry.second, escaped_split_row.c_str());
1018 escaper.
escape(start_row.c_str(), start_row.length(), escaped_start_row);
1019 escaper.
escape(end_row.c_str(), end_row.length(), escaped_end_row);
1020 escaper.
escape(split_row.c_str(), split_row.length(), escaped_split_row);
1021 HT_FATALF(
"Bad split row estimate (%s) for range %s[%s..%s]",
1022 escaped_split_row.c_str(),
m_table.
id, escaped_start_row.c_str(),
1023 escaped_end_row.c_str());
1026 HT_INFOF(
"Split row estimate for %s is '%s'",
1027 m_name.c_str(), split_row.c_str());
1052 for (
int i=0;
true; i++) {
1060 this_thread::sleep_for(chrono::milliseconds(5000));
1063 HT_ERRORF(
"Problem updating meta log with SPLIT_LOG_INSTALLED state for %s "
1064 "split-point='%s'",
m_name.c_str(), split_row.c_str());
1077 for (
size_t i=0; i<ag_vector.size(); i++)
1078 ag_vector[i]->stage_compaction();
1090 for (CellList::SplitRowDataMapT::iterator iter=split_row_data.begin();
1091 iter != split_row_data.end(); ++iter)
1092 target += iter->second;
1099 int64_t cumulative = 0;
1100 for (CellList::SplitRowDataMapT::iterator iter=split_row_data.begin();
1101 iter != split_row_data.end(); ++iter) {
1102 if (cumulative + iter->second >= target) {
1108 cumulative += iter->second;
1113 if (row.compare(end_row) >= 0) {
1115 for (CellList::SplitRowDataMapT::iterator iter=split_row_data.begin();
1116 iter != split_row_data.end(); ++iter) {
1117 if (strcmp(iter->first, end_row.c_str()) < 0)
1122 return !row.empty();
1146 std::vector<AccessGroup::Hints> hints(ag_vector.size());
1151 for (
size_t i=0; i<ag_vector.size(); i++)
1156 new_hints_file.
set(hints);
1159 String metadata_row_low, metadata_row_high;
1160 int64_t total_blocks;
1170 key_high.
row = metadata_row_high.c_str();
1171 key_high.
row_len = metadata_row_high.length();
1175 mutator->set(key_high, (uint8_t *)split_row.c_str(), split_row.length());
1180 for (
size_t i=0; i<ag_vector.size(); i++) {
1183 ag_vector[i]->get_file_data(files, &total_blocks,
false);
1185 mutator->set(key_high, (uint8_t *)files.c_str(), files.length());
1192 key_low.
row = metadata_row_low.c_str();
1193 key_low.
row_len = metadata_row_low.length();
1198 mutator->set(key_low, start_row.c_str(), start_row.length());
1200 for (
size_t i=0; i<ag_vector.size(); i++) {
1205 sprintf(buf,
"%llu", (
Llu)total_blocks/2);
1206 mutator->set(key_low, (uint8_t *)buf, strlen(buf));
1207 mutator->set(key_high, (uint8_t *)buf, strlen(buf));
1210 mutator->set(key_low, (uint8_t *)files.c_str(), files.length());
1217 mutator->set(key_low, location.c_str(), location.length());
1241 end_row = split_row;
1247 start_row = split_row;
1253 for (
size_t i=0; i<ag_vector.size(); i++)
1259 HT_ERRORF(
"Problem closing split log '%s' - %s",
1273 for (
size_t i=0; i<new_hints_file.
get().size(); i++) {
1274 if (hints[i].disk_usage > new_hints_file.
get()[i].disk_usage) {
1276 HT_ERRORF(
"hints[%d].disk_usage (%llu) > new_hints_file.get()[%d].disk_usage (%llu)",
1277 (
int)i, (
Llu)hints[i].disk_usage, (
int)i, (
Llu)new_hints_file.
get()[i].disk_usage);
1278 HT_ERRORF(
"%s", ag_vector[i]->describe().c_str());
1279 HT_ASSERT(hints[i].disk_usage <= new_hints_file.
get()[i].disk_usage);
1281 new_hints_file.
get()[i].disk_usage -= hints[i].disk_usage;
1283 new_hints_file.
write(
"");
1289 char md5DigestStr[33];
1290 String table_dir, range_dir;
1293 md5DigestStr[16] = 0;
1298 for (
auto ag_spec :
m_schema->get_access_groups()) {
1300 range_dir = table_dir +
"/" + ag_spec->get_name() +
"/" + md5DigestStr;
1314 for (
int i=0;
true; i++) {
1322 this_thread::sleep_for(chrono::milliseconds(5000));
1325 HT_ERRORF(
"Problem updating meta log entry with SPLIT_SHRUNK state %s "
1326 "split-point='%s'",
m_name.c_str(), split_row.c_str());
1365 HT_INFOF(
"Reporting newly split off range %s[%s..%s] to Master",
1376 table_frozen, range,
1389 std::vector<MetaLog::EntityPtr> entities;
1395 acknowledge_relinquish_task =
1396 make_shared<MetaLog::EntityTaskAcknowledgeRelinquish>(
m_metalog_entity->get_source(),
1398 table_frozen, range);
1399 entities.push_back(acknowledge_relinquish_task);
1407 for (
int i=0;
true; i++) {
1415 this_thread::sleep_for(chrono::milliseconds(5000));
1418 HT_ERRORF(
"Problem updating meta log with STEADY state for %s",
1446 HT_INFOF(
"Cancelling compact because range is not in compactable state (%s)",
1462 for (
size_t i=0; i<ag_vector.size(); i++) {
1465 ag_vector[i]->stage_compaction();
1470 bool successfully_compacted =
false;
1471 std::vector<AccessGroup::Hints> hints(ag_vector.size());
1472 for (
size_t i=0; i<ag_vector.size(); i++) {
1477 flags = subtask_map.
flags(ag_vector[i].
get());
1481 ag_vector[i]->run_compaction(flags, &hints[i]);
1482 successfully_compacted =
true;
1485 ag_vector[i]->unstage_compaction();
1486 ag_vector[i]->load_hints(&hints[i]);
1490 ag_vector[i]->load_hints(&hints[i]);
1492 if (successfully_compacted) {
1531 uint64_t memory_purged = 0;
1538 HT_INFOF(
"Cancelling memory purge because range is not in purgeable state (%s)",
1549 for (
size_t i=0; i<ag_vector.size(); i++) {
1551 memory_purged += ag_vector[i]->purge_memory(subtask_map);
1565 HT_INFOF(
"Memory Purge complete for range %s. Purged %llu bytes of memory",
1578 == RangeState::SPLIT_LOG_INSTALLED ||
1580 == RangeState::RELINQUISH_LOG_INSTALLED) {
1586 commit_log_reader = 0;
1596 if ((state & RangeState::SPLIT_LOG_INSTALLED)
1597 == RangeState::SPLIT_LOG_INSTALLED) {
1599 HT_INFOF(
"Restored range state to SPLIT_LOG_INSTALLED (split point='%s' "
1600 "xfer log='%s')",
m_split_row.c_str(), transfer_log.c_str());
1603 HT_INFOF(
"Restored range state to RELINQUISH_LOG_INSTALLED (xfer "
1604 "log='%s')", transfer_log.c_str());
1643 const uint8_t *base, *ptr, *end;
1655 while (commit_log_reader->
next(&base, &len, &header)) {
1660 table_id.
decode(&ptr, &len);
1664 "Table name mis-match in split log replay \"%s\" != \"%s\"",
1668 key.
ptr = (uint8_t *)ptr;
1669 key_comps.
load(key);
1671 value.
ptr = (uint8_t *)ptr;
1673 add(key_comps, value);
1682 HT_INFOF(
"Replayed %d updates (%d blocks) from transfer log '%s' into %s",
1683 (
int)count, (
int)nblocks, commit_log_reader->
get_log_dir().c_str(),
1733 os <<
"table_id=" << mdata.
table_id <<
"\n";
1745 os <<
"soft_limit=" << mdata.
soft_limit <<
"\n";
1747 os <<
"priority=" << mdata.
priority <<
"\n";
1748 os <<
"state=" << mdata.
state <<
"\n";
1750 os <<
"file_count=" << mdata.
file_count <<
"\n";
1751 os <<
"cell_count=" << mdata.
cell_count <<
"\n";
1752 os <<
"memory_used=" << mdata.
memory_used <<
"\n";
1754 os <<
"key_bytes=" << mdata.
key_bytes <<
"\n";
1755 os <<
"value_bytes=" << mdata.
value_bytes <<
"\n";
1757 os <<
"disk_used=" << mdata.
disk_used <<
"\n";
1765 os <<
"busy=" << (mdata.
busy ?
"true" :
"false") <<
"\n";
1766 os <<
"is_metadata=" << (mdata.
is_metadata ?
"true" :
"false") <<
"\n";
1767 os <<
"is_system=" << (mdata.
is_system ?
"true" :
"false") <<
"\n";
1768 os <<
"relinquish=" << (mdata.
relinquish ?
"true" :
"false") <<
"\n";
1770 os <<
"needs_split=" << (mdata.
needs_split ?
"true" :
"false") <<
"\n";
1771 os <<
"load_acknowledged=" << (mdata.
load_acknowledged ?
"true" :
"false") <<
"\n";
1772 os <<
"unsplittable=" << (mdata.
unsplittable ?
"true" :
"false") <<
"\n";
static LocationInitializerPtr location_initializer
void change_end_row(const String &end_row)
Changes the end row.
uint32_t bloom_filter_fps
AccessGroupMap m_access_group_map
Reads and writes access group "hints" file.
virtual void change_end_row(const String &start_row, const String &old_end_row, const String &new_end_row)=0
Changes the end row key associated with a range.
Cell list scanner over a buffer of cells.
#define HT_WARNF(msg,...)
Declarations for CellStoreFactory.
The FailureInducer simulates errors.
MetaLogEntityRangePtr m_metalog_entity
int64_t m_latest_revision
uint32_t bloom_filter_accesses
uint64_t block_index_memory
static TablePtr metadata_table
AccessGroupHintsFile m_hints_file
PropertiesPtr properties
This singleton map stores all options.
static const uint32_t FLAG_DELETE_ROW
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...
chrono::time_point< fast_clock > time_point
void split_install_log_rollback_metadata()
static const uint32_t FLAG_INSERT
std::vector< AccessGroupPtr > AccessGroupVector
Declarations for CommitLogReader.
void change_rows(const String &start_row, const String &end_row)
virtual void change_start_row(const String &old_start_row, const String &new_start_row, const String &new_end_row)=0
Changes the start row key associated with a range.
bool estimate_split_row(CellList::SplitRowDataMapT &split_row_data, String &row)
long long unsigned int Llu
Shortcut for printf formats.
const char * column_qualifier
string & name()
Returns pathname of transfer log.
void deferred_initialization()
void split_compact_and_shrink()
MaintenanceData * get_maintenance_data(ByteArena &arena, time_t now, int flags, TableMutator *mutator=0)
int64_t get_scan_revision(uint32_t timeout_ms)
std::string & get_log_dir()
Maps object pointers to bit fields.
Interface for removing a range or changing its end row in a Range set.
int compaction_type_needed
void relinquish_install_log()
void change_start_row(const String &start_row)
Changes the start row.
bool escape(const char *in_buf, size_t in_len, const char **out_bufp, size_t *out_lenp)
bool compaction(const void *key)
Test if compaction needs to be perfomed on object.
Lib::Master::ClientPtr m_master_client
#define HT_ON_SCOPE_EXIT(...)
void acknowledge_load(uint32_t timeout_ms)
size_t column_qualifier_len
String format_bytes(size_t n, const void *buf, size_t len, const char *trailer)
Return first n bytes of buffer with an optional trailer if the size of the buffer exceeds n...
CommitLogPtr m_transfer_log
static void add_to_work_queue(MetaLog::EntityTaskPtr entity)
static const int64_t TIMESTAMP_MIN
uint64_t m_bytes_returned
Relinquish - log installed.
int64_t m_maintenance_generation
CharT * alloc(size_t sz)
Allocate sz bytes.
std::shared_ptr< CommitLogReader > CommitLogReaderPtr
Smart pointer to CommitLogReader.
void md5_trunc_modified_base64(const char *input, char output[17])
Get the modified base64 encoded string of the first 12 Bytes of the 16 Byte MD5 code of a null termin...
std::shared_ptr< Client > ClientPtr
A class managing one or more serializable ByteStrings.
Wrapper for TableIdentifier providing member storage.
Range(Lib::Master::ClientPtr &, const TableIdentifier &, SchemaPtr &, const RangeSpec &, RangeSet *, const RangeState &, bool needs_compaction=false)
Declarations for TransferLog This file contains type declarations for TransferLog, a class for creating a uniq range transfer log path.
void set_start_row(const std::string &s)
int flags(const void *key)
Returns bit field for a give pointer.
std::shared_ptr< TableMutator > TableMutatorPtr
Smart pointer to TableMutator.
Provides the ability to mutate a table in the form of adding and deleting rows and cells...
uint64_t m_cells_returned
void add(const Key &key, const ByteString value)
This method must not fail.
File system utility functions.
std::map< const char *, int64_t, LtCstr, SplitRowDataAlloc > SplitRowDataMapT
void read()
Reads hints file.
static int64_t number64(int64_t maximum=0)
Returns a random 64-bit unsigned integer.
void set(const std::vector< AccessGroup::Hints > &hints)
Replaces contents of internal hints vector.
static std::string toplevel_dir
const char * get_text(int error)
Returns a descriptive error message.
uint64_t m_disk_bytes_read
void compact(MaintenanceFlag::Map &subtask_map)
std::shared_ptr< MergeScannerRange > MergeScannerRangePtr
Smart pointer to MergeScannerRange.
int m_compaction_type_needed
static TablePtr rs_metrics_table
void create_scanner(ScanContextPtr &scan_ctx, MergeScannerRangePtr &scanner)
int64_t m_split_threshold
uint32_t bloom_filter_maybes
static MetaLog::WriterPtr rsml_writer
bool exists()
Checks if hints file exists.
Stl compatible memory allocator based on a PageArena.
STL Strict Weak Ordering for comparing c-style strings.
void relinquish_finalize()
Compatibility Macros for C/C++.
std::ostream & operator<<(std::ostream &os, const crontab_entry &entry)
Helper function to write crontab_entry to an ostream.
bool load(const SerializedKey &key)
Parses the opaque key and loads the components into the member variables.
uint64_t m_added_deletes[KEYSPEC_DELETE_MAX]
std::shared_ptr< AccessGroup > AccessGroupPtr
static Hypertable::FilesystemPtr dfs
size_t length() const
Retrieves the length of the serialized string.
AccessGroupVector m_access_group_vector
LoadMetricsRange m_load_metrics
bool m_capacity_exceeded_throttle
virtual void decode(const uint8_t **bufp, size_t *remainp)
Reads serialized representation of object from a buffer.
Provides sequential access to blocks in a commit log.
static std::string get_text(uint8_t state)
Returns string representation of range state value.
static int64_t range_split_size
void split_notify_master()
std::vector< AccessGroupPtr > m_column_family_vector
const uint8_t * ptr
The pointer to the serialized data.
std::shared_ptr< CellStore > CellStorePtr
Smart pointer to CellStore.
#define HT_FATALF(msg,...)
long long int Lld
Shortcut for printf formats.
void write(String location)
Write hints file.
Relinquish - range compacted.
std::shared_ptr< MetaLogEntityRange > MetaLogEntityRangePtr
Smart pointer to MetaLogEntityRange.
void update_schema(SchemaPtr &schema)
virtual bool remove(const String &start_row, const String &end_row)=0
Removes the range associated with the given end_row.
std::mutex m_schema_mutex
uint64_t memory_allocated
#define HT_INFOF(msg,...)
size_t decode_length(const uint8_t **dptr) const
Retrieves the decoded length and returns a pointer to the string.
bool cancel_maintenance()
#define HT_THROWF(_code_, _fmt_,...)
Provides access to internal components of opaque key.
AccessGroup::MaintenanceData * agdata
Random number generator for int32, int64, double and ascii arrays.
static int64_t range_metadata_split_size
uint64_t shadow_cache_memory
static int32_t access_group_max_mem
This is a generic exception class for Hypertable.
bool needs_major_compaction
uint64_t bloom_filter_memory
void purge_memory(MaintenanceFlag::Map &subtask_map)
static const char * END_ROOT_ROW
#define HT_MAYBE_FAIL_X(_label_, _exp_)
bool next(const uint8_t **blockp, size_t *lenp, BlockHeaderCommitLog *)
static Hypertable::FilesystemPtr log_dfs
#define HT_ERRORF(msg,...)
Declarations for CommitLog.
CellListScanner * create_scanner_pseudo_table(ScanContextPtr &scan_ctx, const String &table_name)
Creates a scanner over the pseudo-table indicated by table_name.
std::shared_ptr< Schema > SchemaPtr
Smart pointer to Schema.
uint32_t schema_generation
void set_end_row(const std::string &e)
int16_t maintenance_flags
RangeMaintenanceGuard m_maintenance_guard
#define HT_MAYBE_FAIL(_label_)
void compute_and_store(TableMutator *mutator, time_t now, LoadFactors &load_factors, uint64_t disk_used, uint64_t memory_used, double compression_ratio)
Value format for version 1:
static CellStorePtr open(const String &name, const char *start_row, const char *end_row)
Creates a CellStore object from a given cell store file.
std::vector< AccessGroup::Hints > & get()
Returns reference to internal hints vector.
void relinquish_compact()
String extensions and helpers: sets, maps, append operators etc.
const char * column_family
Error codes, Exception handling, error logging.
#define HT_THROW(_code_, _msg_)
void replay_transfer_log(CommitLogReader *commit_log_reader)
Called before range has been flipped live so no locking needed.
Creates a unique range transfer log pathname.
Wrapper for RangeSpec providing member storage.
static bool row_size_unlimited
Declarations for MergeScannerRange.
static int64_t range_maximum_size
int code() const
Returns the error code.
int64_t purgeable_index_memory
static bool immovable_range_set_contains(const TableIdentifier &table, const RangeSpec &spec)
std::shared_ptr< ScanContext > ScanContextPtr
bool memory_purge(const void *key)
Test if memory purge needs to be perfomed on object.
#define HT_THROW2(_code_, _ex_, _msg_)
Executes user-defined functions when leaving the current scope.
A helper class to put up a barrier when entering a scope and take it down when leaving the scope...
void recovery_finalize()
This method is called when the range is offline so no locking is needed.