add rowset meta manager#429
Conversation
|
Resolve ISSUE #431 |
|
|
||
| std::unique_ptr<RowsetReader> create_reader() = 0; | ||
|
|
||
| NewStatus copy(RowsetBuilder* dest_rowset_builder) = 0; |
| _rowset_meta_pb.set_index_disk_size(index_disk_size); | ||
| } | ||
|
|
||
| virtual void get_column_statistics(std::vector<ColumnPruning>* column_statistics) { |
There was a problem hiding this comment.
ColumnPruning may be better to replaced by ZoneMap?
There was a problem hiding this comment.
On the one side, I don't think ZoneMap is a better name; One the other side, Rename could be done in another cr, because there is many other places using ColumnPruning.
There was a problem hiding this comment.
ZoneMap is the standard to describe min/max/avg/count statistics.
| *new_delete_condition = delete_predicate; | ||
| } | ||
|
|
||
| virtual int64_t get_transaction_id() { |
There was a problem hiding this comment.
transaction_id has unified to txn_id.
| NewStatus RowsetMetaManager::save(OlapMeta* meta, int64_t rowset_id, RowsetMeta* rowset_meta) { | ||
| std::string key = ROWSET_PREFIX + std::to_string(rowset_id); | ||
| RowsetMetaPb rowset_meta_pb; | ||
| rowset_meta->get_rowset_meta_pb(&rowset_meta_pb); |
There was a problem hiding this comment.
RowsetMetaManager should not know RowsetMetaPB. RowsetMeta is stored as pb or another format is transparent
to RowsetMetaManager. Instead, Rowset provide a serialize interface to convert pb to bytes.
|
|
||
| class RowsetMeta { | ||
| public: | ||
| virtual void init(const RowsetMetaPb& rowset_meta_pb) { |
There was a problem hiding this comment.
RowsetMeta use deserialize interface to convert bytes to RowsetMetaPB.
Only RowsetMeta can know it is stored as pb or another format.
| namespace doris { | ||
|
|
||
| class RowsetMeta { | ||
| public: |
There was a problem hiding this comment.
Base Class need a virtual destructor.
| } | ||
|
|
||
| virtual void set_start_version(int start_version) { | ||
| _rowset_meta_pb.set_start_version(start_version); |
There was a problem hiding this comment.
set_start_version and set_end_version can be merged into one set_verson function.
Similarly, get_start_version and get_end_version can be merged into on get_verson.
1. add virtual destructor 2. modify RowsetMeta realization
* add rowset meta manager * Fix cr related problem 1. add virtual destructor 2. modify RowsetMeta realization
Add Rowset Meta Manager and move rowset related code to olap/rowset dir