Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODP-2739: Use ambari-python-wrap instead of python #15

Open
wants to merge 3 commits into
base: rel/ODP-3.2.3.3-3
Choose a base branch
from

Conversation

JeffreySmith
Copy link

This moves everything to use ambari-python-wrap instead of python.

@prabhjyotsingh
Copy link

prabhjyotsingh commented Dec 12, 2024

@JeffreySmith there are references of #!/usr/bin/env impala-python in some of the files, not sure if that is any important.

Which is hard-coded to

  • export IMPALA_PYTHON_VERSION=2.7.16
  • export IMPALA_PYTHON3_VERSION=3.7.16

@JeffreySmith
Copy link
Author

JeffreySmith commented Dec 12, 2024

@prabhjyotsingh
The shebang line can't evaluate environment variables, so impala-python has to be an existing script or binary.

It calls the script IMPALA_HOME/bin/impala-python, which is the following:

source "$(dirname "$0")/impala-python-common.sh"
exec "$PY_ENV_DIR/bin/python" "$@"

impala-python-common.sh then attempts to set up/use a virtual environment, then tries to use that version of python to run whatever script is supposed to run.

I'm not sure why it's set to impala-python since there's also an impala-python3 which does a similar thing. This could be a python 2 & 3 compatibility issue, or it's something being handled somewhere in one of the build scripts.

It doesn't seem to work when used directly; I assume that some build script sets things up correctly, or it could be a build/runtime issue that we find having moved to ambari-python-wrap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants