Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions assemble/bin/accumulo-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ function parse_config() {
exit 1
fi

AC_TMP_DIR=$(mktemp -t -d "accumulo-cluster-XXXXXXXX") || (echo "Error creating temp file" && exit 1)
AC_TMP_DIR=$(mktemp -t -d "accumulo-cluster-XXXXXXXX") || {
echo "Error creating temp file" >&2
exit 1
}
if isDebug; then
echo "$(blue DEBUG): Temporary files for this run are in $AC_TMP_DIR"
else
Expand All @@ -306,7 +309,10 @@ function parse_config() {

RG_FILE="$AC_TMP_DIR/ZooInfoViewer.out"
debug "Printing resource groups to $RG_FILE"
"$accumulo_cmd" zk info-viewer --print-resource-groups >"$RG_FILE" || (echo "Error getting resource groups. Did you init?" && exit 1)
"$accumulo_cmd" zk info-viewer --print-resource-groups >"$RG_FILE" || {
echo "Error getting resource groups. Did you init?" >&2
exit 1
}
read -r -a all_resource_groups <<<"$(grep -F 'Resource Groups: ' "$RG_FILE" | cut -c18-)"
debug "All resource groups: ${all_resource_groups[*]}"

Expand Down Expand Up @@ -718,7 +724,10 @@ function prune() {
exit 1
fi
local service_json="$AC_TMP_DIR/accumulo-service.json"
"$accumulo_cmd" inst service-status --json >"$service_json" 2>/dev/null || (echo "Error calling 'inst serviceStatus'" && exit 1)
"$accumulo_cmd" inst service-status --json >"$service_json" 2>/dev/null || {
echo "Error calling 'inst service-status'" >&2
exit 1
}

local var_name
local hosts
Expand Down
Loading