13#include "oblsm/table/ob_sstable.h"
14#include "oblsm/include/ob_lsm_options.h"
18class ObCompactionPicker;
36 friend class LeveledCompactionPicker;
58 shared_ptr<ObSSTable>
input(
int which,
int i)
const {
return inputs_[which][i]; }
69 const vector<shared_ptr<ObSSTable>> &
inputs(
int which)
const {
return inputs_[which]; }
73 std::vector<shared_ptr<ObSSTable>>
inputs_[2];
Abstract base class for compaction picker strategies in an LSM-Tree.
Definition: ob_compaction_picker.h:28
Represents a compaction task in the LSM-Tree.
Definition: ob_compaction.h:28
int level() const
Gets the target level for this compaction.
Definition: ob_compaction.h:50
int level_
The current level of SSTables involved in the compaction.
Definition: ob_compaction.h:78
const vector< shared_ptr< ObSSTable > > & inputs(int which) const
Retrieves the vector of SSTables from the specified input level.
Definition: ob_compaction.h:69
std::vector< shared_ptr< ObSSTable > > inputs_[2]
Each compaction reads inputs from "level_" and "level_+1"
Definition: ob_compaction.h:73
shared_ptr< ObSSTable > input(int which, int i) const
Retrieves an SSTable from the input SSTable list.
Definition: ob_compaction.h:58
ObCompaction(int level)
Constructs a compaction task targeting a specific level.
Definition: ob_compaction.h:42
int size() const
Computes the total number of input SSTables for the compaction task.
Definition: ob_compaction.h:64
A class implementing the tiered compaction strategy.
Definition: ob_compaction_picker.h:62