0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | List of all members
Hypertable::CellStoreBlockIndexArray< OffsetT > Class Template Reference

#include <CellStoreBlockIndexArray.h>

Collaboration diagram for Hypertable::CellStoreBlockIndexArray< OffsetT >:
Collaboration graph
[legend]

Public Types

typedef
Hypertable::CellStoreBlockIndexIteratorArray
< OffsetT > 
iterator
 
typedef
Hypertable::CellStoreBlockIndexElementArray
< OffsetT > 
ElementT
 
typedef
Hypertable::LtCellStoreBlockIndexElementArray
< OffsetT > 
LtT
 
typedef std::vector< ElementTArrayT
 
typedef std::vector< ElementT >
::iterator 
ArrayIteratorT
 

Public Member Functions

 CellStoreBlockIndexArray ()
 
void load (DynamicBuffer &fixed, DynamicBuffer &variable, int64_t end_of_data, const String &start_row="", const String &end_row="")
 
void rescope (const String &start_row="", const String &end_row="")
 
void display ()
 
void unique_row_count_estimate (CellList::SplitRowDataMapT &split_row_data, int32_t keys_per_block)
 Accumulates unique row estimates from block index entries. More...
 
void populate_pseudo_table_scanner (CellListScannerBuffer *scanner, const String &filename, int32_t keys_per_block, float compression_ratio)
 Populates scanner with data for .cellstore.index pseudo table. More...
 
size_t memory_used ()
 
int64_t disk_used ()
 
double fraction_covered ()
 
int64_t end_of_last_block ()
 
int64_t index_entries ()
 
iterator begin ()
 
iterator end ()
 
iterator lower_bound (const SerializedKey &k)
 
iterator upper_bound (const SerializedKey &k)
 
void clear ()
 

Private Attributes

ArrayT m_array
 
StaticBuffer m_keydata
 
SerializedKey m_middle_key
 
OffsetT m_end_of_last_block
 
OffsetT m_disk_used
 
OffsetT m_maximum_entries
 

Detailed Description

template<typename OffsetT>
class Hypertable::CellStoreBlockIndexArray< OffsetT >

Definition at line 101 of file CellStoreBlockIndexArray.h.

Member Typedef Documentation

template<typename OffsetT>
typedef std::vector<ElementT>::iterator Hypertable::CellStoreBlockIndexArray< OffsetT >::ArrayIteratorT

Definition at line 107 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
typedef std::vector<ElementT> Hypertable::CellStoreBlockIndexArray< OffsetT >::ArrayT

Definition at line 106 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
typedef Hypertable::CellStoreBlockIndexElementArray<OffsetT> Hypertable::CellStoreBlockIndexArray< OffsetT >::ElementT

Definition at line 104 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
typedef Hypertable::CellStoreBlockIndexIteratorArray<OffsetT> Hypertable::CellStoreBlockIndexArray< OffsetT >::iterator

Definition at line 103 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
typedef Hypertable::LtCellStoreBlockIndexElementArray<OffsetT> Hypertable::CellStoreBlockIndexArray< OffsetT >::LtT

Definition at line 105 of file CellStoreBlockIndexArray.h.

Constructor & Destructor Documentation

template<typename OffsetT>
Hypertable::CellStoreBlockIndexArray< OffsetT >::CellStoreBlockIndexArray ( )
inline

Definition at line 109 of file CellStoreBlockIndexArray.h.

Member Function Documentation

template<typename OffsetT>
iterator Hypertable::CellStoreBlockIndexArray< OffsetT >::begin ( )
inline

Definition at line 390 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
void Hypertable::CellStoreBlockIndexArray< OffsetT >::clear ( )
inline

Definition at line 408 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
int64_t Hypertable::CellStoreBlockIndexArray< OffsetT >::disk_used ( )
inline

Definition at line 379 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
void Hypertable::CellStoreBlockIndexArray< OffsetT >::display ( )
inline

Definition at line 219 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
iterator Hypertable::CellStoreBlockIndexArray< OffsetT >::end ( )
inline

Definition at line 394 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
int64_t Hypertable::CellStoreBlockIndexArray< OffsetT >::end_of_last_block ( )
inline

