MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
Public 成员函数 | Private 成员函数 | Private 属性 | 所有成员列表
oceanbase::ObSSTableBuilder类 参考

Build a SSTable 更多...

#include <ob_sstable_builder.h>

Public 成员函数

 ObSSTableBuilder (const ObComparator *comparator, ObLRUCache< uint64_t, shared_ptr< ObBlock > > *block_cache)
 
RC build (shared_ptr< ObMemTable > mem_table, const string &file_name, uint32_t sst_id)
 Builds an SSTable from the provided in-memory table and stores it in a file. 更多...
 
size_t file_size () const
 
shared_ptr< ObSSTableget_built_table ()
 
void reset ()
 

Private 成员函数

void finish_build_block ()
 

Private 属性

const ObComparatorcomparator_ = nullptr
 
ObBlockBuilder block_builder_
 
string curr_blk_first_key_
 
unique_ptr< ObFileWriterfile_writer_
 
vector< BlockMetablock_metas_
 
uint32_t curr_offset_ = 0
 
uint32_t sst_id_ = 0
 
size_t file_size_ = 0
 
ObLRUCache< uint64_t, shared_ptr< ObBlock > > * block_cache_ = nullptr
 

详细描述

Build a SSTable

成员函数说明

◆ build()

RC oceanbase::ObSSTableBuilder::build ( shared_ptr< ObMemTable mem_table,
const string &  file_name,
uint32_t  sst_id 
)

Builds an SSTable from the provided in-memory table and stores it in a file.

This function takes an ObMemTable as input, partitions the data into blocks, serializes the blocks, and writes them into an SSTable file.

参数
mem_tableA shared pointer to the ObMemTable containing the data to be written into the SSTable.
file_nameThe name of the file where the constructed SSTable will be stored.
sst_idA unique identifier assigned to the created SSTable.
返回
RC A result code indicating the success or failure of the SSTable creation process.

该类的文档由以下文件生成: