Skip to content

Commit

Permalink
ODP-2861: Define IMPALA_SYSTEM_PYTHON{2,3}_OVERRIDE once, before chec…
Browse files Browse the repository at this point in the history
…king for it
  • Loading branch information
JeffreySmith authored and deepakdamri committed Jan 3, 2025
1 parent 25322aa commit 14f1185
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/impala-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,14 @@ export IMPALA_THRIFT_PY_VERSION=0.16.0-p7
unset IMPALA_THRIFT_PY_URL

# Find system python versions for testing
IMPALA_SYSTEM_PYTHON2_OVERRIDE="${IMPALA_SYSTEM_PYTHON2_OVERRIDE:-}"
IMPALA_SYSTEM_PYTHON3_OVERRIDE="${IMPALA_SYSTEM_PYTHON3_OVERRIDE:-}"

if command -v python2 >/dev/null || [ -n "${IMPALA_SYSTEM_PYTHON2_OVERRIDE:-}" ]; then
if command -v python2 >/dev/null || [ -n "$IMPALA_SYSTEM_PYTHON2_OVERRIDE" ]; then
export IMPALA_SYSTEM_PYTHON2="${IMPALA_SYSTEM_PYTHON2_OVERRIDE-$(command -v python2)}"
fi

if command -v ambari-python-wrap >/dev/null || [ -n "${IMPALA_SYSTEM_PYTHON3_OVERRIDE:-}" ]; then
if command -v ambari-python-wrap >/dev/null || [ -n "$IMPALA_SYSTEM_PYTHON3_OVERRIDE" ]; then
# Extract major python version from ambari-python-wrap
PYTHON_VER=$($(command -v ambari-python-wrap) --version 2>&1 | tr -s '[:blank:]' . | cut -d '.' -f2)

Expand Down

0 comments on commit 14f1185

Please sign in to comment.