chaoyli commented on a change in pull request #1337: Be refactor optimize meta
tool new
URL: https://github.com/apache/incubator-doris/pull/1337#discussion_r295267033
##########
File path: be/src/tools/meta_tool.cpp
##########
@@ -29,144 +28,143 @@
#include "olap/tablet_meta_manager.h"
#include "olap/olap_define.h"
#include "olap/tablet_meta.h"
-#include "olap/olap_meta.h"
#include "olap/utils.h"
#include "json2pb/pb_to_json.h"
+using boost::filesystem::canonical;
+using boost::filesystem::path;
using doris::DataDir;
+using doris::OLAP_SUCCESS;
using doris::OlapMeta;
-using doris::TabletMetaManager;
-using doris::TabletMeta;
using doris::OLAPStatus;
-using doris::OLAP_SUCCESS;
using doris::Status;
+using doris::TabletMeta;
+using doris::TabletMetaManager;
-const std::string HEADER_PREFIX = "hdr_";
+const std::string HEADER_PREFIX = "tabletmeta_";
-DEFINE_string(root_path, "./", "storage root path");
-DEFINE_string(operation, "get_header",
- "valid operation: get_header, flag, load_header, delete_header,
rollback, show_header");
-DEFINE_int64(tablet_id, 0, "tablet_id for header operation");
-DEFINE_int32(schema_hash, 0, "schema_hash for header operation");
-DEFINE_string(json_header_path, "", "json header file path");
-DEFINE_string(pb_header_path, "", "pb header file path");
+DEFINE_string(root_path, "", "storage root path");
+DEFINE_string(operation, "get_meta",
+ "valid operation: get_meta, flag, load_meta, delete_meta,
show_meta");
+DEFINE_int64(tablet_id, 0, "tablet_id for tablet meta");
+DEFINE_int32(schema_hash, 0, "schema_hash for tablet meta");
+DEFINE_string(json_meta_path, "", "absolute json meta file path");
+DEFINE_string(pb_meta_path, "", "pb meta file path");
-void print_usage(std::string progname) {
- std::cout << progname << " is the Doris File tool." << std::endl;
- std::cout << "Usage:" << std::endl;
- std::cout << "./meta_tool --operation=get_header --tablet_id=tabletid
--schema_hash=schemahash" << std::endl;
- std::cout << "./meta_tool --operation=flag" << std::endl;
- std::cout << "./meta_tool --operation=load_header --json_header_path=path"
<< std::endl;
- std::cout << "./meta_tool --operation=delete_header --tablet_id=tabletid
--schema_hash=schemahash" << std::endl;
- std::cout << "./meta_tool --root_path=rootpath --operation=rollback" <<
std::endl;
- std::cout << "./meta_tool --operation=show_header --pb_header_path=path"
<< std::endl;
+std::string get_usage(std::string progname) {
Review comment:
const std::string&
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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]