Files
impala/bin/impala-config-java.sh
Riza Suminto 35aa2e2add IMPALA-14187: Add IMPALA_JAVA_TARGET env var
Impala is preparing to switch to JDK17 for Java compilation by default.
While the source version might remain in 1.8 for longer, we should
experiment with targeting binary version 17.

This patch adds IMPALA_JAVA_TARGET env var to control target binary
version. It is initialized in impala-config-java.sh, depending on value
of IMPALA_JDK_VERSION env var.

Testing:
Pass data load and FE tests with IMPALA_JDK_VERSION=17.

Change-Id: If194d87c542d416b878661403c32c6adc2930199
Reviewed-on: http://gerrit.cloudera.org:8080/23096
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2025-06-27 00:41:57 +00:00

43 lines
1.6 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:-system}
# Set OS Java package variables for bootstrap_system and Docker builds
if [[ "${IMPALA_JDK_VERSION}" == "system" || "${IMPALA_JDK_VERSION}" == "8" ]]; then
UBUNTU_JAVA_VERSION=8
REDHAT_JAVA_VERSION=1.8.0
export IMPALA_JDK_VERSION_NUM=8
export IMPALA_JAVA_TARGET=1.8
else
UBUNTU_JAVA_VERSION="${IMPALA_JDK_VERSION}"
REDHAT_JAVA_VERSION="${IMPALA_JDK_VERSION}"
export IMPALA_JDK_VERSION_NUM="${IMPALA_JDK_VERSION}"
export IMPALA_JAVA_TARGET="${IMPALA_JDK_VERSION}"
fi
if [[ "$(uname -p)" == 'aarch64' ]]; then
UBUNTU_PACKAGE_ARCH='arm64'
else
UBUNTU_PACKAGE_ARCH='amd64'
fi
echo "JAVA_HOME: ${JAVA_HOME:-}"
echo "IMPALA_JDK_VERSION: $IMPALA_JDK_VERSION"
echo "IMPALA_JDK_VERSION_NUM: $IMPALA_JDK_VERSION_NUM"
echo "IMPALA_JAVA_TARGET: $IMPALA_JAVA_TARGET"