28 #ifndef Hypertable_RangeServer_CellStore_h
29 #define Hypertable_RangeServer_CellStore_h
110 virtual void create(
const char *fname,
size_t max_entries,
137 const String &end_row, int32_t fd, int64_t file_length,
175 std::lock_guard<std::mutex> lock(
m_mutex);
253 virtual int32_t
get_fd() = 0;
294 std::lock_guard<std::mutex> lock(
m_mutex);
312 std::lock_guard<std::mutex> lock(
m_mutex);
319 std::lock_guard<std::mutex> lock(
m_mutex);
346 #endif // Hypertable_RangeServer_CellStore_h
uint64_t bloom_filter_access_counter
static const char INDEX_FIXED_BLOCK_MAGIC[10]
virtual CellListScannerPtr create_scanner(ScanContext *scan_ctx)
Creates a scanner on this cell list.
Abstract base class for cell store trailer.
Cell list scanner over a buffer of cells.
Abstract base class for persistent cell lists (ones that are stored on disk).
static const char INDEX_VARIABLE_BLOCK_MAGIC[10]
virtual bool may_contain(ScanContext *scan_ctx)=0
Bloom filter lookup.
Abstract base class for a filesystem.
std::string String
A String is simply a typedef to std::string.
Declarations for TableIdentifier and TableIdentifierManaged.
virtual void display_block_info()=0
Displays block information to stdout.
virtual int64_t get_total_entries()=0
Returns the number of key/value pairs in the cell store.
virtual int64_t get_blocksize()=0
Returns the block size used for this cell store.
virtual void finalize(TableIdentifier *table_identifier)=0
Finalizes the creation of a cell store, by writing block index and metadata trailer.
Scan context information.
uint32_t m_index_refcount
Declarations for CellListScannerBuffer.
Declarations for BlockCompressionCodec.
virtual void rescope(const String &start_row, const String &end_row)
virtual int32_t reopen_fd()=0
Closes and reopens the underlying CellStore file.
virtual int64_t block_index_memory_used()=0
Returns the amount of memory consumed by the block index.
A class managing one or more serializable ByteStrings.
IndexMemoryStats m_index_stats
uint64_t block_index_access_counter
std::map< const char *, int64_t, LtCstr, SplitRowDataAlloc > SplitRowDataMapT
virtual int get_file_id()=0
Returns a unique identifier which identifies the underlying file for caching purposes.
virtual void add(const Key &key, const ByteString value)=0
Inserts a key/value pair into the cell list.
virtual int64_t end_of_last_block()=0
Returns the offset of the end of the last block in the cell store.
std::shared_ptr< Properties > PropertiesPtr
virtual size_t bloom_filter_size()=0
Return Bloom filter size.
void decrement_index_refcount()
Decrement index reference count.
virtual int64_t bloom_filter_memory_used()=0
Returns the amount of memory consumed by the bloom filter.
virtual KeyDecompressor * create_key_decompressor()
Creates a key decompressor suitable for decompressing the keys stored in this cell store...
virtual CellStoreTrailer * get_trailer()=0
Return a pointer to the trailer object for this cell store.
int64_t block_index_memory
virtual int32_t get_fd()=0
Returns the open file descriptor for the CellStore file.
uint64_t bytes_read()
Returns the number of "uncompressed" bytes read from the underlying filesystem.
virtual size_t block_count()
Returns the number of CellStore blocks covered by this object.
virtual std::string & get_filename()=0
Pathname of cell store file.
virtual uint64_t purge_indexes()=0
Purges bloom filter and block indexes.
std::shared_ptr< CellStore > CellStorePtr
Smart pointer to CellStore.
virtual uint16_t block_header_format()=0
virtual float compression_ratio()=0
Returns block compression ratio of this cell store.
virtual void set_replaced_files(const std::vector< String > &old_files)
Sets the cell store files replaced by this CellStore.
std::vector< String > m_replaced_files
virtual void get_index_memory_stats(IndexMemoryStats *statsp)
Returns amount of purgeable index memory available.
virtual uint64_t disk_usage()=0
Returns the disk used by this cell store.
virtual void populate_index_pseudo_table_scanner(CellListScannerBuffer *scanner)
Populates scanner with key/value pairs generated from CellStore index.
Provides access to internal components of opaque key.
static const char DATA_BLOCK_MAGIC[10]
virtual BlockCompressionCodec * create_block_compression_codec()=0
Creates a block compression codec suitable for decompressing the cell store's blocks.
A String class based on std::string.
A serializable ByteString.
virtual void open(const String &fname, const String &start_row, const String &end_row, int32_t fd, int64_t file_length, CellStoreTrailer *trailer)=0
Opens a cell store with possibly a restricted view.
std::shared_ptr< CellListScanner > CellListScannerPtr
virtual void split_row_estimate_data(SplitRowDataMapT &split_row_data)
Populates split_row_data with unique row and count estimates from block index.
int64_t bloom_filter_memory
virtual bool restricted_range()=0
Returns true if the cellstore was opened with a restricted range.
virtual void create(const char *fname, size_t max_entries, PropertiesPtr &props, const TableIdentifier *table_id=0)=0
Creates a new cell store.
Abstract base class for block compression codecs.
Declarations for CellStoreBlockIndexArray.
virtual const std::vector< String > & get_replaced_files()
Returns all the cell store files replaced by this CellStore.
Abstract base class for cell lists (sorted lists of key/value pairs).