MCPcopy Create free account
hub / github.com/baidu/tera / CopyTableMetaToUser

Method CopyTableMetaToUser

src/master/master_impl.cc:958–969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

956}
957
958void MasterImpl::CopyTableMetaToUser(TablePtr table, TableMeta *meta_ptr) {
959 TableSchema old_schema;
960 if (table->GetOldSchema(&old_schema)) {
961 TableMeta meta;
962 table->ToMeta(&meta);
963 meta.mutable_schema()->CopyFrom(old_schema);
964 meta_ptr->CopyFrom(meta);
965 } else {
966 table->ToMeta(meta_ptr);
967 }
968 meta_ptr->set_create_time(table->CreateTime() / 1000000);
969}
970
971void MasterImpl::ShowTables(const ShowTablesRequest *request, ShowTablesResponse *response,
972 google::protobuf::Closure *done) {

Callers

nothing calls this directly

Calls 3

GetOldSchemaMethod · 0.80
ToMetaMethod · 0.80
CreateTimeMethod · 0.45

Tested by

no test coverage detected