提交 21e986d1 编写于 作者: C Cai Yudong 提交者: Jin Hai

support config cli (#742)

* #665 support get/set config via CLI

* #665 support get/set config via CLI

* #665 add unittest for config CLI

* #665 remove config_node_map_

* #665 remove config_node_map_

* #665 fix clang-format

* #665 fix clang-format

* #665 update changelog

* #665 code clean

* #665 update API interface

* #665 update API interface

* #665 handle server status

* #665 handle unknown command

* #665 update debug log

* #665 support get/set config via CLI

* #665 support get/set config via CLI

* #665 add unittest for config CLI

* #665 remove config_node_map_

* #665 remove config_node_map_

* #665 fix clang-format

* #665 fix clang-format

* #665 update changelog

* #665 code clean

* #665 update API interface

* #665 update API interface

* #665 handle server status

* #665 handle unknown command

* #665 update debug log
上级 41d7500f
......@@ -38,9 +38,12 @@ Status
CmdRequest::OnExecute() {
std::string hdr = "CmdRequest(cmd=" + cmd_ + ")";
TimeRecorderAuto rc(hdr);
Status stat = Status::OK();
if (cmd_ == "version") {
result_ = MILVUS_VERSION;
} else if (cmd_ == "status") {
result_ = "OK";
} else if (cmd_ == "tasktable") {
result_ = scheduler::ResMgrInst::GetInstance()->DumpTaskTables();
} else if (cmd_ == "mode") {
......@@ -49,11 +52,14 @@ CmdRequest::OnExecute() {
#else
result_ = "CPU";
#endif
} else if (cmd_.substr(0, 3) == "set" || cmd_.substr(0, 3) == "get") {
server::Config& config = server::Config::GetInstance();
stat = config.HandleConfigCli(result_, cmd_);
} else {
result_ = "OK";
result_ = "Unknown command";
}
return Status::OK();
return stat;
}
} // namespace server
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册