Skip to content

Conversation

@kangpinghuang
Copy link
Contributor

No description provided.

root_path = path_prefix + root_path_postfix;
void load_meta(DataDir *data_dir) {
// load json tablet meta into meta
OLAPStatus s = TabletMetaManager::load_json_header(data_dir, FLAGS_json_meta_path);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load_json_meta

}
void get_meta(DataDir *data_dir) {
std::string value;
OLAPStatus s = TabletMetaManager::get_json_header(data_dir, FLAGS_tablet_id, FLAGS_schema_hash, &value);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_json_meta

doris::TabletMetaPB tablet_meta_pb;
tablet_meta.to_meta_pb(&tablet_meta_pb);
json2pb::ProtoMessageToJson(tablet_meta_pb, &json_meta, json_options);
std::cout << "tablet meta:" << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is not necessary.

tablet_meta_pb.SerializeToString(&meta_binary);
TTabletId tablet_id = tablet_meta_pb.tablet_id();
TSchemaHash schema_hash = tablet_meta_pb.schema_hash();
std::cout << "start to save meta" << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant line


int main(int argc, char** argv) {
google::ParseCommandLineFlags(&argc, &argv, true);
void show_meta() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what case need show_meta?
It seems that hdr exist?

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const std::string&

@chaoyli chaoyli merged commit c8da5e1 into apache:be_refactor Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants