mirror of
https://github.com/apache/impala.git
synced 2025-12-29 09:04:47 -05:00
IMPALA-11941 allowed building Impala and running tests with Java 17, but it still uses Java 8 for minicluster components (e.g. Hadoop) and skips several tests that would restart Hive. It should be possible to use 17 for everything to be able to deprecate Java 8. This patch mainly fixes Yarn+Hive+Tez startup issues with java 17 by setting JAVA_TOOL_OPTIONS. Another issues fixed is KuduHMSIntegrationTest: this test fails to restart Kudu due to a bug in OpenJDK (see IMPALA-13856). The current fix is to remove LD_PRELOAD to avoid loading libjsig (similarly to the case when MINICLUSTER_JAVA_HOME is set). This works, but it would be nice to clean up this area in a future patch. Testing: - ran exhaustive tests with Java 17 - ran core tests with default Java 8 Change-Id: If58b64a21d14a4a55b12dfe9ea0b9c3d5fe9c9cf Reviewed-on: http://gerrit.cloudera.org:8080/22705 Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Reviewed-by: Riza Suminto <riza.suminto@cloudera.com> Reviewed-by: Michael Smith <michael.smith@cloudera.com>
61 lines
1.8 KiB
Bash
Executable File
61 lines
1.8 KiB
Bash
Executable File
#!/bin/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.
|
|
|
|
set -euo pipefail
|
|
. $IMPALA_HOME/bin/report_build_error.sh
|
|
setup_report_build_error
|
|
|
|
if [[ $# -eq 1 && "$1" == -format ]]; then
|
|
SHOULD_FORMAT=true
|
|
elif [[ $# -ne 0 ]]; then
|
|
echo "Usage: $0 [-format]"
|
|
echo "[-format] : Format the mini-dfs cluster before starting"
|
|
exit 1
|
|
else
|
|
SHOULD_FORMAT=false
|
|
fi
|
|
|
|
. $IMPALA_HOME/bin/set-impala-java-tool-options.sh
|
|
export JAVA_TOOL_OPTIONS="$IMPALA_JAVA_TOOL_OPTIONS ${JAVA_TOOL_OPTIONS-}"
|
|
|
|
# Kill and clean data for a clean start.
|
|
$IMPALA_HOME/testdata/bin/kill-mini-dfs.sh
|
|
|
|
if $SHOULD_FORMAT; then
|
|
$IMPALA_HOME/testdata/cluster/admin delete_data
|
|
fi
|
|
|
|
set +e
|
|
$IMPALA_HOME/testdata/cluster/admin start_cluster
|
|
if [[ $? != 0 ]]; then
|
|
# Only issue Java version warning when running Java 7.
|
|
$JAVA -version 2>&1 | grep -q 'java version "1.7' || exit 1
|
|
|
|
cat << EOF
|
|
|
|
Start of the minicluster failed. If the error looks similar to
|
|
"Unsupported major.minor version 52.0", make sure you are running at least Java 8.
|
|
Your JAVA binary currently points to $JAVA and reports the following version:
|
|
|
|
EOF
|
|
$JAVA -version
|
|
echo
|
|
exit 1
|
|
fi
|