27 #ifndef Hypertable_Lib_CommitLogReader_h
28 #define Hypertable_Lib_CommitLogReader_h
39 #include <boost/thread/mutex.hpp>
43 #include <unordered_map>
58 const std::vector<int32_t> &fragment_filter);
66 bool next(
const uint8_t **blockp,
size_t *lenp,
97 typedef std::unordered_map<uint16_t, BlockCompressionCodecPtr>
CompressorMap;
117 #endif // Hypertable_Lib_CommitLogReader_h
std::set< String > StringSet
STL Set managing Strings.
CompressorMap m_compressor_map
CommitLogReader(FilesystemPtr &fs, const std::string &log_dir)
DynamicBuffer m_block_buffer
virtual ~CommitLogReader()
Holds information about an individual block.
std::shared_ptr< BlockCompressionCodec > BlockCompressionCodecPtr
Smart pointer to BlockCompressionCodec.
Abstract base class for a filesystem.
std::string String
A String is simply a typedef to std::string.
int64_t m_latest_revision
bool next_raw_block(CommitLogBlockInfo *, BlockHeaderCommitLog *)
std::vector< int32_t > m_init_fragments
std::map< uint32_t, uint32_t > m_error_map
Declarations for BlockCompressionCodec.
A dynamic, resizable and reference counted memory buffer.
static const int64_t TIMESTAMP_MIN
Declarations for CommitLogBlockStream.
std::shared_ptr< CommitLogReader > CommitLogReaderPtr
Smart pointer to CommitLogReader.
int32_t last_fragment_id()
const std::map< uint32_t, uint32_t > & get_error_map()
void load_fragments(String log_dir, CommitLogFileInfo *parent)
std::string m_last_fragment_fname
void get_init_fragment_ids(std::vector< uint32_t > &ids)
int32_t m_last_fragment_id
uint16_t m_compressor_type
Provides sequential access to blocks in a commit log.
BlockCompressionCodecPtr m_compressor
const std::string & last_fragment_fname() const
void clear()
Clears the buffer.
std::shared_ptr< Filesystem > FilesystemPtr
Smart pointer to Filesystem.
std::unordered_map< uint16_t, BlockCompressionCodecPtr > CompressorMap
A String class based on std::string.
std::set< uint32_t > m_fragment_filter
bool next(const uint8_t **blockp, size_t *lenp, BlockHeaderCommitLog *)
uint64_t m_fragment_queue_offset
void load_compressor(uint16_t ztype)
void get_linked_logs(StringSet &linked_logs)