This is an automated email from the ASF dual-hosted git repository.

xxyu pushed a commit to branch kylin5
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit f402261adee160e9a78d8eb8851ebb5462b5e4f1
Author: Mukvin <boyboys...@163.com>
AuthorDate: Thu Aug 4 11:37:12 2022 +0800

    KYLIN-5217, fix scripts for package
---
 build/apache_release/download-spark.sh |  4 +-
 build/scripts/download-spark.sh        | 73 -------------------------------
 build/scripts/functions.sh             | 78 ----------------------------------
 dev-support/sandbox/sandbox.sh         |  2 +-
 4 files changed, 3 insertions(+), 154 deletions(-)

diff --git a/build/apache_release/download-spark.sh 
b/build/apache_release/download-spark.sh
index f54c1fd5fb..023eb8cc96 100755
--- a/build/apache_release/download-spark.sh
+++ b/build/apache_release/download-spark.sh
@@ -24,9 +24,9 @@ source build/apache_release/functions.sh
 
 rm -rf build/spark
 
-spark_pkg_name="spark-newten-3.2.0-4.x-r56"
+spark_pkg_name="spark-newten-3.2.0-4.5.15.0"
 spark_pkg_file_name="${spark_pkg_name}.tgz"
-spark_pkg_md5="d3042a545690f85b2b8f90695df7f5b7"
+spark_pkg_md5="d239b19804b066721962bab0ca2039e6"
 
 checkDownloadSparkVersion ${spark_pkg_name}
 
diff --git a/build/scripts/download-spark.sh b/build/scripts/download-spark.sh
deleted file mode 100755
index 05a2ae4fe0..0000000000
--- a/build/scripts/download-spark.sh
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/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.
-#
-
-dir=$(dirname ${0})
-cd ${dir}/../..
-
-source build/scripts/functions.sh
-
-rm -rf build/spark
-
-spark_pkg_name="spark-newten-3.2.0-4.x-r56"
-spark_pkg_file_name="${spark_pkg_name}.tgz"
-spark_pkg_md5="d3042a545690f85b2b8f90695df7f5b7"
-
-checkDownloadSparkVersion ${spark_pkg_name}
-
-if [ ! -f "build/${spark_pkg_file_name}" ]
-then
-    echo "no binary file found"
-    wget --directory-prefix=build/ 
https://s3.cn-north-1.amazonaws.com.cn/download-resource/kyspark/${spark_pkg_file_name}
 || echo "Download spark failed"
-else
-    if [ `calMd5 build/${spark_pkg_file_name} | awk '{print $1}'` != 
"${spark_pkg_md5}" ]
-    then
-        echo "md5 check failed"
-        rm build/${spark_pkg_file_name}
-        wget --directory-prefix=build/ 
https://s3.cn-north-1.amazonaws.com.cn/download-resource/kyspark/${spark_pkg_file_name}
  || echo "Download spark failed"
-    fi
-fi
-
-mkdir -p  build/${spark_pkg_name}
-tar -zxf build/${spark_pkg_file_name} -C build/${spark_pkg_name} 
--strip-components 1 || { exit 1; }
-mv build/${spark_pkg_name} build/spark
-
-# Remove unused components in Spark
-rm -rf build/spark/lib/spark-examples-*
-rm -rf build/spark/examples
-rm -rf build/spark/data
-rm -rf build/spark/R
-rm -rf build/spark/hive_1_2_2
-
-# cp -rf build/hadoop3 build/spark/
-
-if [[ "${WITH_HIVE1}" != "0" ]]; then
-    if [ ! -f "build/hive_1_2_2.tar.gz" ]
-    then
-        echo "no binary file found"
-        wget --directory-prefix=build/ 
https://s3.cn-north-1.amazonaws.com.cn/download-resource/kyspark/hive_1_2_2.tar.gz
 || echo "Download hive1 failed"
-    else
-        if [ `calMd5 build/hive_1_2_2.tar.gz | awk '{print $1}'` != 
"e8e86e086fb7e821d724ad0c19457a36" ]
-        then
-            echo "md5 check failed"
-            rm build/hive_1_2_2.tar.gz
-            wget --directory-prefix=build/ 
https://s3.cn-north-1.amazonaws.com.cn/download-resource/kyspark/hive_1_2_2.tar.gz
  || echo "Download hive1 failed"
-        fi
-    fi
-    tar -zxf build/hive_1_2_2.tar.gz -C build/spark/ || { exit 1; }
-fi
diff --git a/build/scripts/functions.sh b/build/scripts/functions.sh
deleted file mode 100755
index 0d83cda806..0000000000
--- a/build/scripts/functions.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/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.
-#
-
-function checkCommandExists() {
-    echo "Checking ${1}..."
-    if [ -z "$(command -v ${1})" ]
-    then
-        echo "Please install ${1} first so that Kylin packaging can proceed"
-        exit 1
-    else
-        echo "${1} check passed"
-    fi
-}
-
-function exportProjectVersions() {
-    if [ -z "${kap_version}" ]; then
-        export kylin_version=`mvn 
org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate 
-Dexpression=project.version | grep -E '^[0-9]+\.[0-9]+\.[0-9]+' `
-        echo "KAP Version: ${kylin_version}"
-    fi
-    if [ -z "${release_version}" ]; then
-        export release_version=$kylin_version
-    fi
-}
-
-function detectOSType() {
-    OS_TYPE="linux"
-    if [[ `uname -a` =~ "Darwin" ]]; then
-        OS_TYPE="mac"
-    elif [[ `uname -a` =~ "Cygwin" ]]; then
-        OS_TYPE="windows"
-    fi
-    echo $OS_TYPE
-}
-
-function calMd5() {
-    OS_TYPE=`detectOSType`
-    if [[ "$OS_TYPE" == "mac" ]]; then
-        md5 -q $1
-    elif [[ "$OS_TYPE" == "windows" ]]; then
-        md5sum $1
-    else
-        md5sum $1
-    fi
-}
-
-function checkDownloadSparkVersion() {
-    if [[ -z $1 ]];
-    then
-        echo "spark version check failed, download spark version parameter is 
null"
-        exit 1
-    fi
-
-    download_spark_release_version=$1
-    spark_version_pom=`mvn help:evaluate -Dexpression=spark.version | grep -E 
'^[0-9]+\.[0-9]+\.[0-9]+' `
-    pom_spark_release_version=spark-newten-"`echo ${spark_version_pom}| sed 
"s/-kylin//g"`"
-
-    if [[ $download_spark_release_version != $pom_spark_release_version ]];
-    then
-        echo "spark version check failed, download version is 
${download_spark_release_version}, but ${pom_spark_release_version} in pom file"
-        exit 1
-    fi
-}
diff --git a/dev-support/sandbox/sandbox.sh b/dev-support/sandbox/sandbox.sh
index 660dc1f1fe..85779c413a 100755
--- a/dev-support/sandbox/sandbox.sh
+++ b/dev-support/sandbox/sandbox.sh
@@ -82,7 +82,7 @@ function main() {
         fi
 
         info "* Downloading spark..."
-        ${PROJECT_DIR}/build/scripts/download-spark.sh
+        ${PROJECT_DIR}/build/apache_release/download-spark.sh
         if [[ $? != 0 ]]; then
             warn "  Download spark failed, please manually execute 
'download-spark.sh'"
         fi

Reply via email to