|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 | +# contributor license agreements. See the NOTICE file distributed with |
| 5 | +# this work for additional information regarding copyright ownership. |
| 6 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 7 | +# (the "License"); you may not use this file except in compliance with |
| 8 | +# the License. You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, software |
| 13 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +# See the License for the specific language governing permissions and |
| 16 | +# limitations under the License. |
| 17 | + |
| 18 | +set -eu |
| 19 | + |
| 20 | +source /opt/rh/devtoolset-11/enable |
| 21 | +source /opt/rh/rh-git227/enable |
| 22 | + |
| 23 | +CURRENT_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd) |
| 24 | +GLUTEN_HOME=${CURRENT_DIR}/../../ |
| 25 | +cd ${GLUTEN_HOME} |
| 26 | + |
| 27 | +# Enable static build with support for S3, GCS, HDFS, and ABFS. |
| 28 | +./dev/builddeps-veloxbe.sh --enable_vcpkg=ON --build_arrow=OFF --build_tests=OFF --build_benchmarks=OFF \ |
| 29 | + --build_examples=OFF --enable_s3=ON --enable_gcs=ON --enable_hdfs=ON --enable_abfs=ON |
| 30 | + |
| 31 | +JAVA_VERSION=$("java" -version 2>&1 | awk -F '"' '/version/ {print $2}') |
| 32 | + |
| 33 | +if [[ $JAVA_VERSION == 1.8* ]]; then |
| 34 | + echo "Java 8 is being used." |
| 35 | +else |
| 36 | + echo "Error: Java 8 is required. Current version is $JAVA_VERSION." |
| 37 | + exit 1 |
| 38 | +fi |
| 39 | + |
| 40 | +# Build Gluten for Spark 3.2 and 3.3 with Java 8. All feature modules are enabled. |
| 41 | +for spark_version in 3.2 3.3 |
| 42 | +do |
| 43 | + mvn clean install -Pbackends-velox -Pspark-${spark_version} -Pceleborn,uniffle \ |
| 44 | + -Piceberg,delta,hudi,paimon -DskipTests |
| 45 | +done |
| 46 | + |
| 47 | +sudo curl -Lo /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo |
| 48 | +sudo yum install -y java-17-amazon-corretto-devel |
| 49 | +export JAVA_HOME=/usr/lib/jvm/java-17-amazon-corretto |
| 50 | +export PATH=$JAVA_HOME/bin:$PATH |
| 51 | + |
| 52 | +JAVA_VERSION=$("java" -version 2>&1 | awk -F '"' '/version/ {print $2}') |
| 53 | +if [[ $JAVA_VERSION == 17* ]]; then |
| 54 | + echo "Java 17 is being used." |
| 55 | +else |
| 56 | + echo "Error: Java 17 is required. Current version is $JAVA_VERSION." |
| 57 | + exit 1 |
| 58 | +fi |
| 59 | + |
| 60 | +# Build Gluten for Spark 3.4 and 3.5 with Java 17. The version of Iceberg being used requires Java 11 or higher. |
| 61 | +# All feature modules are enabled. |
| 62 | +for spark_version in 3.4 3.5 |
| 63 | +do |
| 64 | + mvn clean install -Pjava-17 -Pbackends-velox -Pspark-${spark_version} -Pceleborn,uniffle \ |
| 65 | + -Piceberg,delta,hudi,paimon -DskipTests |
| 66 | +done |
0 commit comments