Skip to content

[curve/toos-v2]: add client-status #2345

Closed
@Cyber-SiKu

Description

@Cyber-SiKu

Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)

we'd like to support bs status client command in curve tool

  • The implementation of the old tool is here:
    int StatusTool::PrintClientStatus() {
    std::cout << "Client status: " << std::endl;
    ClientVersionMapType versionMap;
    int res = versionTool_->GetClientVersion(&versionMap);
    if (res != 0) {
    std::cout << "GetClientVersion fail" << std::endl;
    return -1;
    }
    for (const auto& item : versionMap) {
    std::cout << item.first << ": ";
    bool first = true;
    for (const auto& item2 : item.second) {
    if (!first) {
    std::cout << ", ";
    }
    std::cout << "version-" << item2.first << ": "
    << item2.second.size();
    first = false;
    }
    std::cout << std::endl;
    if (FLAGS_detail) {
    std::cout << "version map: " << std::endl;
    versionTool_->PrintVersionMap(item.second);
    }
    }
    return 0;
    }
  • The old command input and out put:
curve_ops_tool client-status --detail

-------
output:
Client status: 
nebd-server: ***: ***
version map: 
***: {***:***}

Refer to tool develop guide to get start, and paste the result of the command in pr.

Build compilation environment:https://github.com/opencurve/curve/blob/master/docs/cn/build_and_run.md

Describe the solution you'd like (描述你期望的解决方法)

Add subcommand clinet to curve bs list.

Describe alternatives you've considered (描述你想到的折衷方案)

Additional context/screenshots (更多上下文/截图)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions