24 Unstar Star 90 Fork 25

hellowzk / light-spark

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
run.sh 1.09 KB
Copy Edit Web IDE Raw Blame History
hellowzk authored 2020-08-18 18:31 . 修改 README.md
#!/usr/bin/env bash
set -e
umask 0000
APP_HOME="$(cd $(dirname $0)/..; pwd -P)"
ROOT_PATH="$(cd $APP_HOME/..; pwd -P)"
currentTime=`date '+%Y-%m-%d_%H-%M-%S'`
if [ $# -eq 1 ];then
params="-c qujia_prd.yaml -d $1"
elif [ $# -eq 2 ];then
params="-c $2 -d $1"
# debug
# params="-c $2 -d $1 --debug"
else
echo "useage: $0 <date-yyyyMMdd> <conf>"
exit 1
fi
STREAM_APP="com.hellowzk.light.spark.App" # 程序入口
echo "__________________________ light-spark start __________________________"
CLASSPATH="$APP_HOME/conf"
confList=`find $APP_HOME/conf/ -type f|sed ':a;N;s/\n/,/;ta;'` # 扫描目录下所有配置信息
APP_JAR="light-spark-assembly.jar" # 指定 jar 包名称
cmd="spark-submit"
cmd="$cmd --master yarn --deploy-mode cluster"
cmd="$cmd --files $confList"
cmd="$cmd --conf spark.app.name=light-spark-$1" # 指定 hadoop 应用名称
cmd="$cmd --conf spark.driver.extraClassPath=$CLASSPATH"
cmd="$cmd --conf spark.yarn.submit.waitAppCompletion=false"
cmd="$cmd --class $STREAM_APP $APP_HOME/lib/$APP_JAR $params"
echo "command to execute $0: $cmd" # > $APP_HOME/log/light-spark-$1.log
$cmd

Comment ( 0 )

Sign in for post a comment

Scala
1
https://gitee.com/hellowzk/light-spark.git
git@gitee.com:hellowzk/light-spark.git
hellowzk
light-spark
light-spark
master

Search

132457 8cb2edc1 1899542 131848 70c8d3a4 1899542