From 848c859281a166b4179129d80774ec0e51827c90 Mon Sep 17 00:00:00 2001 From: xingpeng1 Date: Wed, 31 Jan 2018 18:16:35 +0800 Subject: [PATCH 1/1] KYLIN-3216 --- build/bin/check-env.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/build/bin/check-env.sh b/build/bin/check-env.sh index 7534d127e..cd745d452 100755 --- a/build/bin/check-env.sh +++ b/build/bin/check-env.sh @@ -62,8 +62,22 @@ then quit "Failed to create $WORKING_DIR. Please make sure the user has right to access $WORKING_DIR" fi -hadoop ${hadoop_conf_param} fs -mkdir -p $WORKING_DIR/spark-history -if [ $? != 0 ] +SPARK_EVENTLOG_DIR=`bash $KYLIN_HOME/bin/get-properties.sh kylin.engine.spark-conf.spark.eventLog.dir` +if [ -n "$SPARK_EVENTLOG_DIR" ] +then + hadoop ${hadoop_conf_param} fs -mkdir -p $SPARK_EVENTLOG_DIR + if [ $? != 0 ] + then + quit "Failed to create $SPARK_EVENTLOG_DIR. Please make sure the user has right to access $SPARK_EVENTLOG_DIR" + fi +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 - quit "Failed to create $WORKING_DIR/spark-history. Please make sure the user has right to access $WORKING_DIR" + hadoop ${hadoop_conf_param} fs -mkdir -p $SPARK_HISTORYLOG_DIR + if [ $? != 0 ] + then + quit "Failed to create $SPARK_HISTORYLOG_DIR. Please make sure the user has right to access $SPARK_HISTORYLOG_DIR" + fi fi \ No newline at end of file -- 2.11.0.windows.1