keith-turner commented on code in PR #5072:
URL: https://github.com/apache/accumulo/pull/5072#discussion_r1855222176


##########
shell/src/main/java/org/apache/accumulo/shell/commands/ListCompactionsCommand.java:
##########
@@ -85,11 +92,21 @@ public Options getOptions() {
     filterOption = new Option("f", "filter", true, "show only compactions that 
match the regex");
     opts.addOption(filterOption);
 
-    tserverOption = new Option("ts", "tabletServer", true,
-        "tablet server or compactor to list compactions for");
+    serverOpt = new Option("s", "server", true, "tablet/scan server regex to 
list compactions for");
+    serverOpt.setArgName("tablet/scan server regex");
+    opts.addOption(serverOpt);
+
+    // Leaving here for backwards compatibility, same as serverOpt
+    tserverOption =
+        new Option("ts", "tabletServer", true, "tablet/scan server regex to 
list compactions forr");

Review Comment:
   ```suggestion
           new Option("ts", "tabletServer", true, "tablet/scan server regex to 
list compactions for");
   ```



##########
shell/src/main/java/org/apache/accumulo/shell/commands/ListScansCommand.java:
##########
@@ -75,14 +79,36 @@ public int numArgs() {
   public Options getOptions() {
     final Options opts = new Options();
 
-    tserverOption = new Option("ts", "tabletServer", true, "tablet server to 
list scans for");
+    serverOpt = new Option("s", "server", true, "tablet/scan server regex to 
list scans for");

Review Comment:
   ```suggestion
       serverOpt = new Option("s", "server", true, "tablet/scan server regex to 
list scans for.  Regex will match against strings like <host>:<port>");
   ```



##########
shell/src/main/java/org/apache/accumulo/shell/commands/ListCompactionsCommand.java:
##########
@@ -85,11 +92,21 @@ public Options getOptions() {
     filterOption = new Option("f", "filter", true, "show only compactions that 
match the regex");
     opts.addOption(filterOption);
 
-    tserverOption = new Option("ts", "tabletServer", true,
-        "tablet server or compactor to list compactions for");
+    serverOpt = new Option("s", "server", true, "tablet/scan server regex to 
list compactions for");
+    serverOpt.setArgName("tablet/scan server regex");

Review Comment:
   This should mention compactor instead of scan server.



##########
core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java:
##########
@@ -312,6 +313,20 @@ List<ActiveCompaction> getActiveCompactions(ServerId 
server)
    */
   List<ActiveCompaction> getActiveCompactions() throws AccumuloException, 
AccumuloSecurityException;
 
+  /**
+   * List the active compaction running on a collection of TabletServers or 
Compactors. The server
+   * addresses can be retrieved using {@link #getCompactors()} or {@link 
#getTabletServers()}. Use

Review Comment:
   The getCompactors and getTabletServers methods are deprecated, should point 
to the new getServers methods in the javadoc.



##########
shell/src/main/java/org/apache/accumulo/shell/commands/ListScansCommand.java:
##########
@@ -49,13 +51,15 @@ public int execute(final String fullCommand, final 
CommandLine cl, final Shell s
     final boolean paginate = !cl.hasOption(disablePaginationOpt.getOpt());
     final Set<ServerId> servers = new HashSet<>();
 
-    if (cl.hasOption(tserverOption.getOpt())) {
-      String serverAddress = cl.getOptionValue(tserverOption.getOpt());
-      final HostAndPort hp = HostAndPort.fromString(serverAddress);
+    String serverValue =

Review Comment:
   Could throw an exception if server opt and tserver opt are set.



##########
shell/src/main/java/org/apache/accumulo/shell/commands/ListCompactionsCommand.java:
##########
@@ -85,11 +92,21 @@ public Options getOptions() {
     filterOption = new Option("f", "filter", true, "show only compactions that 
match the regex");
     opts.addOption(filterOption);
 
-    tserverOption = new Option("ts", "tabletServer", true,
-        "tablet server or compactor to list compactions for");
+    serverOpt = new Option("s", "server", true, "tablet/scan server regex to 
list compactions for");
+    serverOpt.setArgName("tablet/scan server regex");
+    opts.addOption(serverOpt);
+
+    // Leaving here for backwards compatibility, same as serverOpt
+    tserverOption =
+        new Option("ts", "tabletServer", true, "tablet/scan server regex to 
list compactions forr");
     tserverOption.setArgName("tablet server");
     opts.addOption(tserverOption);
 
+    rgOpt = new Option("rg", "resourceGroup", true,
+        "tablet/scan server resource group regex to list compactions for");

Review Comment:
   Should mention compactor instead of scan server



-- 
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]

Reply via email to