mirror of
https://github.com/apache/impala.git
synced 2025-12-19 09:58:28 -05:00
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 <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
35 lines
1.2 KiB
Bash
35 lines
1.2 KiB
Bash
# Licensed to the Apache Software Foundation (ASF) under one
|
|
# or more contributor license agreements. See the NOTICE file
|
|
# distributed with this work for additional information
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
# to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance
|
|
# with the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing,
|
|
# software distributed under the License is distributed on an
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
# KIND, either express or implied. See the License for the
|
|
# specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
IMPALA_JDK_VERSION=${IMPALA_JDK_VERSION:-}
|
|
|
|
# Set OS Java package variables for bootstrap_system and Docker builds.
|
|
# Defaults to installing Java 8.
|
|
if [[ "${IMPALA_JDK_VERSION}" == "" || "${IMPALA_JDK_VERSION}" == "8" ]]; then
|
|
UBUNTU_JAVA_VERSION=8
|
|
REDHAT_JAVA_VERSION=1.8.0
|
|
else
|
|
UBUNTU_JAVA_VERSION="${IMPALA_JDK_VERSION}"
|
|
REDHAT_JAVA_VERSION="${IMPALA_JDK_VERSION}"
|
|
fi
|
|
|
|
if [[ "$(uname -p)" == 'aarch64' ]]; then
|
|
UBUNTU_PACKAGE_ARCH='arm64'
|
|
else
|
|
UBUNTU_PACKAGE_ARCH='amd64'
|
|
fi
|