This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new 02f8858bad Deprecated the usage of hostnames in StopCommand (#5812)
02f8858bad is described below

commit 02f8858bad9a67cc50465bb00e1dd8fcfe8f9af4
Author: Arbaaz Khan <[email protected]>
AuthorDate: Tue Sep 2 16:07:20 2025 -0400

    Deprecated the usage of hostnames in StopCommand (#5812)
---
 .../main/java/org/apache/accumulo/server/util/Admin.java  | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java 
b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
index c6ad5e2d53..b89c3e2069 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
@@ -134,7 +134,7 @@ public class Admin implements KeywordExecutable {
   }
 
   @Parameters(
-      commandDescription = "Stop the servers at the given addresses allowing 
them to complete current task but not start new task.  When no port is 
specified uses ports from tserver.port.client property.")
+      commandDescription = "Stop the servers at the given addresses allowing 
them to complete current task but not start new task.  Hostnames only are no 
longer supported; you must use <host:port>. To Stop all services on a host, use 
'accumulo admin serviceStatus' to list all hosts and then pass them to this 
command.")
   static class StopCommand extends SubCommandOpts {
     @Parameter(names = {"-f", "--force"},
         description = "force the given server to stop immediately by removing 
its lock.  Does not wait for any task the server is currently working.")
@@ -675,6 +675,9 @@ public class Admin implements KeywordExecutable {
 
     if (!hostOnly.isEmpty()) {
       // The old impl of this command with the old behavior
+      log.warn("Stopping by hostname is no longer supported\n\n"
+          + "please use <host:port> instead.\n"
+          + "To stop all services on host, run 'accumulo admin serviceStatus' 
to list all host:port values and filter for that host and pass those to 
'accumulo admin stop'");
       stopTabletServer(context, hostOnly, force);
     }
 
@@ -736,6 +739,16 @@ public class Admin implements KeywordExecutable {
     }
   }
 
+  /**
+   * Stops tablet servers by hostname
+   *
+   * @param context The server context
+   * @param servers LIst of hostnames (without ports)
+   * @param force Whether to force stop
+   * @deprecated Use servers with host:port format instead. To stop all 
services on a host use
+   *             service status command to liat all services, then stop them 
with host:port format.
+   */
+  @Deprecated(since = "4.0.0")
   private static void stopTabletServer(final ClientContext context, 
List<String> servers,
       final boolean force) throws AccumuloException, AccumuloSecurityException 
{
     if 
(context.instanceOperations().getServers(ServerId.Type.MANAGER).isEmpty()) {

Reply via email to