You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by xx...@apache.org on 2022/06/23 02:46:04 UTC

[kylin] branch main updated: Kylin 5190, fix kylin.sh error when directory starts with s3a:// (#1895)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 66e83b46a0 Kylin 5190, fix kylin.sh error when directory starts with s3a:// (#1895)
66e83b46a0 is described below

commit 66e83b46a0868742e9ead9838f01efdccc74e378
Author: WANG Hui <wa...@outlook.com>
AuthorDate: Thu Jun 23 10:45:58 2022 +0800

    Kylin 5190, fix kylin.sh error when directory starts with s3a:// (#1895)
    
    * KYLIN-5190, fix kylin.sh error when directory starts with s3a://, replace s3a:// with s3://
---
 build/bin/check-env.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/build/bin/check-env.sh b/build/bin/check-env.sh
index f85d4807e9..38927a64bb 100755
--- a/build/bin/check-env.sh
+++ b/build/bin/check-env.sh
@@ -76,6 +76,10 @@ if [ -z "$WORKING_DIR" ]
 then
     quit "Please set kylin.env.hdfs-working-dir in kylin.properties"
 fi
+if [[ ${WORKING_DIR:0:3} -eq "s3a" ]]
+then
+    WORKING_DIR=${WORKING_DIR/"s3a"/"s3"}
+fi
 
 echo "Checking hdfs working dir"
 hadoop ${hadoop_conf_param} fs -mkdir -p $WORKING_DIR
@@ -90,6 +94,10 @@ fi
 SPARK_EVENTLOG_DIR=`bash $KYLIN_HOME/bin/get-properties.sh kylin.engine.spark-conf.spark.eventLog.dir`
 if [ -n "$SPARK_EVENTLOG_DIR" ]
 then
+    if [[ ${SPARK_EVENTLOG_DIR:0:3} -eq "s3a" ]]
+    then
+        SPARK_EVENTLOG_DIR=${SPARK_EVENTLOG_DIR/"s3a"/"s3"}
+    fi
     hadoop ${hadoop_conf_param} fs -mkdir -p $SPARK_EVENTLOG_DIR
     if [ $? != 0 ]
     then
@@ -100,6 +108,10 @@ fi
 SPARK_HISTORYLOG_DIR=`bash $KYLIN_HOME/bin/get-properties.sh kylin.engine.spark-conf.spark.history.fs.logDirectory`
 if [ -n "$SPARK_HISTORYLOG_DIR" ]
 then
+    if [[ ${SPARK_HISTORYLOG_DIR:0:3} -eq "s3a" ]]
+    then
+        SPARK_HISTORYLOG_DIR=${SPARK_HISTORYLOG_DIR/"s3a"/"s3"}
+    fi
     hadoop ${hadoop_conf_param} fs -mkdir -p $SPARK_HISTORYLOG_DIR
     if [ $? != 0 ]
     then