28 #ifndef Hypertable_RangeServer_AccessGroupGarbageTracker_h
29 #define Hypertable_RangeServer_AccessGroupGarbageTracker_h
234 bool collection_performed=
true);
245 void output_state(std::ofstream &out,
const std::string &label);
354 #endif // Hypertable_RangeServer_AccessGroupGarbageTracker_h
int64_t m_accum_data_target
Amount of data to accummulate before signaling GC likely needed (adaptive)
void update_cellstore_info(std::vector< CellStoreInfo > &stores, time_t t=0, bool collection_performed=true)
Updates stored data statistics from current set of CellStores.
int64_t m_current_disk_usage
Current disk usage, updated by update_cellstore_info()
int64_t m_accum_data_target_minimum
Minimum amount of data to accummulate before signaling GC likely needed.
time_t m_min_ttl
Minimum TTL found in access group schema.
Declarations for MergeScannerAccessGroup.
int64_t m_stored_expirable
Amount of data accumulated in cell stores that could expire due to TTL.
Tracks access group garbage and signals when collection is needed.
bool m_have_max_versions
true if any column families have non-zero MAX_VERSIONS
bool check_needed_deletes()
Signals if GC is likely needed due to MAX_VERSIONS or deletes.
Program options handling.
bool m_in_memory
true if access group is in memory
int64_t memory_accumulated_since_collection()
Computes the amount of in-memory data accumulated since last collection.
int64_t total_accumulated_since_collection()
Computes the total amount of data accumulated since last collection.
time_t m_last_collection_time
Time of last garbage collection
std::shared_ptr< Properties > PropertiesPtr
bool check_needed(time_t now)
Signals if garbage collection is likely needed.
void update_schema(AccessGroupSpec *ag_spec)
Updates control variables from access group schema definition.
AccessGroupGarbageTracker(PropertiesPtr &props, CellCacheManagerPtr &cell_cache_manager, AccessGroupSpec *ag_spec)
Constructor.
CellCacheManagerPtr m_cell_cache_manager
Cell cache manager
int64_t compute_delete_count()
Computes number of delete records in access group.
Access group specification.
double m_garbage_threshold
Fraction of accumulated garbage that triggers collection.
int64_t m_last_collection_disk_usage
Disk usage at the time the last garbage collection was performed.
Declarations for CellCacheManager.
uint32_t m_stored_deletes
Number of delete records accumulated in cell stores.
std::mutex m_mutex
Mutex to serialize access to data members
void output_state(std::ofstream &out, const std::string &label)
Prints a human-readable representation of internal state to an output stream.
bool check_needed_ttl(time_t now)
Signals if GC is likeley needed due to TTL.
time_t m_elapsed_target_minimum
Minimum elapsed seconds required before signaling TTL GC likely needed.
time_t m_elapsed_target
Elapsed seconds required before signaling TTL GC likely needed (adaptive)
std::shared_ptr< CellCacheManager > CellCacheManagerPtr
Smart pointer to CellCacheManager.
void adjust_targets(time_t now, double total, double garbage)
Adjusts targets based on measured garbage.
bool collection_needed(double total, double garbage)
Determines if garbage collection is actually needed.
Merge scanner for access groups.