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

Provides sequential access to blocks in a commit log. More...

#include <CommitLogReader.h>

Inheritance diagram for Hypertable::CommitLogReader:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::CommitLogReader:
Collaboration graph
[legend]

Public Member Functions

 CommitLogReader (FilesystemPtr &fs, const std::string &log_dir)
 
 CommitLogReader (FilesystemPtr &fs, const std::string &log_dir, const std::vector< int32_t > &fragment_filter)
 
virtual ~CommitLogReader ()
 
void get_init_fragment_ids (std::vector< uint32_t > &ids)
 
bool next_raw_block (CommitLogBlockInfo *, BlockHeaderCommitLog *)
 
bool next (const uint8_t **blockp, size_t *lenp, BlockHeaderCommitLog *)
 
void reset ()
 
void get_linked_logs (StringSet &linked_logs)
 
const std::map< uint32_t,
uint32_t > & 
get_error_map ()
 
const std::string & last_fragment_fname () const
 
int32_t last_fragment_id ()
 
- Public Member Functions inherited from Hypertable::CommitLogBase
 CommitLogBase (const std::string &log_dir)
 
void stitch_in (CommitLogBase *other)
 This method assumes that the other commit log is not being concurrently used which is why it doesn't lock it's mutex. More...
 
std::string & get_log_dir ()
 
int64_t get_latest_revision ()
 
bool empty ()
 
bool range_reference_required ()
 
LogFragmentQueuefragment_queue ()
 
uint32_t toplevel_fragment_id (CommitLogFileInfo *finfo)
 

Private Types

typedef std::unordered_map
< uint16_t,
BlockCompressionCodecPtr
CompressorMap
 

Private Member Functions

void load_fragments (String log_dir, CommitLogFileInfo *parent)
 
void load_compressor (uint16_t ztype)
 

Private Attributes

FilesystemPtr m_fs
 
uint64_t m_fragment_queue_offset
 
DynamicBuffer m_block_buffer
 
int64_t m_revision {}
 
CompressorMap m_compressor_map
 
uint16_t m_compressor_type {}
 
BlockCompressionCodecPtr m_compressor
 
std::set< uint32_t > m_fragment_filter
 
std::vector< int32_t > m_init_fragments
 
std::map< uint32_t, uint32_t > m_error_map
 
StringSet m_linked_logs
 
std::string m_last_fragment_fname
 
int32_t m_last_fragment_id {}
 
bool m_verbose {}
 

Additional Inherited Members

- Protected Attributes inherited from Hypertable::CommitLogBase
std::mutex m_mutex
 
std::string m_log_dir
 
std::string m_log_name
 
LogFragmentQueue m_fragment_queue
 
int64_t m_latest_revision
 
std::set< int64_t > m_linked_log_hashes
 
bool m_range_reference_required
 

Detailed Description

Provides sequential access to blocks in a commit log.

Definition at line 52 of file CommitLogReader.h.

Member Typedef Documentation

typedef std::unordered_map<uint16_t, BlockCompressionCodecPtr> Hypertable::CommitLogReader::CompressorMap
private

Definition at line 97 of file CommitLogReader.h.

Constructor & Destructor Documentation

CommitLogReader::CommitLogReader ( FilesystemPtr fs,
const std::string &  log_dir 
)

Definition at line 73 of file CommitLogReader.cc.

CommitLogReader::CommitLogReader ( FilesystemPtr fs,
const std::string &  log_dir,
const std::vector< int32_t > &  fragment_filter 
)

Definition at line 82 of file CommitLogReader.cc.

virtual Hypertable::CommitLogReader::~CommitLogReader ( )
inlinevirtual

Definition at line 60 of file CommitLogReader.h.

Member Function Documentation

const std::map<uint32_t, uint32_t>& Hypertable::CommitLogReader::get_error_map ( )
inline

Definition at line 81 of file CommitLogReader.h.

void CommitLogReader::get_init_fragment_ids ( std::vector< uint32_t > &  ids)

Definition at line 152 of file CommitLogReader.cc.

void Hypertable::CommitLogReader::get_linked_logs ( StringSet linked_logs)
inline

Definition at line 77 of file CommitLogReader.h.

const std::string& Hypertable::CommitLogReader::last_fragment_fname ( ) const
inline

Definition at line 83 of file CommitLogReader.h.

int32_t Hypertable::CommitLogReader::last_fragment_id ( )
inline

Definition at line 85 of file CommitLogReader.h.

void CommitLogReader::load_compressor ( uint16_t  ztype)
private

Definition at line 316 of file CommitLogReader.cc.

void CommitLogReader::load_fragments ( String  log_dir,
CommitLogFileInfo parent 
)
private

Definition at line 212 of file CommitLogReader.cc.

bool CommitLogReader::next ( const uint8_t **  blockp,
size_t *  lenp,
BlockHeaderCommitLog header 
)

Definition at line 159 of file CommitLogReader.cc.

bool CommitLogReader::next_raw_block ( CommitLogBlockInfo infop,
BlockHeaderCommitLog header 
)

Definition at line 95 of file CommitLogReader.cc.

void Hypertable::CommitLogReader::reset ( )
inline

Definition at line 69 of file CommitLogReader.h.

Member Data Documentation

DynamicBuffer Hypertable::CommitLogReader::m_block_buffer
private

Definition at line 94 of file CommitLogReader.h.

BlockCompressionCodecPtr Hypertable::CommitLogReader::m_compressor
private

Definition at line 101 of file CommitLogReader.h.

CompressorMap Hypertable::CommitLogReader::m_compressor_map
private

Definition at line 99 of file CommitLogReader.h.

uint16_t Hypertable::CommitLogReader::m_compressor_type {}
private

Definition at line 100 of file CommitLogReader.h.

std::map<uint32_t, uint32_t> Hypertable::CommitLogReader::m_error_map
private

Definition at line 104 of file CommitLogReader.h.

std::set<uint32_t> Hypertable::CommitLogReader::m_fragment_filter
private

Definition at line 102 of file CommitLogReader.h.

uint64_t Hypertable::CommitLogReader::m_fragment_queue_offset
private

Definition at line 93 of file CommitLogReader.h.

FilesystemPtr Hypertable::CommitLogReader::m_fs
private

Definition at line 92 of file CommitLogReader.h.

std::vector<int32_t> Hypertable::CommitLogReader::m_init_fragments
private

Definition at line 103 of file CommitLogReader.h.

std::string Hypertable::CommitLogReader::m_last_fragment_fname
private

Definition at line 106 of file CommitLogReader.h.

int32_t Hypertable::CommitLogReader::m_last_fragment_id {}
private

Definition at line 107 of file CommitLogReader.h.

StringSet Hypertable::CommitLogReader::m_linked_logs
private

Definition at line 105 of file CommitLogReader.h.

int64_t Hypertable::CommitLogReader::m_revision {}
private

Definition at line 95 of file CommitLogReader.h.

bool Hypertable::CommitLogReader::m_verbose {}
private

Definition at line 108 of file CommitLogReader.h.


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