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

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


The following commit(s) were added to refs/heads/2.1 by this push:
     new c1ce4c75e4 fixes accumulo-cluster bug with starting multiple 
compactors (#5444)
c1ce4c75e4 is described below

commit c1ce4c75e48ebebd2dedb17efba16c18977be253
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Thu Apr 3 13:09:23 2025 -0400

    fixes accumulo-cluster bug with starting multiple compactors (#5444)
    
    The parse_config function was dynamically creating variables that were
    scoped to the function. When the code attempted to read these variables
    in the execute_command command function it did not find them. This
    caused the script to only start one compactor per host even if multiple
    were configured. Added -g to declare builtin to make the variables
    global.
---
 assemble/bin/accumulo-cluster | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/assemble/bin/accumulo-cluster b/assemble/bin/accumulo-cluster
index 1393bd5a17..addfa1417c 100755
--- a/assemble/bin/accumulo-cluster
+++ b/assemble/bin/accumulo-cluster
@@ -361,17 +361,17 @@ function parse_config() {
   for group in $SSERVER_GROUPS; do
     var_name="NUM_SSERVERS_$group"
     if [[ -n ${!var_name} ]]; then
-      declare "SSERVERS_PER_HOST_$group"="${!var_name}"
+      declare -g "SSERVERS_PER_HOST_$group"="${!var_name}"
     else
-      declare "SSERVERS_PER_HOST_$group"="${NUM_SSERVERS:-1}"
+      declare -g "SSERVERS_PER_HOST_$group"="${NUM_SSERVERS:-1}"
     fi
   done
   for group in $COMPACTOR_GROUPS; do
     var_name="NUM_COMPACTORS_$group"
     if [[ -n ${!var_name} ]]; then
-      declare "COMPACTORS_PER_HOST_$group"="${!var_name}"
+      declare -g "COMPACTORS_PER_HOST_$group"="${!var_name}"
     else
-      declare "COMPACTORS_PER_HOST_$group"="${NUM_COMPACTORS:-1}"
+      declare -g "COMPACTORS_PER_HOST_$group"="${NUM_COMPACTORS:-1}"
     fi
   done
 

Reply via email to