8000 Add ChangeLogLevel subcommand by visualYJD · Pull Request #1309 · dingodb/dingo-store · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add ChangeLogLevel subcommand #1309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/client_v2/coordinator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ void SetUpCoordinatorSubCommands(CLI::App &app) {
SetUpGetRegionMap(app);
SetUpGetJobList(app);
SetUpCleanJobList(app);
SetUpChangeLogLevel(app);
// region commands
SetUpAddPeerRegion(app);
SetUpRemovePeerRegion(app);
Expand All @@ -60,7 +61,6 @@ void SetUpCoordinatorSubCommands(CLI::App &app) {

// balance
SetUpEnableOrDisableBalance(app);

}

bool GetBrpcChannel(const std::string &location, brpc::Channel &channel) {
Expand Down Expand Up @@ -612,9 +612,9 @@ void RunChangeLogLevel(GetChangeLogLevelOption const &opt) {
DINGO_LOG(WARNING) << "Fail to send request to : " << cntl.ErrorText();
}

DINGO_LOG(INFO) << request.DebugString();
DINGO_LOG(INFO) << ::dingodb::pb::node::LogLevel_descriptor()->FindValueByNumber(request.log_level())->name();
DINGO_LOG(INFO) << response.DebugString();
std::cout << request.DebugString() << std::endl;
std::cout << ::dingodb::pb::node::LogLevel_descriptor()->FindValueByNumber(request.log_level())->name() << std::endl;
std::cout << response.DebugString() << std::endl;
}

void SetUpHello(CLI::App &app) {
Expand Down Expand Up @@ -2791,9 +2791,11 @@ void SetUpEnableOrDisableBalance(CLI::App &app) {
auto opt = std::make_shared<EnableOrDisableBalanceOptions>();
auto *cmd = app.add_subcommand("DisableBalance", "DisableBalance ")->group("Coordinator Command");
cmd->add_option("--coor_url", opt->coor_url, "Coordinator url, default:file://./coor_list");
cmd->add_option("--balance_leader", opt->enable_balance_leader, "Request parameter enable_balance_leader true or false")
cmd->add_option("--balance_leader", opt->enable_balance_leader,
"Request parameter enable_balance_leader true or false")
->required();
cmd->add_option("--balance_region", opt->enable_balance_region, "Request parameter enable_balance_region true or false")
cmd->add_option("--balance_region", opt->enable_balance_region,
"Request parameter enable_balance_region true or false")
->required();
cmd->callback([opt]() { RunEnableOrDisableBalance(*opt); });
}
Expand Down
4 changes: 2 additions & 2 deletions src/client_v2/pretty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ void ShowTxnTableData(const dingodb::pb::debug::DumpRegionResponse::Txn& txn,
for (int i = 0; i < record.size(); ++i) {
const auto& column_definition = table_definition.columns().at(i);
if (!IsExcludeColumns(column_definition.name(), exclude_columns)) {
std::string column_value = dingodb::Helper::ConvertColumnValueToString(column_definition, record[i]);
std::string column_value = dingodb::Helper::ConvertColumnValueToStringV2(column_definition, record[i]);
row.push_back(ftxui::paragraph(TruncateString(column_value)));
}
}
Expand Down Expand Up @@ -354,7 +354,7 @@ static std::vector<std::pair<std::string, std::string>> ParseRecord(

result.push_back(
std::make_pair(column_definition.name(),
TruncateString(dingodb::Helper::ConvertColumnValueToString(column_definition, values[i]))));
TruncateString(dingodb::Helper::ConvertColumnValueToStringV2(column_definition, values[i]))));
}

return result;
Expand Down
Loading
0