dlmarion commented on a change in pull request #2238:
URL: https://github.com/apache/accumulo/pull/2238#discussion_r717633078



##########
File path: assemble/bin/accumulo-cluster
##########
@@ -43,52 +43,68 @@ function invalid_args {
   exit 1
 }
 
-function verify_config {
+function parse_fail {
+  echo "Failed to parse ${conf}/cluster.yml"
+  exit 1
+}
+
+function parse_config {
   if [[ -f ${conf}/slaves ]]; then
     echo "ERROR: A 'slaves' file was found in ${conf}/"
-    echo "Accumulo now reads tablet server hosts from 'tservers' and requires 
that the 'slaves' file not be present to reduce confusion."
+    echo "Accumulo now uses cluster host configuration information from 
'cluster.yml' and requires that the 'slaves' file not be present to reduce 
confusion."
     echo "Please rename the 'slaves' file to 'tservers' or remove it if both 
exist."
     exit 1
   fi
 
-  if [[ ! -f ${conf}/tservers ]]; then
-    echo "ERROR: A 'tservers' file was not found at ${conf}/tservers"
-    echo "Please make sure it exists and is configured with tablet server 
hosts."
+  if [[ ! -f ${conf}/cluster.yml ]]; then
+    echo "ERROR: A 'cluster.yml' file was not found at ${conf}/cluster.yml"
+    echo "Please make sure it exists and is configured with the host 
information. Run 'create-config' to create an example configuration."
     exit 1
   fi
 
-  unset manager1
-  if [[ -f "${conf}/$manager_file" ]]; then
-    manager1=$(grep -Ev '(^#|^\s*$)' "${conf}/$manager_file" | head -1)
+  trap 'rm -f "$CONFIG_FILE"' EXIT
+  CONFIG_FILE=$(mktemp) || exit 1
+  ${accumulo_cmd} org.apache.accumulo.core.conf.cluster.ClusterConfigParser 
${conf}/cluster.yml > $CONFIG_FILE || parse_fail

Review comment:
       Thanks for the reference to ShellCheck. I ran the script with that and 
fixed most issues.




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