ddanielr commented on code in PR #5116:
URL: https://github.com/apache/accumulo/pull/5116#discussion_r1871965308


##########
assemble/bin/accumulo-cluster:
##########
@@ -632,22 +467,16 @@ function main() {
   accumulo_cmd="${bin}/accumulo"
   SSH='ssh -qnf -o ConnectTimeout=2'
 
-  # Copy input arguments into new array
-  # removing any options
-  DEBUG=0
-  i=0
-  declare -a program_args
-  for arg in "$@"; do
-    if [[ $arg == "--dry-run" ]]; then
-      DEBUG=1
-    else
-      program_args[i++]="$arg"
-    fi
-  done
+  cmd="$1"
+  shift
+  parse_args "$@"
 
-  debug "debug: ${DEBUG} args: ${program_args[*]}"
+  localhost_names=("localhost" "127.0.0.1" "$(hostname)" "$(hostname -a 
2>/dev/null | head -1)" "$(hostname -s)" "$(hostname -f)")
+  read -r -a localhost_interfaces <<<"$(hostname -I)"
+  LOCAL_HOST_ADDRESSES+=("${localhost_names[@]}" "${localhost_interfaces[@]}")
+  debug "${LOCAL_HOST_ADDRESSES[*]}"

Review Comment:
   > @ctubbsii made a suggestion to just remove the localhost handling and 
always `ssh` to the host, even if it's the localhost. That would simplify the 
script to be sure, with the small performance penalty of using `ssh` locally. 
It would require that password-less `ssh` be set up correctly on the host, but 
I think that's already a prerequisite for Hadoop. Thoughts on that?
   
   I think that's fine for the `start`& `stop` behavior cluster wide behavior 
if that's already a requirement for hadoop.
   
    Would that be used in conjunction with `ACCUMULO_LOCALHOST_ADDRESSES` var 
for determining the `stop-here` `start-here` target?
   
   



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