keith-turner commented on a change in pull request #2238:
URL: https://github.com/apache/accumulo/pull/2238#discussion_r700381491



##########
File path: assemble/bin/accumulo-cluster
##########
@@ -147,84 +164,128 @@ function start_all() {
     start_tservers
   fi
 
-  grep -Ev '(^#|^\s*$)' "${conf}/$manager_file" | while read -r host; do
-    start_service "$host" manager
+  for manager in $MANAGER_HOSTS; do
+    start_service "$manager" manager
+  done
+
+  for gc in $GC_HOSTS; do
+    start_service "$gc" gc
   done
 
-  grep -Ev '(^#|^\s*$)' "${conf}/gc" | while read -r host; do
-    start_service "$host" gc
+  for monitor in $MONITOR_HOSTS; do
+    start_service "$monitor" monitor
   done
 
-  grep -Ev '(^#|^\s*$)' "${conf}/tracers" | while read -r host; do
-    start_service "$host" tracer
+  for tracer in $TRACER_HOSTS; do
+    start_service "$tracer" tracer
+  done
+
+  for coordinator in $COORDINATOR_HOSTS; do
+    start_service "$coordinator" compaction-coordinator
+  done
+
+  for queue in $COMPACTION_QUEUES; do
+    Q="COMPACTOR_HOSTS_${queue}"
+    for compactor in "${!Q}"; do
+      start_service "$compactor" compactor "-q" "$queue"
+    done
   done
 
-  start_service "$monitor" monitor
 }
 
 function start_here() {
 
   local_hosts="$(hostname -a 2> /dev/null) $(hostname) localhost 127.0.0.1 
$(get_ip)"
+
   for host in $local_hosts; do
-    if grep -q "^${host}\$" "${conf}/tservers"; then
-      start_service "$host" tserver
-      break
-    fi
+    for tserver in $TSERVER_HOSTS; do
+      if echo "$tserver" | grep -q "^${host}\$"; then
+        start_service "$host" tserver
+        break
+      fi
+    done
   done
 
   for host in $local_hosts; do
-    if grep -q "^${host}\$" "${conf}/$manager_file"; then
-      start_service "$host" manager
-      break
-    fi
+    for manager in $MANAGER_HOSTS; do
+      if echo "$manager" | grep -q "^${host}\$"; then
+        start_service "$host" manager
+        break
+      fi
+    done
   done
 
   for host in $local_hosts; do
-    if grep -q "^${host}\$" "${conf}/gc"; then
-      start_service "$host" gc
-      break
-    fi
+    for gc in $GC_HOSTS; do
+      if echo "$gc" | grep -q "^${host}\$"; then
+        start_service "$host" gc
+        break
+      fi
+    done
   done
 
   for host in $local_hosts; do
-    if [[ "$host" == "$monitor" ]]; then
-      start_service "$host" monitor
-      break
-    fi
+    for monitor in $MONITOR_HOSTS; do
+      if echo "$monitor" | grep -q "^${host}\$"; then
+        start_service "$host" monitor
+        break
+      fi
+    done
   done
 
   for host in $local_hosts; do
-    if grep -q "^${host}\$" "${conf}/tracers"; then
-      start_service "$host" tracer
-      break
-    fi
+    for tracer in $TRACER_HOSTS; do
+      if echo "$tracer" | grep -q "^${host}\$"; then
+        start_service "$host" tracer
+        break
+      fi
+    done
   done
+
+  for host in $local_hosts; do
+    for coordinator in $COORDINATOR_HOSTS; do
+      if echo "$coordinator" | grep -q "^${host}\$"; then
+        start_service "$coordinator" compaction-coordinator
+      fi
+    done
+  done
+
+  for queue in $COMPACTION_QUEUES; do
+    for host in $local_hosts; do
+      Q="COMPACTOR_HOSTS_${queue}"
+      for compactor in "${!Q}"; do

Review comment:
       Thanks a bunch for the explanation @dlmarion.  




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