22 #ifndef Hypertable_RangeServer_LifeFileTracker_h
23 #define Hypertable_RangeServer_LifeFileTracker_h
32 #include <unordered_map>
52 std::lock_guard<std::mutex> lock(
m_mutex);
65 void update_live(
const String &
add, std::vector<String> &deletes, uint32_t nextcsid, int64_t total_blocks);
74 std::lock_guard<std::mutex> lock(
m_mutex);
148 #endif // Hypertable_RangeServer_LifeFileTracker_h
void add_references(const std::vector< String > &filev)
Adds a set of files to the referenced file set.
std::unordered_map< String, uint32_t > FileRefCountMap
std::string String
A String is simply a typedef to std::string.
TableIdentifierManaged m_identifier
void update_live(const String &add, std::vector< String > &deletes, uint32_t nextcsid, int64_t total_blocks)
Updates the live file set.
Declarations for TableIdentifier and TableIdentifierManaged.
FileRefCountMap m_referenced
std::set< String > m_live
LiveFileTracker(const TableIdentifier *identifier, SchemaPtr &schema_ptr, const RangeSpec *range, const String &ag_name)
std::mutex m_update_mutex
void add(const Key &key, uint8_t flag, const void *value, uint32_t value_len, TableMutatorAsync *value_index_mutator, TableMutatorAsync *qualifier_index_mutator)
std::set< String > m_blocked
Wrapper for TableIdentifier providing member storage.
Tracks files that are live or referenced for purposes of maintaining the 'Files' METADATA column...
void get_file_data(String &file_list, int64_t *block_countp, bool include_blocked)
Returns ' ' separated list of files, suitable for writing into the 'Files' column of METADATA...
void set_next_csid(uint32_t nid)
void remove_references(const std::vector< String > &filev)
Decrements the reference count of each file in the given vector.
Declarations for RangeSpec and RangeSpecManaged.
void update_files_column()
Updates the 'Files' METADATA column if it needs updating.
void get_file_list(String &file_list)
Populates string with live files separated by ';'.
String strip_basename(const String &fname)
A String class based on std::string.
void change_range(const String &start_row, const String &end_row)
std::shared_ptr< Schema > SchemaPtr
Smart pointer to Schema.
void add_live_noupdate(const String &fname, int64_t total_blocks)
Adds a file to the live file set without seting the 'need_update' bit.