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

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


The following commit(s) were added to refs/heads/3.1 by this push:
     new 8bac964fba Updates overrides option description, with example usage 
(#5322)
8bac964fba is described below

commit 8bac964fbad0881f2e7f5ba85476aaa4bc1adc3a
Author: Dave Marion <dlmar...@apache.org>
AuthorDate: Thu Feb 13 10:08:55 2025 -0500

    Updates overrides option description, with example usage (#5322)
    
    Closes #4976
---
 core/src/main/java/org/apache/accumulo/core/cli/ConfigOpts.java  | 5 ++++-
 .../test/java/org/apache/accumulo/core/cli/ConfigOptsTest.java   | 9 +++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/accumulo/core/cli/ConfigOpts.java 
b/core/src/main/java/org/apache/accumulo/core/cli/ConfigOpts.java
index 94de245b71..ccb43162eb 100644
--- a/core/src/main/java/org/apache/accumulo/core/cli/ConfigOpts.java
+++ b/core/src/main/java/org/apache/accumulo/core/cli/ConfigOpts.java
@@ -56,7 +56,10 @@ public class ConfigOpts extends Help {
 
   @Parameter(names = "-o", splitter = NullSplitter.class,
       description = "Overrides configuration set in accumulo.properties (but 
NOT system-wide config"
-          + " set in Zookeeper). Expected format: -o <key>=<value>")
+          + " set in Zookeeper). This is useful when you have process specific 
configuration items"
+          + " that are one-offs from a shared common configuration. Setting 
the bind address,"
+          + " for example, can be done with the arguments \"-o 
general.process.bind.addr=127.0.0.1\"."
+          + " Expected format: -o <key>=<value> [-o <key>=<value>]")
   private List<String> overrides = new ArrayList<>();
 
   private SiteConfiguration siteConfig = null;
diff --git 
a/core/src/test/java/org/apache/accumulo/core/cli/ConfigOptsTest.java 
b/core/src/test/java/org/apache/accumulo/core/cli/ConfigOptsTest.java
index b5a38dec3b..8e0b7b7c47 100644
--- a/core/src/test/java/org/apache/accumulo/core/cli/ConfigOptsTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/cli/ConfigOptsTest.java
@@ -56,4 +56,13 @@ public class ConfigOptsTest {
     assertEquals("test:123", 
opts.getSiteConfiguration().get(Property.INSTANCE_ZK_HOST));
   }
 
+  @Test
+  public void testOverrideMultiple() {
+    opts.parseArgs(ConfigOptsTest.class.getName(),
+        new String[] {"-o", Property.GENERAL_PROCESS_BIND_ADDRESS.getKey() + 
"=1.2.3.4", "-o",
+            Property.COMPACTOR_QUEUE_NAME.getKey() + "=test"});
+    assertEquals("1.2.3.4", 
opts.getSiteConfiguration().get(Property.GENERAL_PROCESS_BIND_ADDRESS));
+    assertEquals("test", 
opts.getSiteConfiguration().get(Property.COMPACTOR_QUEUE_NAME));
+  }
+
 }

Reply via email to