ddanielr commented on code in PR #5934:
URL: https://github.com/apache/accumulo/pull/5934#discussion_r2383720775
##########
server/base/src/main/java/org/apache/accumulo/server/util/Admin.java:
##########
@@ -537,8 +527,8 @@ public void execute(final String[] args) {
} else if (cl.getParsedCommand().equals("restoreZoo")) {
RestoreZookeeper.execute(conf, restoreZooOpts.file,
restoreZooOpts.overwrite);
} else if (cl.getParsedCommand().equals("locks")) {
- TabletServerLocks.execute(context, args.length > 2 ? args[2] : null,
- tServerLocksOpts.delete);
+ System.out.println("'locks' command has been removed. Use
'serviceStatus' command"
+ + " to list processes and 'stop -f' command to remove their
locks.");
Review Comment:
Locks is no longer a valid command name so the parse operation will throw an
error before this log message is ever displayed
```
./accumulo admin locks
Thread 'admin' died.
com.beust.jcommander.MissingCommandException: Expected a command, got locks
at com.beust.jcommander.JCommander.parseValues(JCommander.java:795)
at com.beust.jcommander.JCommander.parse(JCommander.java:363)
at com.beust.jcommander.JCommander.parse(JCommander.java:342)
at org.apache.accumulo.server.util.Admin.execute(Admin.java:480)
at org.apache.accumulo.start.Main.lambda$execKeyword$0(Main.java:81)
at java.base/java.lang.Thread.run(Thread.java:840)
```
The entire `else if` section could be dropped, or we would need to add the
command back in just to have it print this log message.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]