Provides sequential access to blocks in a commit log. More...
#include <CommitLogReader.h>


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 () |
| LogFragmentQueue & | fragment_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 |
Provides sequential access to blocks in a commit log.
Definition at line 52 of file CommitLogReader.h.
|
private |
Definition at line 97 of file CommitLogReader.h.
| 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.
|
inlinevirtual |
Definition at line 60 of file CommitLogReader.h.
|
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.
|
inline |
Definition at line 77 of file CommitLogReader.h.
|
inline |
Definition at line 83 of file CommitLogReader.h.
|
inline |
Definition at line 85 of file CommitLogReader.h.
|
private |
Definition at line 316 of file CommitLogReader.cc.
|
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.
|
inline |
Definition at line 69 of file CommitLogReader.h.
|
private |
Definition at line 94 of file CommitLogReader.h.
|
private |
Definition at line 101 of file CommitLogReader.h.
|
private |
Definition at line 99 of file CommitLogReader.h.
|
private |
Definition at line 100 of file CommitLogReader.h.
|
private |
Definition at line 104 of file CommitLogReader.h.
|
private |
Definition at line 102 of file CommitLogReader.h.
|
private |
Definition at line 93 of file CommitLogReader.h.
|
private |
Definition at line 92 of file CommitLogReader.h.
|
private |
Definition at line 103 of file CommitLogReader.h.
|
private |
Definition at line 106 of file CommitLogReader.h.
|
private |
Definition at line 107 of file CommitLogReader.h.
|
private |
Definition at line 105 of file CommitLogReader.h.
|
private |
Definition at line 95 of file CommitLogReader.h.
|
private |
Definition at line 108 of file CommitLogReader.h.
1.8.8