Definition at line 386 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
double Hypertable::CellStoreBlockIndexArray< OffsetT >::fraction_covered ( )
inline

Definition at line 381 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
int64_t Hypertable::CellStoreBlockIndexArray< OffsetT >::index_entries ( )
inline

Definition at line 388 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
void Hypertable::CellStoreBlockIndexArray< OffsetT >::load ( DynamicBuffer fixed,
DynamicBuffer variable,
int64_t  end_of_data,
const String start_row = "",
const String end_row = "" 
)
inline

Definition at line 111 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
iterator Hypertable::CellStoreBlockIndexArray< OffsetT >::lower_bound ( const SerializedKey k)
inline

Definition at line 398 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
size_t Hypertable::CellStoreBlockIndexArray< OffsetT >::memory_used ( )
inline

Definition at line 375 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
void Hypertable::CellStoreBlockIndexArray< OffsetT >::populate_pseudo_table_scanner ( CellListScannerBuffer scanner,
const String filename,
int32_t  keys_per_block,
float  compression_ratio 
)
inline

Populates scanner with data for .cellstore.index pseudo table.

This method synthesizes the following .cellstore.index pseudo-table cells, for each in-scope block index entry:

  • Size - Estimated uncompressed size of the block
  • CompressedSize - Actual compressed size of the block
  • KeyCount - Estimated key count for the block (keys_per_block)

Each key is formed by taking the row, timestamp, and revision from the block index key, using FLAG_INSERT as the flag, and constructing the column qualifier as follows:

<cellstore-filename> ':' <hex-offset>

As an example, a single block index entry might generate the following cells in TSV format:

help@.nosp@m.acme.nosp@m..com   Size:2/2/default/ZwmE_ShYJKgim-IL/cs103:00028A61        171728
help@.nosp@m.acme.nosp@m..com   CompressedSize:2/2/default/ZwmE_ShYJKgim-IL/cs103:00028A61      65231
help@.nosp@m.acme.nosp@m..com   KeyCount:2/2/default/ZwmE_ShYJKgim-IL/cs103:00028A61    281
Parameters
scannerPointer to CellListScannerBuffer to hold data
filenameName of associated CellStore file
keys_per_blockEstimate of number of keys per block
compression_ratioBlock compression ratio for associated CellStore file

Definition at line 301 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
void Hypertable::CellStoreBlockIndexArray< OffsetT >::rescope ( const String start_row = "",
const String end_row = "" 
)
inline

Definition at line 199 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
void Hypertable::CellStoreBlockIndexArray< OffsetT >::unique_row_count_estimate ( CellList::SplitRowDataMapT split_row_data,
int32_t  keys_per_block 
)
inline

Accumulates unique row estimates from block index entries.

Parameters
split_row_dataReference to accumulator map holding unique row and count estimates
keys_per_blockKey count to add for each index entry

Definition at line 247 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
iterator Hypertable::CellStoreBlockIndexArray< OffsetT >::upper_bound ( const SerializedKey k)
inline

Definition at line 403 of file CellStoreBlockIndexArray.h.

Member Data Documentation

template<typename OffsetT>
ArrayT Hypertable::CellStoreBlockIndexArray< OffsetT >::m_array
private

Definition at line 416 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
OffsetT Hypertable::CellStoreBlockIndexArray< OffsetT >::m_disk_used
private

Definition at line 420 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
OffsetT Hypertable::CellStoreBlockIndexArray< OffsetT >::m_end_of_last_block
private

Definition at line 419 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
StaticBuffer Hypertable::CellStoreBlockIndexArray< OffsetT >::m_keydata
private

Definition at line 417 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
OffsetT Hypertable::CellStoreBlockIndexArray< OffsetT >::m_maximum_entries
private

Definition at line 421 of file CellStoreBlockIndexArray.h.

template<typename OffsetT>
SerializedKey Hypertable::CellStoreBlockIndexArray< OffsetT >::m_middle_key
private

Definition at line 418 of file CellStoreBlockIndexArray.h.


The documentation for this class was generated from the following file: