| # 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 17 on most platforms. This uses Java 21 |
| # for Redhat 10, as Redhat 10 only has Java 21 or above in its package |
| # repositories. |
| if [[ "${IMPALA_JDK_VERSION}" == "" ]]; then |
| if grep -q -s 'release 10\.' /etc/redhat-release; then |
| REDHAT_JAVA_VERSION=21 |
| UBUNTU_JAVA_VERSION=invalid |
| else |
| UBUNTU_JAVA_VERSION=17 |
| REDHAT_JAVA_VERSION=17 |
| fi |
| elif [[ "${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 -m)" == 'aarch64' ]]; then |
| UBUNTU_PACKAGE_ARCH='arm64' |
| else |
| UBUNTU_PACKAGE_ARCH='amd64' |
| fi |