42 : m_flags(flags), m_return_deletes(flags & RETURN_DELETES),
43 m_accumulate_counters(flags & ACCUMULATE_COUNTERS), m_prev_cf(-1),
44 m_counted_value(12), m_scan_context(scan_ctx)
50 bool has_index =
false;
51 bool has_qualifier_index =
false;
55 for (
auto cf_spec : scan_ctx->
schema->get_column_families()){
56 if (!cf_spec || cf_spec->get_deleted())
58 if (cf_spec->get_value_index()) {
59 HT_INFO(
"Compaction scan has cell value index");
62 if (cf_spec->get_qualifier_index()) {
63 HT_INFO(
"Compaction scan has column qualifier index");
64 has_qualifier_index =
true;
67 if (has_index && has_qualifier_index)
72 if (has_index || has_qualifier_index)
74 has_index, has_qualifier_index);
83 HT_ERROR_OUT <<
"Problem destroying MergeScannerAccessGroup : " << e
92 int64_t cell_cutoff, cur_bytes = 0;
262 const uint8_t *latest_key = (
const uint8_t *)sstate.
key.
row;
264 (
const uint8_t *)sstate.
key.
row + 1;
296 const uint8_t *value;
300 (
const char *)value, value_len))
307 match = RE2::PartialMatch(sstate.
key.
row,
317 if (!RE2::PartialMatch(re2::StringPiece(sstate.
value.
str(),
373 value = sstate.
value;
385 amount += (int64_t)
m_scanners[i]->get_disk_read();
406 int64_t cell_cutoff, cur_bytes = 0;
407 const uint8_t *value;
483 const uint8_t *latest_key = (
const uint8_t *)sstate.
key.
row;
485 (
const uint8_t *)sstate.
key.
row + 1;
529 (
const char *)value, value_len)) {
538 if (!RE2::PartialMatch(sstate.
key.
row,
549 if (!RE2::PartialMatch(re2::StringPiece((
const char *)value, value_len),
561 - (
const uint8_t *)sstate.
key.
row + 1);
bool matches_deleted_column_family(const Key &key) const
CellListScanner * scanner
uint32_t max_versions
Max versions (0 for all versions)
std::vector< CellListScannerPtr > m_scanners
void set_rowkey(const char *rowkey, bool match)
Declarations for MergeScannerAccessGroup.
static const uint32_t FLAG_DELETE_ROW
std::string String
A String is simply a typedef to std::string.
void update_deleted_row(const Key &key)
static const uint32_t FLAG_INSERT
MergeScannerAccessGroup(String &table_name, ScanContext *scan_ctx, uint32_t flags=0)
Constructor.
void start_count(const Key &key, const ByteString &value)
void update_deleted_cell(const Key &key)
void purge_from_index(const Key &key, const ByteString &value)
static const uint32_t FLAG_DELETE_CELL
void io_add_input_cell(int64_t cur_bytes)
Scan context information.
bool m_accumulate_counters
bool matches_counted_key(const Key &key) const
bool matches(const char *qualifier, size_t qualifier_len, const char *value, size_t value_len)
Evaluates predicate for the given cell.
static const uint32_t FLAG_DELETE_COLUMN_FAMILY
bool matches_deleted_row(const Key &key) const
bool matches_deleted_cell_version(const Key &key) const
int64_t m_start_timestamp
A class managing one or more serializable ByteStrings.
void check_rowkey(const char *rowkey, bool *cached, bool *match)
DynamicBuffer m_deleted_row
const char * str() const
Returns a pointer to the String's deserialized data.
void increment_count(const Key &key, const ByteString &value)
void io_add_output_cell(int64_t cur_bytes)
bool get(Key &key, ByteString &value)
DynamicBuffer m_deleted_cell_version
DynamicBuffer m_deleted_cell
int64_t m_deleted_cell_timestamp
Logging routines and macros.
vector< CellPredicate > cell_predicates
Compatibility Macros for C/C++.
void update_deleted_column_family(const Key &key)
size_t length() const
Retrieves the length of the serialized string.
bool matches_deleted_cell(const Key &key) const
pair< int64_t, int64_t > time_interval
const uint8_t * ptr
The pointer to the serialized data.
int64_t m_deleted_column_family_timestamp
void update_deleted_cell_version(const Key &key)
void clear()
Clears the buffer.
DynamicBuffer m_deleted_column_family
CellStoreReleaseCallback m_release_callback
size_t decode_length(const uint8_t **dptr) const
Retrieves the decoded length and returns a pointer to the string.
Provides access to internal components of opaque key.
uint32_t column_qualifier_len
uint8_t * base
Pointer to the allocated memory buffer.
std::priority_queue< ScannerState, std::vector< ScannerState >, LtScannerState > m_queue
size_t fill() const
Returns the size of the used portion.
void set(const void *data, size_t len)
Overwrites the existing data.
This is a generic exception class for Hypertable.
virtual bool get(Key &key, ByteString &value)=0
virtual ~MergeScannerAccessGroup()
Destructor.
uint8_t column_family_code
IndexUpdaterPtr m_index_updater
std::set< int64_t > m_deleted_cell_version_set
static IndexUpdaterPtr create(const String &table_id, SchemaPtr &schema, bool has_index, bool has_qualifier_index)
Factory function.
const char * column_qualifier
static const uint32_t FLAG_DELETE_CELL_VERSION
DynamicBuffer m_counted_value
ScanContext * m_scan_context
RegexpInfo m_regexp_cache
int64_t m_deleted_row_timestamp