tools/scylla-nodetool: implement the move command

In the java nodetool, this command ends up calling an API endpoint which
just throws an exception saying moving tokens is not supported. So in
the native implementation we just throw an exception to the same effect
in scylla-nodetool itself.
This commit is contained in:
Botond Dénes
2023-12-08 08:29:39 -05:00
parent 58d3850da1
commit ad148a9dbc

View File

@@ -491,6 +491,10 @@ void listsnapshots_operation(scylla_rest_client& client, const bpo::variables_ma
fmt::print(std::cout, "\nTotal TrueDiskSpaceUsed: {}\n\n", format_hr_size(utils::to_hr_size(true_size)));
}
void move_operation(scylla_rest_client& client, const bpo::variables_map& vm) {
throw std::invalid_argument("This operation is not supported");
}
void help_operation(const tool_app_template::config& cfg, const bpo::variables_map& vm) {
if (vm.count("command")) {
const auto command = vm["command"].as<sstring>();
@@ -1018,6 +1022,20 @@ Fore more information, see: https://opensource.docs.scylladb.com/stable/operatin
},
listsnapshots_operation
},
{
{
"move",
"Move the token to this node",
R"(
This operation is not supported.
)",
{ },
{
typed_option<sstring>("new-token", "The new token to move to this node", 1),
},
},
move_operation
},
{
{
"rebuild",