chaoyli closed pull request #396: Rename OLAPHeader to TabletMeta
URL: https://github.com/apache/incubator-doris/pull/396
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/be/src/http/action/meta_action.cpp 
b/be/src/http/action/meta_action.cpp
index 49fed9c8..7cc3bee3 100644
--- a/be/src/http/action/meta_action.cpp
+++ b/be/src/http/action/meta_action.cpp
@@ -26,10 +26,10 @@
 #include "http/http_headers.h"
 #include "http/http_status.h"
 
-#include "olap/olap_header_manager.h"
+#include "olap/tablet_meta_manager.h"
 #include "olap/storage_engine.h"
 #include "olap/olap_define.h"
-#include "olap/olap_header.h"
+#include "olap/tablet_meta.h"
 #include "olap/tablet.h"
 #include "common/logging.h"
 #include "util/json_util.h"
@@ -54,7 +54,7 @@ Status MetaAction::_handle_header(HttpRequest *req, 
std::string* json_header) {
         LOG(WARNING) << "no tablet for tablet_id:" << tablet_id << " schema 
hash:" << schema_hash;
         return Status("no tablet exist");
     }
-    OLAPStatus s = OlapHeaderManager::get_json_header(tablet->store(), 
tablet_id, schema_hash, json_header);
+    OLAPStatus s = TabletMetaManager::get_json_header(tablet->store(), 
tablet_id, schema_hash, json_header);
     if (s == OLAP_ERR_META_KEY_NOT_FOUND) {
         return Status("no header exist");
     } else if (s != OLAP_SUCCESS) {
diff --git a/be/src/http/action/restore_tablet_action.cpp 
b/be/src/http/action/restore_tablet_action.cpp
index c1981540..a7bf7629 100644
--- a/be/src/http/action/restore_tablet_action.cpp
+++ b/be/src/http/action/restore_tablet_action.cpp
@@ -31,7 +31,7 @@
 #include "http/http_status.h"
 #include "util/file_utils.h"
 #include "olap/utils.h"
-#include "olap/olap_header.h"
+#include "olap/tablet_meta.h"
 #include "util/json_util.h"
 #include "olap/olap_define.h"
 #include "olap/storage_engine.h"
@@ -163,7 +163,7 @@ Status RestoreTabletAction::_restore(const std::string& 
key, int64_t tablet_id,
     }
     LOG(INFO) << "tablet path in trash:" << latest_tablet_path;
     std::string original_header_path = latest_tablet_path + "/" + 
std::to_string(tablet_id) +".hdr";
-    OLAPHeader header(original_header_path);
+    TabletMeta header(original_header_path);
     OLAPStatus load_status = header.load_and_init();
     if (load_status != OLAP_SUCCESS) {
         LOG(WARNING) << "header load and init error, header path:" << 
original_header_path;
diff --git a/be/src/olap/CMakeLists.txt b/be/src/olap/CMakeLists.txt
index f13fe50c..eb4a42ba 100644
--- a/be/src/olap/CMakeLists.txt
+++ b/be/src/olap/CMakeLists.txt
@@ -52,13 +52,10 @@ add_library(Olap STATIC
     new_status.cpp
     null_predicate.cpp
     olap_cond.cpp
-    olap_header.cpp
-    olap_header_manager.cpp
     olap_index.cpp
     olap_meta.cpp
     olap_server.cpp
     olap_snapshot.cpp
-    tablet.cpp
     options.cpp
     out_stream.cpp
     push_handler.cpp
@@ -80,6 +77,9 @@ add_library(Olap STATIC
     stream_index_reader.cpp
     stream_index_writer.cpp
     stream_name.cpp
+    tablet.cpp
+    tablet_meta.cpp
+    tablet_meta_manager.cpp
     types.cpp 
     utils.cpp
     wrapper_field.cpp
diff --git a/be/src/olap/base_compaction.cpp b/be/src/olap/base_compaction.cpp
index fb83e9b6..63e9a058 100644
--- a/be/src/olap/base_compaction.cpp
+++ b/be/src/olap/base_compaction.cpp
@@ -27,7 +27,7 @@
 #include "olap/merger.h"
 #include "olap/column_data.h"
 #include "olap/storage_engine.h"
-#include "olap/olap_header.h"
+#include "olap/tablet_meta.h"
 #include "olap/segment_group.h"
 #include "olap/tablet.h"
 #include "olap/utils.h"
diff --git a/be/src/olap/olap_define.h b/be/src/olap/olap_define.h
index 63a9b87a..549d3fb4 100644
--- a/be/src/olap/olap_define.h
+++ b/be/src/olap/olap_define.h
@@ -263,7 +263,7 @@ enum OLAPStatus {
     OLAP_ERR_ROWBLOCK_FIND_ROW_EXCEPTION = -1301,
     OLAP_ERR_ROWBLOCK_READ_INFO_ERROR = -1302,
 
-    // OLAPHeader
+    // TabletMeta
     // [-1400, -1500)
     OLAP_ERR_HEADER_ADD_VERSION = -1400,
     OLAP_ERR_HEADER_DELETE_VERSION = -1401,
diff --git a/be/src/olap/olap_meta.h b/be/src/olap/olap_meta.h
index c7f61cf9..fcd58def 100755
--- a/be/src/olap/olap_meta.h
+++ b/be/src/olap/olap_meta.h
@@ -22,7 +22,7 @@
 #include <map>
 #include <functional>
 
-#include "olap/olap_header.h"
+#include "olap/tablet_meta.h"
 #include "olap/olap_define.h"
 #include "rocksdb/db.h"
 
diff --git a/be/src/olap/olap_snapshot.cpp b/be/src/olap/olap_snapshot.cpp
index c1de1b07..3daab998 100644
--- a/be/src/olap/olap_snapshot.cpp
+++ b/be/src/olap/olap_snapshot.cpp
@@ -36,7 +36,7 @@
 #include "olap/column_data.h"
 #include "olap/olap_define.h"
 #include "olap/tablet.h"
-#include "olap/olap_header_manager.h"
+#include "olap/tablet_meta_manager.h"
 #include "olap/push_handler.h"
 #include "olap/store.h"
 #include "util/file_utils.h"
@@ -159,7 +159,7 @@ string StorageEngine::_get_header_full_path(
 
 void StorageEngine::_update_header_file_info(
         const vector<VersionEntity>& shortest_versions,
-        OLAPHeader* header) {
+        TabletMeta* header) {
     // clear schema_change_status
     header->clear_schema_change_status();
     // remove all old version and add new version
@@ -305,7 +305,7 @@ OLAPStatus StorageEngine::_create_snapshot_files(
     header_locked = true;
 
     vector<ColumnData*> olap_data_sources;
-    OLAPHeader* new_olap_header = nullptr;
+    TabletMeta* new_tablet_meta = nullptr;
     do {
         // get latest version
         const PDelta* lastest_version = NULL;
@@ -359,14 +359,14 @@ OLAPStatus StorageEngine::_create_snapshot_files(
 
         // load tablet header, in order to remove versions that not in 
shortest version path
         OlapStore* store = ref_tablet->store();
-        new_olap_header = new(nothrow) OLAPHeader();
-        if (new_olap_header == NULL) {
-            OLAP_LOG_WARNING("fail to malloc OLAPHeader.");
+        new_tablet_meta = new(nothrow) TabletMeta();
+        if (new_tablet_meta == NULL) {
+            OLAP_LOG_WARNING("fail to malloc TabletMeta.");
             res = OLAP_ERR_MALLOC_ERROR;
             break;
         }
 
-        res = OlapHeaderManager::get_header(store, ref_tablet->tablet_id(), 
ref_tablet->schema_hash(), new_olap_header);
+        res = TabletMetaManager::get_header(store, ref_tablet->tablet_id(), 
ref_tablet->schema_hash(), new_tablet_meta);
         if (res != OLAP_SUCCESS) {
             LOG(WARNING) << "fail to load header. res=" << res
                     << "tablet_id=" << ref_tablet->tablet_id() << ", 
schema_hash=" << ref_tablet->schema_hash();
@@ -375,10 +375,10 @@ OLAPStatus StorageEngine::_create_snapshot_files(
 
         ref_tablet->release_header_lock();
         header_locked = false;
-        _update_header_file_info(shortest_versions, new_olap_header);
+        _update_header_file_info(shortest_versions, new_tablet_meta);
 
         // save new header to snapshot header path
-        res = new_olap_header->save(header_path);
+        res = new_tablet_meta->save(header_path);
         if (res != OLAP_SUCCESS) {
             OLAP_LOG_WARNING("fail to save header. [res=%d tablet_id=%ld, 
schema_hash=%d, headerpath=%s]",
                     res, ref_tablet->tablet_id(), ref_tablet->schema_hash(), 
header_path.c_str());
@@ -415,7 +415,7 @@ OLAPStatus StorageEngine::_create_snapshot_files(
         }
     } while (0);
 
-    SAFE_DELETE(new_olap_header);
+    SAFE_DELETE(new_tablet_meta);
 
     if (header_locked) {
         VLOG(10) << "release header lock.";
@@ -478,16 +478,16 @@ OLAPStatus 
StorageEngine::_create_incremental_snapshot_files(
 
     do {
         // save header to snapshot path
-        OLAPHeader olap_header;
-        res = OlapHeaderManager::get_header(ref_tablet->store(),
-                ref_tablet->tablet_id(), ref_tablet->schema_hash(), 
&olap_header);
+        TabletMeta tablet_meta;
+        res = TabletMetaManager::get_header(ref_tablet->store(),
+                ref_tablet->tablet_id(), ref_tablet->schema_hash(), 
&tablet_meta);
         if (res != OLAP_SUCCESS) {
             LOG(WARNING) << "fail to load header. res=" << res << "tablet_id="
                     << ref_tablet->tablet_id() << ", schema_hash=" << 
ref_tablet->schema_hash();
             break;
         }
         string header_path = _get_header_full_path(ref_tablet, 
schema_full_path);
-        res = olap_header.save(header_path);
+        res = tablet_meta.save(header_path);
         if (res != OLAP_SUCCESS) {
             LOG(WARNING) << "fail to save header to path:" << header_path;
             remove_dir(header_path);
@@ -560,19 +560,19 @@ OLAPStatus StorageEngine::_append_single_delta(
         const TSnapshotRequest& request, OlapStore* store) {
     OLAPStatus res = OLAP_SUCCESS;
     string root_path = store->path();
-    OLAPHeader* new_olap_header = new(nothrow) OLAPHeader();
-    if (new_olap_header == NULL) {
-        OLAP_LOG_WARNING("fail to malloc OLAPHeader.");
+    TabletMeta* new_tablet_meta = new(nothrow) TabletMeta();
+    if (new_tablet_meta == NULL) {
+        OLAP_LOG_WARNING("fail to malloc TabletMeta.");
         return OLAP_ERR_MALLOC_ERROR;
     }
 
-    res = OlapHeaderManager::get_header(store, request.tablet_id, 
request.schema_hash, new_olap_header);
+    res = TabletMetaManager::get_header(store, request.tablet_id, 
request.schema_hash, new_tablet_meta);
     if (res != OLAP_SUCCESS) {
         OLAP_LOG_WARNING("fail to create tablet from header file. 
[tablet_id=%ld, schema_hash=%d]",
                          request.tablet_id, request.schema_hash);
         return res;
     }
-    auto tablet = Tablet::create_from_header(new_olap_header, store);
+    auto tablet = Tablet::create_from_header(new_tablet_meta, store);
     if (tablet == NULL) {
         OLAP_LOG_WARNING("fail to load tablet. [res=%d tablet_id='%ld, 
schema_hash=%d']",
                          res, request.tablet_id, request.schema_hash);
@@ -729,19 +729,19 @@ OLAPStatus StorageEngine::storage_medium_migrate(
         }
 
         // generate new header file from the old
-        OLAPHeader* new_olap_header = new(std::nothrow) OLAPHeader();
-        if (new_olap_header == NULL) {
+        TabletMeta* new_tablet_meta = new(std::nothrow) TabletMeta();
+        if (new_tablet_meta == NULL) {
             OLAP_LOG_WARNING("new olap header failed");
             return OLAP_ERR_BUFFER_OVERFLOW;
         }
-        res = _generate_new_header(stores[0], shard, tablet, 
version_entity_vec, new_olap_header);
+        res = _generate_new_header(stores[0], shard, tablet, 
version_entity_vec, new_tablet_meta);
         if (res != OLAP_SUCCESS) {
             OLAP_LOG_WARNING("fail to generate new header file from the old. 
[res=%d]", res);
             break;
         }
 
-        // load the new tablet into StorageEngine
-        auto tablet = Tablet::create_from_header(new_olap_header, stores[0]);
+        // load the new tablet into OLAPEngine
+        auto tablet = Tablet::create_from_header(new_tablet_meta, stores[0]);
         if (tablet == NULL) {
             OLAP_LOG_WARNING("failed to create from header");
             res = OLAP_ERR_TABLE_CREATE_FROM_HEADER_ERROR;
@@ -783,7 +783,7 @@ OLAPStatus StorageEngine::_generate_new_header(
         OlapStore* store,
         const uint64_t new_shard,
         const TabletSharedPtr& tablet,
-        const vector<VersionEntity>& version_entity_vec, OLAPHeader* 
new_olap_header) {
+        const vector<VersionEntity>& version_entity_vec, TabletMeta* 
new_tablet_meta) {
     if (store == nullptr) {
         LOG(WARNING) << "fail to generate new header for store is null";
         return OLAP_ERR_HEADER_INIT_FAILED;
@@ -792,11 +792,11 @@ OLAPStatus StorageEngine::_generate_new_header(
 
     OlapStore* ref_store =
             
StorageEngine::get_instance()->get_store(tablet->storage_root_path_name());
-    OlapHeaderManager::get_header(ref_store, tablet->tablet_id(), 
tablet->schema_hash(), new_olap_header);
-    _update_header_file_info(version_entity_vec, new_olap_header);
-    new_olap_header->set_shard(new_shard);
+    TabletMetaManager::get_header(ref_store, tablet->tablet_id(), 
tablet->schema_hash(), new_tablet_meta);
+    _update_header_file_info(version_entity_vec, new_tablet_meta);
+    new_tablet_meta->set_shard(new_shard);
 
-    res = OlapHeaderManager::save(store, tablet->tablet_id(), 
tablet->schema_hash(), new_olap_header);
+    res = TabletMetaManager::save(store, tablet->tablet_id(), 
tablet->schema_hash(), new_tablet_meta);
     if (res != OLAP_SUCCESS) {
         OLAP_LOG_WARNING("fail to save olap header to new db. [res=%d]", res);
         return res;
@@ -804,7 +804,7 @@ OLAPStatus StorageEngine::_generate_new_header(
 
     // delete old header
     // TODO: make sure atomic update
-    OlapHeaderManager::remove(ref_store, tablet->tablet_id(), 
tablet->schema_hash());
+    TabletMetaManager::remove(ref_store, tablet->tablet_id(), 
tablet->schema_hash());
     if (res != OLAP_SUCCESS) {
         LOG(WARNING) << "fail to delete olap header to old db. res=" << res;
     }
diff --git a/be/src/olap/storage_engine.cpp b/be/src/olap/storage_engine.cpp
index 55031ff4..49846b78 100644
--- a/be/src/olap/storage_engine.cpp
+++ b/be/src/olap/storage_engine.cpp
@@ -37,8 +37,8 @@
 #include "olap/base_compaction.h"
 #include "olap/cumulative_compaction.h"
 #include "olap/lru_cache.h"
-#include "olap/olap_header.h"
-#include "olap/olap_header_manager.h"
+#include "olap/tablet_meta.h"
+#include "olap/tablet_meta_manager.h"
 #include "olap/push_handler.h"
 #include "olap/reader.h"
 #include "olap/schema_change.h"
@@ -132,7 +132,7 @@ OLAPStatus StorageEngine::_load_store(OlapStore* store) {
     LOG(INFO) <<"start to load tablets from store_path:" << store_path;
 
     bool is_header_converted = false;
-    OLAPStatus res = OlapHeaderManager::get_header_converted(store, 
is_header_converted);
+    OLAPStatus res = TabletMetaManager::get_header_converted(store, 
is_header_converted);
     if (res != OLAP_SUCCESS) {
         LOG(WARNING) << "get convert flag from meta failed";
         return res;
@@ -195,7 +195,7 @@ OLAPStatus StorageEngine::_load_store(OlapStore* store) {
             }
         }
     }
-    res = OlapHeaderManager::set_converted_flag(store);
+    res = TabletMetaManager::set_converted_flag(store);
     LOG(INFO) << "load header from header files finished";
     return res;
 }
@@ -280,7 +280,7 @@ OLAPStatus 
StorageEngine::_check_none_row_oriented_tablet_in_store(OlapStore* st
     LOG(INFO) <<"start to load tablets from store_path:" << store_path;
 
     bool is_header_converted = false;
-    OLAPStatus res = OlapHeaderManager::get_header_converted(store, 
is_header_converted);
+    OLAPStatus res = TabletMetaManager::get_header_converted(store, 
is_header_converted);
     if (res != OLAP_SUCCESS) {
         LOG(WARNING) << "get convert flag from meta failed";
         return res;
@@ -1136,7 +1136,7 @@ void StorageEngine::clear_transaction_task(const 
TTransactionId transaction_id,
     LOG(INFO) << "finish to clear transaction task. transaction_id=" << 
transaction_id;
 }
 
-OLAPStatus StorageEngine::clone_incremental_data(TabletSharedPtr tablet, 
OLAPHeader& clone_header,
+OLAPStatus StorageEngine::clone_incremental_data(TabletSharedPtr tablet, 
TabletMeta& clone_header,
                                               int64_t committed_version) {
     LOG(INFO) << "begin to incremental clone. tablet=" << tablet->full_name()
               << ", committed_version=" << committed_version;
@@ -1207,7 +1207,7 @@ OLAPStatus 
StorageEngine::clone_incremental_data(TabletSharedPtr tablet, OLAPHea
     return clone_res;
 }
 
-OLAPStatus StorageEngine::clone_full_data(TabletSharedPtr tablet, OLAPHeader& 
clone_header) {
+OLAPStatus StorageEngine::clone_full_data(TabletSharedPtr tablet, TabletMeta& 
clone_header) {
     Version clone_latest_version = clone_header.get_latest_version();
     LOG(INFO) << "begin to full clone. tablet=" << tablet->full_name() << ","
         << "clone_latest_version=" << clone_latest_version.first << "-" << 
clone_latest_version.second;
@@ -1476,7 +1476,7 @@ TabletSharedPtr StorageEngine::create_tablet(
     TabletSharedPtr tablet;
     // Try to create tablet on each of all_available_root_path, util success
     for (auto& store : stores) {
-        OLAPHeader* header = new OLAPHeader();
+        TabletMeta* header = new TabletMeta();
         OLAPStatus res = _create_new_tablet_header(request, store, 
is_schema_change_tablet, ref_tablet, header);
         if (res != OLAP_SUCCESS) {
             LOG(WARNING) << "fail to create tablet header. [res=" << res << " 
root=" << store->path();
@@ -1490,7 +1490,7 @@ TabletSharedPtr StorageEngine::create_tablet(
         }
 
         // commit header finally
-        res = OlapHeaderManager::save(store, request.tablet_id, 
request.tablet_schema.schema_hash, header);
+        res = TabletMetaManager::save(store, request.tablet_id, 
request.tablet_schema.schema_hash, header);
         if (res != OLAP_SUCCESS) {
             LOG(WARNING) << "fail to save header. [res=" << res << " root=" << 
store->path();
             break;
@@ -1974,7 +1974,7 @@ OLAPStatus StorageEngine::_create_new_tablet_header(
         OlapStore* store,
         const bool is_schema_change_tablet,
         const TabletSharedPtr ref_tablet,
-        OLAPHeader* header) {
+        TabletMeta* header) {
     uint64_t shard = 0;
     OLAPStatus res = store->get_shard(&shard);
     if (res != OLAP_SUCCESS) {
@@ -2671,7 +2671,7 @@ OLAPStatus StorageEngine::finish_clone(TabletSharedPtr 
tablet, const string& clo
 
         // load src header
         string clone_header_file = clone_dir + "/" + 
std::to_string(tablet->tablet_id()) + ".hdr";
-        OLAPHeader clone_header(clone_header_file);
+        TabletMeta clone_header(clone_header_file);
         if ((res = clone_header.load_and_init()) != OLAP_SUCCESS) {
             OLAP_LOG_WARNING("fail to load src header when clone. 
[clone_header_file=%s]",
                              clone_header_file.c_str());
diff --git a/be/src/olap/storage_engine.h b/be/src/olap/storage_engine.h
index ba36b2ad..4b4feb7f 100644
--- a/be/src/olap/storage_engine.h
+++ b/be/src/olap/storage_engine.h
@@ -131,10 +131,10 @@ class StorageEngine {
     void clear_transaction_task(const TTransactionId transaction_id,
                                 const std::vector<TPartitionId> partition_ids);
 
-    OLAPStatus clone_incremental_data(TabletSharedPtr tablet, OLAPHeader& 
clone_header,
+    OLAPStatus clone_incremental_data(TabletSharedPtr tablet, TabletMeta& 
clone_header,
                                      int64_t committed_version);
 
-    OLAPStatus clone_full_data(TabletSharedPtr tablet, OLAPHeader& 
clone_header);
+    OLAPStatus clone_full_data(TabletSharedPtr tablet, TabletMeta& 
clone_header);
 
     // Add empty data for Tablet
     //
@@ -402,7 +402,7 @@ class StorageEngine {
 
     void _update_header_file_info(
             const std::vector<VersionEntity>& shortest_version_entity,
-            OLAPHeader* header);
+            TabletMeta* header);
 
     OLAPStatus _link_index_and_data_files(
             const std::string& header_path,
@@ -447,7 +447,7 @@ class StorageEngine {
             OlapStore* store,
             const uint64_t new_shard,
             const TabletSharedPtr& tablet,
-            const std::vector<VersionEntity>& version_entity_vec, OLAPHeader* 
new_olap_header);
+            const std::vector<VersionEntity>& version_entity_vec, TabletMeta* 
new_tablet_meta);
 
     OLAPStatus _create_hard_link(const std::string& from_path, const 
std::string& to_path);
 
@@ -511,7 +511,7 @@ class StorageEngine {
                                              OlapStore* store,
                                              const bool 
is_schema_change_tablet,
                                              const TabletSharedPtr ref_tablet,
-                                             OLAPHeader* header);
+                                             TabletMeta* header);
 
     OLAPStatus _check_existed_or_else_create_dir(const std::string& path);
 
diff --git a/be/src/olap/store.cpp b/be/src/olap/store.cpp
index 76d97772..2e6833c9 100755
--- a/be/src/olap/store.cpp
+++ b/be/src/olap/store.cpp
@@ -42,7 +42,7 @@
 #include "service/backend_options.h"
 #include "util/file_utils.h"
 #include "util/string_util.h"
-#include "olap/olap_header_manager.h"
+#include "olap/tablet_meta_manager.h"
 
 namespace doris {
 
@@ -441,12 +441,12 @@ std::string OlapStore::get_shard_path_from_header(const 
std::string& shard_strin
     return _path + DATA_PREFIX + "/" + shard_string;
 }
 
-std::string OlapStore::get_tablet_schema_hash_path_from_header(OLAPHeader* 
header) {
+std::string OlapStore::get_tablet_schema_hash_path_from_header(TabletMeta* 
header) {
     return _path + DATA_PREFIX + "/" + std::to_string(header->shard())
             + "/" + std::to_string(header->tablet_id()) + "/" + 
std::to_string(header->schema_hash());
 }
 
-std::string OlapStore::get_tablet_path_from_header(OLAPHeader* header) {
+std::string OlapStore::get_tablet_path_from_header(TabletMeta* header) {
     return _path + DATA_PREFIX + "/" + std::to_string(header->shard())
             + "/" + std::to_string(header->tablet_id());
 }
@@ -478,16 +478,16 @@ std::string 
OlapStore::get_root_path_from_schema_hash_path_in_trash(
 
 OLAPStatus OlapStore::_load_tablet_from_header(StorageEngine* engine, 
TTabletId tablet_id,
         TSchemaHash schema_hash, const std::string& header) {
-    std::unique_ptr<OLAPHeader> olap_header(new OLAPHeader());
-    bool parsed = olap_header->ParseFromString(header);
+    std::unique_ptr<TabletMeta> tablet_meta(new TabletMeta());
+    bool parsed = tablet_meta->ParseFromString(header);
     if (!parsed) {
         LOG(WARNING) << "parse header string failed for tablet_id:" << 
tablet_id << " schema_hash:" << schema_hash;
         return OLAP_ERR_HEADER_PB_PARSE_FAILED;
     }
     OLAPStatus res = OLAP_SUCCESS;
-    if (olap_header->file_version_size() != 0) {
-        olap_header->change_file_version_to_delta();
-        res = OlapHeaderManager::save(this, tablet_id, schema_hash, 
olap_header.get());
+    if (tablet_meta->file_version_size() != 0) {
+        tablet_meta->change_file_version_to_delta();
+        res = TabletMetaManager::save(this, tablet_id, schema_hash, 
tablet_meta.get());
     }
     if (res != OLAP_SUCCESS) {
         LOG(FATAL) << "fail to save header, tablet_id:" << tablet_id
@@ -495,10 +495,10 @@ OLAPStatus 
OlapStore::_load_tablet_from_header(StorageEngine* engine, TTabletId
         return OLAP_ERR_HEADER_PUT;
     }
     // init must be called
-    res = olap_header->init();
+    res = tablet_meta->init();
     if (res != OLAP_SUCCESS) {
         LOG(WARNING) << "fail to init header, tablet_id:" << tablet_id << ", 
schema_hash:" << schema_hash;
-        res = OlapHeaderManager::remove(this, tablet_id, schema_hash);
+        res = TabletMetaManager::remove(this, tablet_id, schema_hash);
         if (res != OLAP_SUCCESS) {
             LOG(WARNING) << "remove header failed. tablet_id:" << tablet_id
                 << "schema_hash:" << schema_hash
@@ -507,7 +507,7 @@ OLAPStatus 
OlapStore::_load_tablet_from_header(StorageEngine* engine, TTabletId
         return OLAP_ERR_HEADER_INIT_FAILED;
     }
     TabletSharedPtr tablet =
-        Tablet::create_from_header(olap_header.release(), this);
+        Tablet::create_from_header(tablet_meta.release(), this);
     if (tablet == nullptr) {
         LOG(WARNING) << "fail to new tablet. tablet_id=" << tablet_id << ", 
schema_hash:" << schema_hash;
         return OLAP_ERR_TABLE_CREATE_FROM_HEADER_ERROR;
@@ -558,7 +558,7 @@ OLAPStatus OlapStore::load_tables(StorageEngine* engine) {
         };
         return true;
     };
-    OLAPStatus status = OlapHeaderManager::traverse_headers(_meta, 
load_tablet_func);
+    OLAPStatus status = TabletMetaManager::traverse_headers(_meta, 
load_tablet_func);
     return status;
 }
 
@@ -572,23 +572,23 @@ OLAPStatus 
OlapStore::check_none_row_oriented_tablet_in_store(StorageEngine* eng
         };
         return true;
     };
-    OLAPStatus status = OlapHeaderManager::traverse_headers(_meta, 
load_tablet_func);
+    OLAPStatus status = TabletMetaManager::traverse_headers(_meta, 
load_tablet_func);
     return status;
 }
 
 OLAPStatus OlapStore::_check_none_row_oriented_tablet_in_store(
                         StorageEngine* engine, TTabletId tablet_id,
                         TSchemaHash schema_hash, const std::string& header) {
-    std::unique_ptr<OLAPHeader> olap_header(new OLAPHeader());
-    bool parsed = olap_header->ParseFromString(header);
+    std::unique_ptr<TabletMeta> tablet_meta(new TabletMeta());
+    bool parsed = tablet_meta->ParseFromString(header);
     if (!parsed) {
         LOG(WARNING) << "parse header string failed for tablet_id:" << 
tablet_id << " schema_hash:" << schema_hash;
         return OLAP_ERR_HEADER_PB_PARSE_FAILED;
     }
     // init must be called
-    RETURN_NOT_OK(olap_header->init());
-    LOG(INFO) << "data_file_type:" << olap_header->data_file_type();
-    if (olap_header->data_file_type() == OLAP_DATA_FILE) {
+    RETURN_NOT_OK(tablet_meta->init());
+    LOG(INFO) << "data_file_type:" << tablet_meta->data_file_type();
+    if (tablet_meta->data_file_type() == OLAP_DATA_FILE) {
         LOG(FATAL) << "Not support row-oriented tablet any more. Please 
convert it to column-oriented tablet."
                    << "tablet=" << tablet_id << "." << schema_hash;
     }
diff --git a/be/src/olap/store.h b/be/src/olap/store.h
index ebf07339..6131acbe 100644
--- a/be/src/olap/store.h
+++ b/be/src/olap/store.h
@@ -70,9 +70,9 @@ class OlapStore {
     OLAPStatus register_tablet(Tablet* tablet);
     OLAPStatus deregister_tablet(Tablet* tablet);
 
-    std::string get_tablet_schema_hash_path_from_header(OLAPHeader* header);
+    std::string get_tablet_schema_hash_path_from_header(TabletMeta* header);
 
-    std::string get_tablet_path_from_header(OLAPHeader* header);
+    std::string get_tablet_path_from_header(TabletMeta* header);
 
     std::string get_shard_path_from_header(const std::string& shard_string);
 
diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp
index fa7898e6..fc9ad979 100644
--- a/be/src/olap/tablet.cpp
+++ b/be/src/olap/tablet.cpp
@@ -37,8 +37,7 @@
 #include "olap/store.h"
 #include "olap/row_cursor.h"
 #include "util/defer_op.h"
-#include "olap/olap_header_manager.h"
-#include "olap/storage_engine.h"
+#include "olap/tablet_meta_manager.h"
 #include "olap/utils.h"
 #include "olap/data_writer.h"
 
@@ -57,59 +56,59 @@ namespace doris {
 TabletSharedPtr Tablet::create_from_header_file(
         TTabletId tablet_id, TSchemaHash schema_hash,
         const string& header_file, OlapStore* store) {
-    OLAPHeader* olap_header = NULL;
-    olap_header = new(nothrow) OLAPHeader(header_file);
-    if (olap_header == NULL) {
-        LOG(WARNING) << "fail to malloc OLAPHeader.";
+    TabletMeta* tablet_meta = NULL;
+    tablet_meta = new(nothrow) TabletMeta(header_file);
+    if (tablet_meta == NULL) {
+        LOG(WARNING) << "fail to malloc TabletMeta.";
         return NULL;
     }
 
-    if (olap_header->load_and_init() != OLAP_SUCCESS) {
+    if (tablet_meta->load_and_init() != OLAP_SUCCESS) {
         LOG(WARNING) << "fail to load header. header_file=" << header_file;
-        delete olap_header;
+        delete tablet_meta;
         return NULL;
     }
 
     // add new fields
-    olap_header->set_tablet_id(tablet_id);
-    olap_header->set_schema_hash(schema_hash);
+    tablet_meta->set_tablet_id(tablet_id);
+    tablet_meta->set_schema_hash(schema_hash);
     path header_file_path(header_file);
     std::string shard_path = 
header_file_path.parent_path().parent_path().parent_path().string();
     std::string shard_str = shard_path.substr(shard_path.find_last_of('/') + 
1);
     uint64_t shard = stol(shard_str);
-    olap_header->set_shard(shard);
+    tablet_meta->set_shard(shard);
 
     // save header info to kv db
     // header key format: tablet_id + "_" + schema_hash
-    OLAPStatus s = OlapHeaderManager::save(store, tablet_id, schema_hash, 
olap_header);
+    OLAPStatus s = TabletMetaManager::save(store, tablet_id, schema_hash, 
tablet_meta);
     if (s != OLAP_SUCCESS) {
         OLAP_LOG_WARNING("fail to save header to db. [header_file=%s]", 
header_file.c_str());
-        delete olap_header;
+        delete tablet_meta;
         return NULL;
     }
-    return create_from_header(olap_header, store);
+    return create_from_header(tablet_meta, store);
 }
 
 TabletSharedPtr Tablet::create_from_header_file_for_check(
         TTabletId tablet_id, TSchemaHash schema_hash, const string& 
header_file) {
-    OLAPHeader* olap_header = NULL;
+    TabletMeta* tablet_meta = NULL;
 
-    olap_header = new(nothrow) OLAPHeader(header_file);
-    if (olap_header == NULL) {
-        OLAP_LOG_WARNING("fail to malloc OLAPHeader.");
+    tablet_meta = new(nothrow) TabletMeta(header_file);
+    if (tablet_meta == NULL) {
+        OLAP_LOG_WARNING("fail to malloc TabletMeta.");
         return NULL;
     }
 
-    if (olap_header->load_for_check() != OLAP_SUCCESS) {
+    if (tablet_meta->load_for_check() != OLAP_SUCCESS) {
         OLAP_LOG_WARNING("fail to load header. [header_file=%s]", 
header_file.c_str());
-        delete olap_header;
+        delete tablet_meta;
         return NULL;
     }
 
-    TabletSharedPtr tablet = std::make_shared<Tablet>(olap_header);
+    TabletSharedPtr tablet = std::make_shared<Tablet>(tablet_meta);
     if (tablet == NULL) {
         OLAP_LOG_WARNING("fail to validate tablet. [header_file=%s]", 
header_file.c_str());
-        delete olap_header;
+        delete tablet_meta;
         return NULL;
     }
     tablet->_tablet_id = tablet_id;
@@ -118,7 +117,7 @@ TabletSharedPtr Tablet::create_from_header_file_for_check(
     return tablet;
 }
 
-Tablet::Tablet(OLAPHeader* header)
+Tablet::Tablet(TabletMeta* header)
         : _header(header) {
     if (header->has_tablet_id()) {
         _tablet_id =  header->tablet_id();
@@ -129,7 +128,7 @@ Tablet::Tablet(OLAPHeader* header)
 }
 
 TabletSharedPtr Tablet::create_from_header(
-        OLAPHeader* header,
+        TabletMeta* header,
         OlapStore* store) {
     auto tablet = std::make_shared<Tablet>(header, store);
     if (tablet == NULL) {
@@ -140,7 +139,7 @@ TabletSharedPtr Tablet::create_from_header(
     return tablet;
 }
 
-Tablet::Tablet(OLAPHeader* header, OlapStore* store) :
+Tablet::Tablet(TabletMeta* header, OlapStore* store) :
         _header(header),
         _is_dropped(false),
         _num_fields(0),
@@ -275,10 +274,10 @@ Tablet::~Tablet() {
         LOG(INFO) << "drop tablet:" << full_name() << ", tablet path:" << 
_tablet_path;
         path table_path(_tablet_path);
         std::string header_path = _tablet_path + "/" + 
std::to_string(_tablet_id) + ".hdr";
-        OLAPStatus s = OlapHeaderManager::dump_header(_store, _tablet_id, 
_schema_hash, header_path);
+        OLAPStatus s = TabletMetaManager::dump_header(_store, _tablet_id, 
_schema_hash, header_path);
         LOG(INFO) << "dump header to path:" << header_path << ", status:" << s;
         LOG(INFO) << "start to remove tablet header:" << full_name();
-        s = OlapHeaderManager::remove(_store, _tablet_id, _schema_hash);
+        s = TabletMetaManager::remove(_store, _tablet_id, _schema_hash);
         LOG(INFO) << "finish remove tablet header:" << full_name() << ", res:" 
<< s;
         if (move_to_trash(table_path, table_path) != OLAP_SUCCESS) {
             LOG(WARNING) << "fail to delete tablet. [table_path=" << 
_tablet_path << "]";
@@ -346,7 +345,7 @@ OLAPStatus Tablet::load() {
 OLAPStatus Tablet::load_indices() {
     OLAPStatus res = OLAP_SUCCESS;
     ReadLock rdlock(&_header_lock);
-    OLAPHeader* header = _header;
+    TabletMeta* header = _header;
     VLOG(3) << "begin to load indices. tablet=" << full_name() << ", "
         << "version_size=" << header->file_delta_size();
 
@@ -429,7 +428,7 @@ OLAPStatus Tablet::load_indices() {
 }
 
 OLAPStatus Tablet::save_header() {
-    OLAPStatus res = OlapHeaderManager::save(_store, _tablet_id, _schema_hash, 
_header);
+    OLAPStatus res = TabletMetaManager::save(_store, _tablet_id, _schema_hash, 
_header);
     if (res != OLAP_SUCCESS) {
        LOG(WARNING) << "fail to save header. [res=" << res << " root=" << 
_storage_root_path << "]";
     }
@@ -1285,7 +1284,7 @@ OLAPStatus Tablet::_create_hard_link(const string& from, 
const string& to,
     return OLAP_SUCCESS;
 }
 
-OLAPStatus Tablet::clone_data(const OLAPHeader& clone_header,
+OLAPStatus Tablet::clone_data(const TabletMeta& clone_header,
                                  const vector<const PDelta*>& clone_deltas,
                                  const vector<Version>& versions_to_delete) {
     LOG(INFO) << "begin to clone data to tablet. tablet=" << full_name() << ", 
"
@@ -1296,8 +1295,8 @@ OLAPStatus Tablet::clone_data(const OLAPHeader& 
clone_header,
 
     do {
         // load new local header to operate on
-        OLAPHeader new_local_header;
-        OlapHeaderManager::get_header(_store, _tablet_id, _schema_hash, 
&new_local_header);
+        TabletMeta new_local_header;
+        TabletMetaManager::get_header(_store, _tablet_id, _schema_hash, 
&new_local_header);
 
         // delete versions from new local header
         for (const Version& version : versions_to_delete) {
@@ -1380,12 +1379,12 @@ OLAPStatus Tablet::clone_data(const OLAPHeader& 
clone_header,
                 << "add_versions_size=" << clone_deltas.size() << ", " 
                 << "new_indices_size=" << tmp_data_sources.size();
         // save and reload header
-        res = OlapHeaderManager::save(_store, _tablet_id, _schema_hash, 
&new_local_header);
+        res = TabletMetaManager::save(_store, _tablet_id, _schema_hash, 
&new_local_header);
         if (res != OLAP_SUCCESS) {
             LOG(WARNING) << "failed to save new local header when clone. res:" 
<< res;
             break;
         }
-        res = OlapHeaderManager::get_header(_store, _tablet_id, _schema_hash, 
_header);
+        res = TabletMetaManager::get_header(_store, _tablet_id, _schema_hash, 
_header);
         if (res != OLAP_SUCCESS) {
             LOG(WARNING) << "failed to reload original header when clone. 
[tablet=" << full_name()
                          << " res=" << res << "]";
@@ -1552,7 +1551,7 @@ OLAPStatus Tablet::compute_all_versions_hash(const 
vector<Version>& versions,
     return OLAP_SUCCESS;
 }
 
-OLAPStatus Tablet::merge_header(const OLAPHeader& hdr, int to_version) {
+OLAPStatus Tablet::merge_header(const TabletMeta& hdr, int to_version) {
     obtain_header_wrlock();
     DeferOp release_lock(std::bind<void>(&Tablet::release_header_lock, this));
 
diff --git a/be/src/olap/tablet.h b/be/src/olap/tablet.h
index f47be1fc..762be772 100644
--- a/be/src/olap/tablet.h
+++ b/be/src/olap/tablet.h
@@ -29,7 +29,7 @@
 #include "gen_cpp/olap_file.pb.h"
 #include "olap/field.h"
 #include "olap/olap_define.h"
-#include "olap/olap_header.h"
+#include "olap/tablet_meta.h"
 #include "olap/tuple.h"
 #include "olap/row_cursor.h"
 #include "olap/utils.h"
@@ -37,7 +37,7 @@
 namespace doris {
 class FieldInfo;
 class ColumnData;
-class OLAPHeader;
+class TabletMeta;
 class SegmentGroup;
 class Tablet;
 class RowBlockPosition;
@@ -105,11 +105,11 @@ class Tablet : public 
std::enable_shared_from_this<Tablet> {
             const std::string& header_file);
 
     static TabletSharedPtr create_from_header(
-            OLAPHeader* header,
+            TabletMeta* header,
             OlapStore* store = nullptr);
 
-    explicit Tablet(OLAPHeader* header, OlapStore* store);
-    explicit Tablet(OLAPHeader* header);
+    explicit Tablet(TabletMeta* header, OlapStore* store);
+    explicit Tablet(TabletMeta* header);
 
     virtual ~Tablet();
 
@@ -125,7 +125,7 @@ class Tablet : public std::enable_shared_from_this<Tablet> {
 
     OLAPStatus save_header();
 
-    OLAPHeader* get_header() {
+    TabletMeta* get_header() {
         return _header;
     }
 
@@ -146,7 +146,7 @@ class Tablet : public std::enable_shared_from_this<Tablet> {
 
     // Acquire data sources whose versions are specified by version_list.
     // If you want specified OLAPDatas instead of calling
-    // OLAPHeader->select_versions_to_span(), call this function. In the
+    // TabletMeta->select_versions_to_span(), call this function. In the
     // scenarios like Cumulative Delta and Base generating, different
     // strategies can be applied.
     // @param [in] version_list
@@ -202,7 +202,7 @@ class Tablet : public std::enable_shared_from_this<Tablet> {
     OLAPStatus is_push_for_delete(int64_t transaction_id, bool* 
is_push_for_delete) const;
 
     // need to obtain header wrlock outside
-    OLAPStatus clone_data(const OLAPHeader& clone_header,
+    OLAPStatus clone_data(const TabletMeta& clone_header,
                           const std::vector<const PDelta*>& clone_deltas,
                           const std::vector<Version>& versions_to_delete);
 
@@ -224,7 +224,7 @@ class Tablet : public std::enable_shared_from_this<Tablet> {
                                          VersionHash* version_hash) const;
 
     // used for restore, merge the (0, to_version) in 'hdr'
-    OLAPStatus merge_header(const OLAPHeader& hdr, int to_version);
+    OLAPStatus merge_header(const TabletMeta& hdr, int to_version);
 
     // Used by monitoring Tablet
     void list_data_files(std::set<std::string>* filenames) const;
@@ -707,7 +707,7 @@ class Tablet : public std::enable_shared_from_this<Tablet> {
 
     TTabletId _tablet_id;
     TSchemaHash _schema_hash;
-    OLAPHeader* _header;
+    TabletMeta* _header;
     size_t _num_rows_per_row_block;
     CompressKind _compress_kind;
     // Set it true when tablet is dropped, tablet files and data structures
diff --git a/be/src/olap/olap_header.cpp b/be/src/olap/tablet_meta.cpp
similarity index 95%
rename from be/src/olap/olap_header.cpp
rename to be/src/olap/tablet_meta.cpp
index da79c039..32afd298 100644
--- a/be/src/olap/olap_header.cpp
+++ b/be/src/olap/tablet_meta.cpp
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include "olap/olap_header.h"
+#include "olap/tablet_meta.h"
 
 #include <algorithm>
 #include <fstream>
@@ -73,13 +73,13 @@ static OLAPStatus add_vertex_to_graph(int vertex_value,
                                   vector<Vertex>* version_graph,
                                   unordered_map<int, int>* vertex_helper_map);
 
-OLAPHeader::~OLAPHeader() {
+TabletMeta::~TabletMeta() {
     // Release memory of version graph.
     clear_version_graph(&_version_graph, &_vertex_helper_map);
     Clear();
 }
 
-void OLAPHeader::change_file_version_to_delta() {
+void TabletMeta::change_file_version_to_delta() {
     // convert FileVersionMessage to PDelta and PSegmentGroup in 
initialization.
     // FileVersionMessage is used in previous code, and PDelta and 
PSegmentGroup
     // is used in streaming load branch.
@@ -91,7 +91,7 @@ void OLAPHeader::change_file_version_to_delta() {
     clear_file_version();
 }
 
-OLAPStatus OLAPHeader::init() {
+OLAPStatus TabletMeta::init() {
     clear_version_graph(&_version_graph, &_vertex_helper_map);
     if (construct_version_graph(delta(),
                                 &_version_graph,
@@ -107,7 +107,7 @@ OLAPStatus OLAPHeader::init() {
     return OLAP_SUCCESS;
 }
 
-OLAPStatus OLAPHeader::load_and_init() {
+OLAPStatus TabletMeta::load_and_init() {
     // check the tablet_path is not empty
     if (_file_name == "") {
         LOG(WARNING) << "file_path is empty for header";
@@ -151,7 +151,7 @@ OLAPStatus OLAPHeader::load_and_init() {
     return init();
 }
 
-OLAPStatus OLAPHeader::load_for_check() {
+OLAPStatus TabletMeta::load_for_check() {
     FileHeader<OLAPHeaderMessage> file_header;
     FileHandler file_handler;
 
@@ -176,11 +176,11 @@ OLAPStatus OLAPHeader::load_for_check() {
     return OLAP_SUCCESS;
 }
 
-OLAPStatus OLAPHeader::save() {
+OLAPStatus TabletMeta::save() {
     return save(_file_name);
 }
 
-OLAPStatus OLAPHeader::save(const string& file_path) {
+OLAPStatus TabletMeta::save(const string& file_path) {
     // check the tablet_path is not empty
     if (file_path == "") {
         LOG(WARNING) << "file_path is empty for header";
@@ -212,7 +212,7 @@ OLAPStatus OLAPHeader::save(const string& file_path) {
     return OLAP_SUCCESS;
 }
 
-OLAPStatus OLAPHeader::add_version(Version version, VersionHash version_hash,
+OLAPStatus TabletMeta::add_version(Version version, VersionHash version_hash,
                 int32_t segment_group_id, int32_t num_segments,
                 int64_t index_size, int64_t data_size, int64_t num_rows,
                 bool empty, const std::vector<KeyRange>* column_statistics) {
@@ -287,7 +287,7 @@ OLAPStatus OLAPHeader::add_version(Version version, 
VersionHash version_hash,
     return OLAP_SUCCESS;
 }
 
-OLAPStatus OLAPHeader::add_pending_version(
+OLAPStatus TabletMeta::add_pending_version(
         int64_t partition_id, int64_t transaction_id,
         const std::vector<string>* delete_conditions) {
     for (int i = 0; i < pending_delta_size(); ++i) {
@@ -322,7 +322,7 @@ OLAPStatus OLAPHeader::add_pending_version(
     return OLAP_SUCCESS;
 }
 
-OLAPStatus OLAPHeader::add_pending_segment_group(
+OLAPStatus TabletMeta::add_pending_segment_group(
         int64_t transaction_id, int32_t num_segments,
         int32_t pending_segment_group_id, const PUniqueId& load_id,
         bool empty, const std::vector<KeyRange>* column_statistics) {
@@ -369,7 +369,7 @@ OLAPStatus OLAPHeader::add_pending_segment_group(
     return OLAP_SUCCESS;
 }
 
-OLAPStatus OLAPHeader::add_incremental_version(Version version, VersionHash 
version_hash,
+OLAPStatus TabletMeta::add_incremental_version(Version version, VersionHash 
version_hash,
                 int32_t segment_group_id, int32_t num_segments,
                 int64_t index_size, int64_t data_size, int64_t num_rows,
                 bool empty, const std::vector<KeyRange>* column_statistics) {
@@ -433,7 +433,7 @@ OLAPStatus OLAPHeader::add_incremental_version(Version 
version, VersionHash vers
     return OLAP_SUCCESS;
 }
 
-void OLAPHeader::add_delete_condition(const DeleteConditionMessage& 
delete_condition,
+void TabletMeta::add_delete_condition(const DeleteConditionMessage& 
delete_condition,
                                       int64_t version) {
     // check whether condition exist
     DeleteConditionMessage* del_cond = NULL;
@@ -460,7 +460,7 @@ void OLAPHeader::add_delete_condition(const 
DeleteConditionMessage& delete_condi
     LOG(INFO) << "add delete condition. version=" << version;
 }
 
-const PPendingDelta* OLAPHeader::get_pending_delta(int64_t transaction_id) 
const {
+const PPendingDelta* TabletMeta::get_pending_delta(int64_t transaction_id) 
const {
     for (int i = 0; i < pending_delta_size(); i++) {
         if (pending_delta(i).transaction_id() == transaction_id) {
             return &pending_delta(i);
@@ -469,7 +469,7 @@ const PPendingDelta* OLAPHeader::get_pending_delta(int64_t 
transaction_id) const
     return nullptr;
 }
 
-const PPendingSegmentGroup* OLAPHeader::get_pending_segment_group(int64_t 
transaction_id,
+const PPendingSegmentGroup* TabletMeta::get_pending_segment_group(int64_t 
transaction_id,
         int32_t pending_segment_group_id) const {
     for (int i = 0; i < pending_delta_size(); i++) {
         if (pending_delta(i).transaction_id() == transaction_id) {
@@ -485,7 +485,7 @@ const PPendingSegmentGroup* 
OLAPHeader::get_pending_segment_group(int64_t transa
     return nullptr;
 }
 
-const PDelta* OLAPHeader::get_incremental_version(Version version) const {
+const PDelta* TabletMeta::get_incremental_version(Version version) const {
     for (int i = 0; i < incremental_delta_size(); i++) {
         if (incremental_delta(i).start_version() == version.first
             && incremental_delta(i).end_version() == version.second) {
@@ -495,7 +495,7 @@ const PDelta* OLAPHeader::get_incremental_version(Version 
version) const {
     return nullptr;
 }
 
-OLAPStatus OLAPHeader::delete_version(Version version) {
+OLAPStatus TabletMeta::delete_version(Version version) {
     // Find the version that need to be deleted.
     int index = -1;
     for (int i = 0; i < delta_size(); ++i) {
@@ -529,7 +529,7 @@ OLAPStatus OLAPHeader::delete_version(Version version) {
     return OLAP_SUCCESS;
 }
 
-OLAPStatus OLAPHeader::delete_all_versions() {
+OLAPStatus TabletMeta::delete_all_versions() {
     clear_file_version();
     clear_delta();
     clear_pending_delta();
@@ -545,7 +545,7 @@ OLAPStatus OLAPHeader::delete_all_versions() {
     return OLAP_SUCCESS;
 }
 
-void OLAPHeader::delete_pending_delta(int64_t transaction_id) {
+void TabletMeta::delete_pending_delta(int64_t transaction_id) {
     int index = -1;
     for (int i = 0; i < pending_delta_size(); ++i) {
         if (pending_delta(i).transaction_id() == transaction_id) {
@@ -564,7 +564,7 @@ void OLAPHeader::delete_pending_delta(int64_t 
transaction_id) {
     }
 }
 
-void OLAPHeader::delete_incremental_delta(Version version) {
+void TabletMeta::delete_incremental_delta(Version version) {
     int index = -1;
     for (int i = 0; i < incremental_delta_size(); ++i) {
         if (incremental_delta(i).start_version() == version.first
@@ -586,7 +586,7 @@ void OLAPHeader::delete_incremental_delta(Version version) {
 
 // This function is called when base-compaction, cumulative-compaction, 
quering.
 // we use BFS algorithm to get the shortest version path.
-OLAPStatus OLAPHeader::select_versions_to_span(const Version& target_version,
+OLAPStatus TabletMeta::select_versions_to_span(const Version& target_version,
                                            vector<Version>* span_versions) {
     if (target_version.first > target_version.second) {
         OLAP_LOG_WARNING("invalid param target_version. [start_version_id=%d 
end_version_id=%d]",
@@ -717,7 +717,7 @@ OLAPStatus OLAPHeader::select_versions_to_span(const 
Version& target_version,
     return OLAP_SUCCESS;
 }
 
-const PDelta* OLAPHeader::get_lastest_delta_version() const {
+const PDelta* TabletMeta::get_lastest_delta_version() const {
     if (delta_size() == 0) {
         return nullptr;
     }
@@ -739,7 +739,7 @@ const PDelta* OLAPHeader::get_lastest_delta_version() const 
{
     return max_delta;
 }
 
-const PDelta* OLAPHeader::get_lastest_version() const {
+const PDelta* TabletMeta::get_lastest_version() const {
     if (delta_size() == 0) {
         return nullptr;
     }
@@ -758,12 +758,12 @@ const PDelta* OLAPHeader::get_lastest_version() const {
     return max_delta;
 }
 
-Version OLAPHeader::get_latest_version() const {
+Version TabletMeta::get_latest_version() const {
     auto delta = get_lastest_version();
     return {delta->start_version(), delta->end_version()};
 }
 
-const PDelta* OLAPHeader::get_delta(int index) const {
+const PDelta* TabletMeta::get_delta(int index) const {
     if (delta_size() == 0) {
         return nullptr;
     }
@@ -771,7 +771,7 @@ const PDelta* OLAPHeader::get_delta(int index) const {
     return &delta(index);
 }
 
-void OLAPHeader::_convert_file_version_to_delta(const FileVersionMessage& 
version,
+void TabletMeta::_convert_file_version_to_delta(const FileVersionMessage& 
version,
                                                 PDelta* delta) {
     delta->set_start_version(version.start_version());
     delta->set_end_version(version.end_version());
@@ -792,7 +792,7 @@ void OLAPHeader::_convert_file_version_to_delta(const 
FileVersionMessage& versio
     }
 }
 
-const uint32_t OLAPHeader::get_cumulative_compaction_score() const{
+const uint32_t TabletMeta::get_cumulative_compaction_score() const{
     uint32_t score = 0;
     bool base_version_exists = false;
     const int32_t point = cumulative_layer_point();
@@ -810,7 +810,7 @@ const uint32_t 
OLAPHeader::get_cumulative_compaction_score() const{
     return base_version_exists ? score : 0;
 }
 
-const uint32_t OLAPHeader::get_base_compaction_score() const{
+const uint32_t TabletMeta::get_base_compaction_score() const{
     uint32_t score = 0;
     const int32_t point = cumulative_layer_point();
     bool base_version_exists = false;
@@ -828,7 +828,7 @@ const uint32_t OLAPHeader::get_base_compaction_score() 
const{
     return base_version_exists ? score : 0;
 }
 
-const OLAPStatus OLAPHeader::version_creation_time(const Version& version,
+const OLAPStatus TabletMeta::version_creation_time(const Version& version,
                                                    int64_t* creation_time) 
const {
     if (delta_size() == 0) {
         return OLAP_ERR_VERSION_NOT_EXIST;
@@ -864,7 +864,7 @@ static OLAPStatus construct_version_graph(
     }
 
     CHECK_GRAPH_PARAMS(version_graph, vertex_helper_map);
-    // Distill vertex values from versions in OLAPHeader.
+    // Distill vertex values from versions in TabletMeta.
     vector<int> vertex_values;
     vertex_values.reserve(2 * versions_in_header.size());
 
@@ -901,7 +901,7 @@ static OLAPStatus construct_version_graph(
         last_vertex_value = vertex_values[i];
     }
 
-    // Create edges for version graph according to OLAPHeader's versions.
+    // Create edges for version graph according to TabletMeta's versions.
     for (int i = 0; i < versions_in_header.size(); ++i) {
         // Versions in header are unique.
         // We ensure vertex_helper_map has its start_version.
@@ -1069,7 +1069,7 @@ static OLAPStatus add_vertex_to_graph(int vertex_value,
     return OLAP_SUCCESS;
 }
 
-const PDelta* OLAPHeader::get_base_version() const {
+const PDelta* TabletMeta::get_base_version() const {
     if (delta_size() == 0) {
         return nullptr;
     }
diff --git a/be/src/olap/olap_header.h b/be/src/olap/tablet_meta.h
similarity index 97%
rename from be/src/olap/olap_header.h
rename to be/src/olap/tablet_meta.h
index 88a03430..27ac584a 100644
--- a/be/src/olap/olap_header.h
+++ b/be/src/olap/tablet_meta.h
@@ -30,17 +30,17 @@
 
 namespace doris {
 // Class for managing tablet header.
-class OLAPHeader : public OLAPHeaderMessage {
+class TabletMeta : public OLAPHeaderMessage {
 public:
-    explicit OLAPHeader() :
+    explicit TabletMeta() :
             _support_reverse_version(false) {}
 
     // for compatible header file
-    explicit OLAPHeader(const std::string& file_name) :
+    explicit TabletMeta(const std::string& file_name) :
             _file_name(file_name),
             _support_reverse_version(false) {}
 
-    virtual ~OLAPHeader();
+    virtual ~TabletMeta();
 
     // Loads the header from disk and init, returning true on success.
     // In load_and_init(), we will validate olap header file, which mainly 
include
@@ -149,7 +149,7 @@ class OLAPHeader : public OLAPHeaderMessage {
     // It is easy to find vertex index according to vertex value.
     std::unordered_map<int, int> _vertex_helper_map;
     
-    DISALLOW_COPY_AND_ASSIGN(OLAPHeader);
+    DISALLOW_COPY_AND_ASSIGN(TabletMeta);
 };
 
 }  // namespace doris
diff --git a/be/src/olap/olap_header_manager.cpp 
b/be/src/olap/tablet_meta_manager.cpp
similarity index 86%
rename from be/src/olap/olap_header_manager.cpp
rename to be/src/olap/tablet_meta_manager.cpp
index 61058462..dbd0def9 100755
--- a/be/src/olap/olap_header_manager.cpp
+++ b/be/src/olap/tablet_meta_manager.cpp
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include "olap/olap_header_manager.h"
+#include "olap/tablet_meta_manager.h"
 
 #include <vector>
 #include <sstream>
@@ -46,8 +46,8 @@ namespace doris {
 
 const std::string HEADER_PREFIX = "hdr_";
 
-OLAPStatus OlapHeaderManager::get_header(OlapStore* store,
-        TTabletId tablet_id, TSchemaHash schema_hash, OLAPHeader* header) {
+OLAPStatus TabletMetaManager::get_header(OlapStore* store,
+        TTabletId tablet_id, TSchemaHash schema_hash, TabletMeta* header) {
     OlapMeta* meta = store->get_meta();
     std::stringstream key_stream;
     key_stream << HEADER_PREFIX << tablet_id << "_" << schema_hash;
@@ -65,9 +65,9 @@ OLAPStatus OlapHeaderManager::get_header(OlapStore* store,
     return header->init();
 }
 
-OLAPStatus OlapHeaderManager::get_json_header(OlapStore* store,
+OLAPStatus TabletMetaManager::get_json_header(OlapStore* store,
         TTabletId tablet_id, TSchemaHash schema_hash, std::string* 
json_header) {
-    OLAPHeader header;
+    TabletMeta header;
     OLAPStatus s = get_header(store, tablet_id, schema_hash, &header);
     if (s != OLAP_SUCCESS) {
         return s;
@@ -79,8 +79,8 @@ OLAPStatus OlapHeaderManager::get_json_header(OlapStore* 
store,
 }
 
 
-OLAPStatus OlapHeaderManager::save(OlapStore* store,
-        TTabletId tablet_id, TSchemaHash schema_hash, const OLAPHeader* 
header) {
+OLAPStatus TabletMetaManager::save(OlapStore* store,
+        TTabletId tablet_id, TSchemaHash schema_hash, const TabletMeta* 
header) {
     std::stringstream key_stream;
     key_stream << HEADER_PREFIX << tablet_id << "_" << schema_hash;
     std::string key = key_stream.str();
@@ -91,7 +91,7 @@ OLAPStatus OlapHeaderManager::save(OlapStore* store,
     return s;
 }
 
-OLAPStatus OlapHeaderManager::remove(OlapStore* store, TTabletId tablet_id, 
TSchemaHash schema_hash) {
+OLAPStatus TabletMetaManager::remove(OlapStore* store, TTabletId tablet_id, 
TSchemaHash schema_hash) {
     std::stringstream key_stream;
     key_stream << HEADER_PREFIX << tablet_id << "_" << schema_hash;
     std::string key = key_stream.str();
@@ -102,7 +102,7 @@ OLAPStatus OlapHeaderManager::remove(OlapStore* store, 
TTabletId tablet_id, TSch
     return res;
 }
 
-OLAPStatus OlapHeaderManager::get_header_converted(OlapStore* store, bool& 
flag) {
+OLAPStatus TabletMetaManager::get_header_converted(OlapStore* store, bool& 
flag) {
     // get is_header_converted flag
     std::string value;
     std::string key = IS_HEADER_CONVERTED;
@@ -119,13 +119,13 @@ OLAPStatus 
OlapHeaderManager::get_header_converted(OlapStore* store, bool& flag)
     return OLAP_SUCCESS;
 }
 
-OLAPStatus OlapHeaderManager::set_converted_flag(OlapStore* store) {
+OLAPStatus TabletMetaManager::set_converted_flag(OlapStore* store) {
     OlapMeta* meta = store->get_meta();
     OLAPStatus s = meta->put(DEFAULT_COLUMN_FAMILY_INDEX, IS_HEADER_CONVERTED, 
CONVERTED_FLAG);
     return s;
 }
 
-OLAPStatus OlapHeaderManager::traverse_headers(OlapMeta* meta,
+OLAPStatus TabletMetaManager::traverse_headers(OlapMeta* meta,
         std::function<bool(long, long, const std::string&)> const& func) {
     auto traverse_header_func = [&func](const std::string& key, const 
std::string& value) -> bool {
         std::vector<std::string> parts;
@@ -143,7 +143,7 @@ OLAPStatus OlapHeaderManager::traverse_headers(OlapMeta* 
meta,
     return status;
 }
 
-OLAPStatus OlapHeaderManager::load_json_header(OlapStore* store, const 
std::string& header_path) {
+OLAPStatus TabletMetaManager::load_json_header(OlapStore* store, const 
std::string& header_path) {
     std::ifstream infile(header_path);
     char buffer[1024];
     std::string json_header;
@@ -152,7 +152,7 @@ OLAPStatus OlapHeaderManager::load_json_header(OlapStore* 
store, const std::stri
         json_header = json_header + buffer;
     }
     boost::algorithm::trim(json_header);
-    OLAPHeader header;
+    TabletMeta header;
     bool ret = json2pb::JsonToProtoMessage(json_header, &header);
     if (!ret) {
         return OLAP_ERR_HEADER_LOAD_JSON_HEADER;
@@ -163,10 +163,10 @@ OLAPStatus OlapHeaderManager::load_json_header(OlapStore* 
store, const std::stri
     return s;
 }
 
-OLAPStatus OlapHeaderManager::dump_header(OlapStore* store, TTabletId 
tablet_id,
+OLAPStatus TabletMetaManager::dump_header(OlapStore* store, TTabletId 
tablet_id,
         TSchemaHash schema_hash, const std::string& dump_path) {
-    OLAPHeader header;
-    OLAPStatus res = OlapHeaderManager::get_header(store, tablet_id, 
schema_hash, &header);
+    TabletMeta header;
+    OLAPStatus res = TabletMetaManager::get_header(store, tablet_id, 
schema_hash, &header);
     if (res != OLAP_SUCCESS) {
         return res;
     }
diff --git a/be/src/olap/olap_header_manager.h 
b/be/src/olap/tablet_meta_manager.h
similarity index 92%
rename from be/src/olap/olap_header_manager.h
rename to be/src/olap/tablet_meta_manager.h
index 4cd40d1f..5154fb91 100644
--- a/be/src/olap/olap_header_manager.h
+++ b/be/src/olap/tablet_meta_manager.h
@@ -20,21 +20,21 @@
 
 #include <string>
 
-#include "olap/olap_header.h"
+#include "olap/tablet_meta.h"
 #include "olap/olap_define.h"
 #include "olap/store.h"
 
 namespace doris {
 
 // Helper Class for managing tablet headers of one root path.
-class OlapHeaderManager {
+class TabletMetaManager {
 public:
-    static OLAPStatus get_header(OlapStore* store, TTabletId tablet_id, 
TSchemaHash schema_hash, OLAPHeader* header);
+    static OLAPStatus get_header(OlapStore* store, TTabletId tablet_id, 
TSchemaHash schema_hash, TabletMeta* header);
 
     static OLAPStatus get_json_header(OlapStore* store, TTabletId tablet_id,
             TSchemaHash schema_hash, std::string* json_header);
 
-    static OLAPStatus save(OlapStore* store, TTabletId tablet_id, TSchemaHash 
schema_hash, const OLAPHeader* header);
+    static OLAPStatus save(OlapStore* store, TTabletId tablet_id, TSchemaHash 
schema_hash, const TabletMeta* header);
 
     static OLAPStatus remove(OlapStore* store, TTabletId tablet_id, 
TSchemaHash schema_hash);
 
diff --git a/be/src/runtime/snapshot_loader.cpp 
b/be/src/runtime/snapshot_loader.cpp
index c160732c..fc96029b 100644
--- a/be/src/runtime/snapshot_loader.cpp
+++ b/be/src/runtime/snapshot_loader.cpp
@@ -583,7 +583,7 @@ Status SnapshotLoader::move(
         hdr << snapshot_path << "/" << tablet_id << ".hdr";
         std::string snapshot_header_file = hdr.str();
     
-        OLAPHeader snapshot_header(snapshot_header_file);
+        TabletMeta snapshot_header(snapshot_header_file);
         OLAPStatus ost = snapshot_header.load_and_init();
         if (ost != OLAP_SUCCESS) {
             LOG(WARNING) << "failed to load snapshot header: " << 
snapshot_header_file;
diff --git a/be/src/tools/meta_tool.cpp b/be/src/tools/meta_tool.cpp
index 39b51ca9..35f32266 100644
--- a/be/src/tools/meta_tool.cpp
+++ b/be/src/tools/meta_tool.cpp
@@ -25,17 +25,17 @@
 
 #include "common/status.h"
 #include "olap/store.h"
-#include "olap/olap_header_manager.h"
+#include "olap/tablet_meta_manager.h"
 #include "olap/olap_define.h"
-#include "olap/olap_header.h"
+#include "olap/tablet_meta.h"
 #include "olap/olap_meta.h"
 #include "olap/utils.h"
 #include "json2pb/pb_to_json.h"
 
 using doris::OlapStore;
 using doris::OlapMeta;
-using doris::OlapHeaderManager;
-using doris::OLAPHeader;
+using doris::TabletMetaManager;
+using doris::TabletMeta;
 using doris::OLAPStatus;
 using doris::OLAP_SUCCESS;
 using doris::Status;
@@ -96,7 +96,7 @@ int main(int argc, char** argv) {
 
     if (FLAGS_operation == "get_header") {
         std::string value;
-        OLAPStatus s = OlapHeaderManager::get_json_header(store.get(), 
FLAGS_tablet_id, FLAGS_schema_hash, &value);
+        OLAPStatus s = TabletMetaManager::get_json_header(store.get(), 
FLAGS_tablet_id, FLAGS_schema_hash, &value);
         if (s == doris::OLAP_ERR_META_KEY_NOT_FOUND) {
             std::cout << "no header for tablet_id:" << FLAGS_tablet_id
                     << " schema_hash:" << FLAGS_schema_hash;
@@ -105,21 +105,21 @@ int main(int argc, char** argv) {
         std::cout << value << std::endl;
     } else if (FLAGS_operation == "flag") {
         bool converted = false;
-        OLAPStatus s = OlapHeaderManager::get_header_converted(store.get(), 
converted);
+        OLAPStatus s = TabletMetaManager::get_header_converted(store.get(), 
converted);
         if (s != OLAP_SUCCESS) {
             std::cout << "get header converted flag failed" << std::endl;
             return -1;
         }
         std::cout << "is_header_converted is " << converted << std::endl;
     } else if (FLAGS_operation == "load_header") {
-        OLAPStatus s = OlapHeaderManager::load_json_header(store.get(), 
FLAGS_json_header_path);
+        OLAPStatus s = TabletMetaManager::load_json_header(store.get(), 
FLAGS_json_header_path);
         if (s != OLAP_SUCCESS) {
             std::cout << "load header failed" << std::endl;
             return -1;
         }
         std::cout << "load header successfully" << std::endl;
     } else if (FLAGS_operation == "delete_header") {
-        OLAPStatus s = OlapHeaderManager::remove(store.get(), FLAGS_tablet_id, 
FLAGS_schema_hash);
+        OLAPStatus s = TabletMetaManager::remove(store.get(), FLAGS_tablet_id, 
FLAGS_schema_hash);
         if (s != OLAP_SUCCESS) {
             std::cout << "delete header failed for tablet_id:" << 
FLAGS_tablet_id
                     << " schema_hash:" << FLAGS_schema_hash << std::endl;
@@ -129,26 +129,26 @@ int main(int argc, char** argv) {
     } else if (FLAGS_operation == "rollback") {
         auto rollback_func = [&root_path](long tablet_id,
                 long schema_hash, const std::string& value) -> bool {
-            OLAPHeader olap_header;
-            bool parsed = olap_header.ParseFromString(value);
+            TabletMeta tablet_meta;
+            bool parsed = tablet_meta.ParseFromString(value);
             if (!parsed) {
                 std::cout << "parse header failed";
                 return true;
             }
             std::string tablet_id_str = std::to_string(tablet_id);
-            std::string schema_hash_path = root_path + "/data/" + 
std::to_string(olap_header.shard())
+            std::string schema_hash_path = root_path + "/data/" + 
std::to_string(tablet_meta.shard())
                     + "/" + tablet_id_str + "/" + std::to_string(schema_hash);
             std::string header_file_path = schema_hash_path + "/" + 
tablet_id_str + ".hdr";
             std::cout << "save header to path:" << header_file_path << 
std::endl;
-            OLAPStatus s = olap_header.save(header_file_path);
+            OLAPStatus s = tablet_meta.save(header_file_path);
             if (s != OLAP_SUCCESS) {
                 std::cout << "save header file to path:" << header_file_path 
<< " failed" << std::endl;
             }
             return true;
         };
-        OlapHeaderManager::traverse_headers(store->get_meta(), rollback_func);
+        TabletMetaManager::traverse_headers(store->get_meta(), rollback_func);
     } else if (FLAGS_operation == "show_header") {
-        OLAPHeader header(FLAGS_pb_header_path);
+        TabletMeta header(FLAGS_pb_header_path);
         OLAPStatus s = header.load_and_init();
         if (s != OLAP_SUCCESS) {
             std::cout << "load pb header file:" << FLAGS_pb_header_path << " 
failed" << std::endl;
diff --git a/be/test/agent/pusher_test.cpp b/be/test/agent/pusher_test.cpp
index c9d45e5d..ebb13939 100644
--- a/be/test/agent/pusher_test.cpp
+++ b/be/test/agent/pusher_test.cpp
@@ -60,7 +60,7 @@ TEST(PusherTest, TestInit) {
     EXPECT_EQ(DORIS_PUSH_INVALID_TABLE, ret);
 
     // not init, can get tablet, and empty remote path
-    tablet = new Tablet(new OLAPHeader("./test_data/header"), nullptr);
+    tablet = new Tablet(new TabletMeta("./test_data/header"), nullptr);
     EXPECT_CALL(mock_command_executor, get_tablet(1, 12345))
             .Times(1)
             .WillOnce(Return(std::shared_ptr<Tablet>(tablet)));
@@ -76,7 +76,7 @@ TEST(PusherTest, TestInit) {
     // not inited, remote path not empty
     string http_file_path = "http://xx";;
     string root_path_name = "./test_data/data";
-    tablet = new Tablet(new OLAPHeader("./test_data/header"), nullptr);
+    tablet = new Tablet(new TabletMeta("./test_data/header"), nullptr);
     push_req.__set_http_file_path(http_file_path);
     Pusher pusher2(nullptr, push_req);
     tmp = pusher2._engine;
diff --git a/be/test/exec/new_olap_scan_node_test.cpp 
b/be/test/exec/new_olap_scan_node_test.cpp
index f20adeea..3d4c17bb 100644
--- a/be/test/exec/new_olap_scan_node_test.cpp
+++ b/be/test/exec/new_olap_scan_node_test.cpp
@@ -75,10 +75,10 @@ class TestOlapScanNode : public testing::Test {
 
         StorageEngine::get_instance()->_lru_cache = newLRU_cache(10000);
 
-        _olap_header = new
-        
OLAPHeader("./testrun/case3/clickuserid_online_userid_type_planid_unitid_winfoid.hdr");
-        _olap_header->load();
-        tablet = new Tablet(_olap_header);
+        _tablet_meta = new
+        
TabletMeta("./testrun/case3/clickuserid_online_userid_type_planid_unitid_winfoid.hdr");
+        _tablet_meta->load();
+        tablet = new Tablet(_tablet_meta);
         tablet->load_indices();
         tablet->_root_path_name = "./testrun/case3";
 
@@ -272,7 +272,7 @@ class TestOlapScanNode : public testing::Test {
     }
 
 private:
-    OLAPHeader* _olap_header;
+    TabletMeta* _tablet_meta;
     Tablet* tablet;
 
     TPlanNode _tnode;
diff --git a/be/test/olap/CMakeLists.txt b/be/test/olap/CMakeLists.txt
index 5d169e49..3be8aea7 100644
--- a/be/test/olap/CMakeLists.txt
+++ b/be/test/olap/CMakeLists.txt
@@ -42,4 +42,4 @@ ADD_BE_TEST(skiplist_test)
 ADD_BE_TEST(delta_writer_test)
 ADD_BE_TEST(serialize_test)
 ADD_BE_TEST(olap_meta_test)
-ADD_BE_TEST(olap_header_manager_test)
+ADD_BE_TEST(tablet_meta_manager_test)
diff --git a/be/test/olap/delta_writer_test.cpp 
b/be/test/olap/delta_writer_test.cpp
index 083560eb..09301b0c 100644
--- a/be/test/olap/delta_writer_test.cpp
+++ b/be/test/olap/delta_writer_test.cpp
@@ -32,7 +32,7 @@
 #include "util/descriptor_helper.h"
 #include "util/logging.h"
 #include "olap/options.h"
-#include "olap/olap_header_manager.h"
+#include "olap/tablet_meta_manager.h"
 
 namespace doris {
 
diff --git a/be/test/olap/stream_index_test.cpp 
b/be/test/olap/stream_index_test.cpp
index f8180514..9eb74a4c 100755
--- a/be/test/olap/stream_index_test.cpp
+++ b/be/test/olap/stream_index_test.cpp
@@ -21,7 +21,7 @@
 #include "olap/olap_cond.h"
 #include "olap/olap_define.h"
 #include "olap/storage_engine.h"
-#include "olap/olap_header.h"
+#include "olap/tablet_meta.h"
 #include "olap/tablet.h"
 #include "olap/olap_common.h"
 #include "olap/row_cursor.h"
diff --git a/be/test/olap/olap_header_manager_test.cpp 
b/be/test/olap/tablet_meta_manager_test.cpp
similarity index 79%
rename from be/test/olap/olap_header_manager_test.cpp
rename to be/test/olap/tablet_meta_manager_test.cpp
index 11011dfb..c7108be6 100755
--- a/be/test/olap/olap_header_manager_test.cpp
+++ b/be/test/olap/tablet_meta_manager_test.cpp
@@ -22,7 +22,7 @@
 #include "gtest/gtest.h"
 #include "gmock/gmock.h"
 #include "olap/store.h"
-#include "olap/olap_header_manager.h"
+#include "olap/tablet_meta_manager.h"
 #include "olap/olap_define.h"
 #include "boost/filesystem.hpp"
 #include "json2pb/json_to_pb.h"
@@ -40,7 +40,7 @@ namespace doris {
 
 const std::string header_path = "./be/test/olap/test_data/header.txt";
 
-class OlapHeaderManagerTest : public testing::Test {
+class TabletMetaManagerTest : public testing::Test {
 public:
     virtual void SetUp() {
         std::string root_path = "./store";
@@ -72,42 +72,42 @@ class OlapHeaderManagerTest : public testing::Test {
     std::string _json_header;
 };
 
-TEST_F(OlapHeaderManagerTest, TestConvertedFlag) {
+TEST_F(TabletMetaManagerTest, TestConvertedFlag) {
     bool converted_flag;
-    OLAPStatus s = OlapHeaderManager::get_header_converted(_store, 
converted_flag);
+    OLAPStatus s = TabletMetaManager::get_header_converted(_store, 
converted_flag);
     ASSERT_EQ(false, converted_flag);
-    s = OlapHeaderManager::set_converted_flag(_store);
+    s = TabletMetaManager::set_converted_flag(_store);
     ASSERT_EQ(OLAP_SUCCESS, s);
-    s = OlapHeaderManager::get_header_converted(_store, converted_flag);
+    s = TabletMetaManager::get_header_converted(_store, converted_flag);
     ASSERT_EQ(true, converted_flag);
 }
 
-TEST_F(OlapHeaderManagerTest, TestSaveAndGetAndRemove) {
+TEST_F(TabletMetaManagerTest, TestSaveAndGetAndRemove) {
     const TTabletId tablet_id = 20487;
     const TSchemaHash schema_hash = 1520686811;
-    OLAPHeader header;
+    TabletMeta header;
     bool ret = json2pb::JsonToProtoMessage(_json_header, &header);
     ASSERT_TRUE(ret);
-    OLAPStatus s = OlapHeaderManager::save(_store, tablet_id, schema_hash, 
&header);
+    OLAPStatus s = TabletMetaManager::save(_store, tablet_id, schema_hash, 
&header);
     ASSERT_EQ(OLAP_SUCCESS, s);
     std::string json_header_read;
-    s = OlapHeaderManager::get_json_header(_store, tablet_id, schema_hash, 
&json_header_read);
+    s = TabletMetaManager::get_json_header(_store, tablet_id, schema_hash, 
&json_header_read);
     ASSERT_EQ(OLAP_SUCCESS, s);
     ASSERT_EQ(_json_header, json_header_read);
-    s = OlapHeaderManager::remove(_store, tablet_id, schema_hash);
+    s = TabletMetaManager::remove(_store, tablet_id, schema_hash);
     ASSERT_EQ(OLAP_SUCCESS, s);
-    OLAPHeader header_read;
-    s = OlapHeaderManager::get_header(_store, tablet_id, schema_hash, 
&header_read);
+    TabletMeta header_read;
+    s = TabletMetaManager::get_header(_store, tablet_id, schema_hash, 
&header_read);
     ASSERT_EQ(OLAP_ERR_META_KEY_NOT_FOUND, s);
 }
 
-TEST_F(OlapHeaderManagerTest, TestLoad) {
+TEST_F(TabletMetaManagerTest, TestLoad) {
     const TTabletId tablet_id = 20487;
     const TSchemaHash schema_hash = 1520686811;
-    OLAPStatus s = OlapHeaderManager::load_json_header(_store, header_path);
+    OLAPStatus s = TabletMetaManager::load_json_header(_store, header_path);
     ASSERT_EQ(OLAP_SUCCESS, s);
     std::string json_header_read;
-    s = OlapHeaderManager::get_json_header(_store, tablet_id, schema_hash, 
&json_header_read);
+    s = TabletMetaManager::get_json_header(_store, tablet_id, schema_hash, 
&json_header_read);
     ASSERT_EQ(OLAP_SUCCESS, s);
     ASSERT_EQ(_json_header, json_header_read);
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to