[GitHub] [accumulo] keith-turner commented on a change in pull request #1568: Support multiple tservers / node in accumulo-service

2020-03-27 Thread GitBox
keith-turner commented on a change in pull request #1568: Support multiple 
tservers / node in accumulo-service
URL: https://github.com/apache/accumulo/pull/1568#discussion_r399562448
 
 

 ##
 File path: assemble/bin/accumulo-cluster
 ##
 @@ -100,15 +100,45 @@ function get_ip() {
   echo "$ip_addr"
 }
 
+function set_last_instance_id() {
+  if [[ "$service" == "tserver" ]]; then
+last_instance_id=${NUM_TSERVERS:-1}
+  else
+last_instance_id=1
+  fi
+}
+
+function set_service_instance_if_needed() {
+  if [[ "$service" == "tserver" && ${NUM_TSERVERS:-1} > 1 ]]; then
+export ACCUMULO_SERVICE_INSTANCE=$inst_id
+service_instance_cmd="export ACCUMULO_SERVICE_INSTANCE=${inst_id};"
+  else
+export ACCUMULO_SERVICE_INSTANCE=
+service_instance_cmd=
 
 Review comment:
   Those changes look good and consistent.


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [accumulo] keith-turner commented on a change in pull request #1568: Support multiple tservers / node in accumulo-service

2020-03-25 Thread GitBox
keith-turner commented on a change in pull request #1568: Support multiple 
tservers / node in accumulo-service
URL: https://github.com/apache/accumulo/pull/1568#discussion_r397923832
 
 

 ##
 File path: assemble/bin/accumulo-cluster
 ##
 @@ -100,15 +100,45 @@ function get_ip() {
   echo "$ip_addr"
 }
 
+function set_last_instance_id() {
+  if [[ "$service" == "tserver" ]]; then
+last_instance_id=${NUM_TSERVERS:-1}
+  else
+last_instance_id=1
+  fi
+}
+
+function set_service_instance_if_needed() {
+  if [[ "$service" == "tserver" && ${NUM_TSERVERS:-1} > 1 ]]; then
+export ACCUMULO_SERVICE_INSTANCE=$inst_id
+service_instance_cmd="export ACCUMULO_SERVICE_INSTANCE=${inst_id};"
+  else
+export ACCUMULO_SERVICE_INSTANCE=
+service_instance_cmd=
 
 Review comment:
   Not sure the following will work, the thought is to make running on 
localhost and remote consistent.  Both ensuring the env var is not set when 
running the script.
   
   ```suggestion
   service_instance_cmd="export ACCUMULO_SERVICE_INSTANCE=;"
   ```


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services