Skip to content

Commit

Permalink
IMPALA-11873: Fix unbound variable of OZONE_ERASURECODE_POLICY when E…
Browse files Browse the repository at this point in the history
…C is diabled

This fixes a script error of unbound variable when running the mini
cluster on Ozone with ERASURE_CODING=false. In such case,
OZONE_ERASURECODE_POLICY is not set in bin/impala-config.sh. Adds a
default empty string when using it.

Tests:
 - Verified CORE tests can run with TARGET_FILESYSTEM=ozone and
   ERASURE_CODING=false.

Change-Id: If4c50653ec7e317c3246055adc50d4dd99272173
Reviewed-on: http://gerrit.cloudera.org:8080/19455
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
  • Loading branch information
stiga-huang authored and Impala Public Jenkins committed Jan 30, 2023
1 parent 23cdc7e commit 9ebe8cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testdata/cluster/admin
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ function start_cluster {
if [[ "${TARGET_FILESYSTEM}" = "ozone" ]]; then
local replication=''
echo "Creating Ozone volume/bucket"
if [ -n "${OZONE_ERASURECODE_POLICY}" ]; then
if [ -n "${OZONE_ERASURECODE_POLICY:-}" ]; then
replication="--type EC --replication ${OZONE_ERASURECODE_POLICY}"
echo "with erasure coding ${OZONE_ERASURECODE_POLICY}"
fi
Expand Down

0 comments on commit 9ebe8cc

Please sign in to comment.