[
https://issues.apache.org/jira/browse/IMPALA-14450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18021317#comment-18021317
]
ASF subversion and git services commented on IMPALA-14450:
----------------------------------------------------------
Commit d217b9ecc6aa68b9a65ebb929735b3f802a18732 in impala's branch
refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=d217b9ecc ]
IMPALA-14450: Simplify Java version selection
Removes IMPALA_JAVA_HOME_OVERRIDE and updates version selection. In
order of priority
1. If IMPALA_JDK_VERSION is set, use the OS JDK version from a known
location. This is primarily used when also installing the JDK as part
of automated builds.
2. If JAVA_HOME is set, use it.
3. Look for the system default JDK.
The IMPALA_JDK_VERSION variable is no longer modified to avoid issues
when sourcing impala-config.sh multiple times. JAVA_HOME will be
modified if IMPALA_JDK_VERSION is set; both must be unset to restore
using the system default Java.
If switching between JDKs, now prefer setting JAVA_HOME. If relying on
system Java, unset JAVA_HOME after e.g. update-java-alternatives.
The detected Java version is set in IMPALA_JAVA_TARGET, which is used to
add Java 9+ options and configure the Java compilation target.
Eliminates IMPALA_JDK_VERSION_NUM as it's value was always identical to
IMPALA_JAVA_TARGET.
Stops printing from impala-config-java.sh. It made the output from
impala-config.sh look strange, and the decisions can all be clearly
determined from impala-config.sh printed variables later or the packages
installed in bootstrap_system.sh.
Fixes JAVA_HOME in bootstrap_build.sh on ARM64 systems.
Change-Id: I68435ca69522f8310221a0f3050f13d86568b9da
Reviewed-on: http://gerrit.cloudera.org:8080/23434
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Cannot manually set both JAVA_HOME and IMPALA_JAVA_TARGET
> ---------------------------------------------------------
>
> Key: IMPALA-14450
> URL: https://issues.apache.org/jira/browse/IMPALA-14450
> Project: IMPALA
> Issue Type: Task
> Components: Frontend
> Affects Versions: Impala 5.0.0
> Reporter: Michael Smith
> Assignee: Michael Smith
> Priority: Major
>
> As we work to support Java 17, a problem that's come up is that when you set
> {{IMPALA_JAVA_HOME_OVERRIDE}} to specify your own {{JAVA_HOME}}, it overrides
> {{IMPALA_JDK_VERSION}}. If you happen to source bin/impala-config.sh in the
> same shell, then {{IMPALA_JAVA_TARGET=override}} and compilation fails.
> In more specific environments with subshells, this isn't necessarily a
> problem until you try to provide {{IMPALA_JDK_VERSION}} as an environment
> variable. By declaring the environment variable, the update
> {{IMPALA_JDK_VERSION=override}} escapes the subshell and breaks subsequent
> build steps.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]