Joe McDonnell created IMPALA-7161:
-------------------------------------
Summary: Bootstrap's handling of JAVA_HOME needs improvement
Key: IMPALA-7161
URL: https://issues.apache.org/jira/browse/IMPALA-7161
Project: IMPALA
Issue Type: Bug
Components: Infrastructure
Affects Versions: Impala 2.13.0, Impala 3.1.0
Reporter: Joe McDonnell
bin/bootstrap_system.sh installs the Java SDK and sets JAVA_HOME in the current
shell. It also adds a command to the bin/impala-config-local.sh to export
JAVA_HOME there. This doesn't do the job.
bin/impala-config.sh tests for JAVA_HOME at the very start of the script,
before it has sourced bin/impala-config-local.sh. So, the user doesn't have a
way of developing over the long term without manually setting up JAVA_HOME.
bin/impala-config.sh also doesn't detect the system JAVA_HOME. For Ubuntu
16.04, this is fairly simple and if a developer has their system JDK set up
appropriately, it would make sense to use it. For example:
{noformat}
# If javac exists, then the system has a Java SDK (JRE does not have javac).
# Follow the symbolic links and use this to determine the system's JAVA_HOME.
if [ -L /usr/bin/javac ]; then
SYSTEM_JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:bin/javac::")
fi
export JAVA_HOME="${JAVA_HOME:-${SYSTEM_JAVA_HOME}}"{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]