| 29 | namespace master { |
| 30 | |
| 31 | static std::string GetNameFromPath(const std::string& path) { |
| 32 | if (path == FLAGS_tera_master_meta_table_path) { |
| 33 | return FLAGS_tera_master_meta_table_name; |
| 34 | } |
| 35 | std::vector<std::string> t; |
| 36 | SplitString(path, "/", &t); // table_name/tablet00...001 |
| 37 | if (!t.empty()) { |
| 38 | return t[0]; |
| 39 | } else { |
| 40 | return ""; |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | TabletAvailability::TabletAvailability(std::shared_ptr<TabletManager> t) : tablet_manager_(t) { |
| 45 | start_ts_ = get_micros(); |
no test coverage detected