ali_ck.sh 1.07 KB
Newer Older
wang-jinfeng committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/bin/sh

# # # # # # # # # # # # # # # # # # # # # #
# @author : wangjf
# @date : 2019-08-28 18:06:59
# # # # # # # # # # # # # # # # # # # # # #

source ../dmp_env.sh

LOG_TIME=$(date -d "$ScheduleTime 1 days ago" +"%Y%m%d")
date_path=$(date -d "$ScheduleTime 1 days ago" +"%Y/%m/%d")

ODS_USER_INFO_PATH="${ODS_DMP_USER_INFO_DAILY}/$LOG_TIME"

check_await "${ODS_USER_INFO_PATH}/_SUCCESS"

host="ip-172-31-20-35.ec2.internal"
cluster="cluster_1st"
database="dwh"
table="etl_baichuan_daily"
wang-jinfeng committed
21

wang-jinfeng committed
22 23 24 25 26 27
spark-submit --class mobvista.dmp.datasource.baichuan.BaiChuanJob \
     --name "mobvista.dmp.datasource.baichuan.BaiChuanJob_wangjf_${LOG_TIME}" \
     --conf spark.sql.shuffle.partitions=1000 \
     --conf spark.default.parallelism=100 \
     --conf spark.kryoserializer.buffer.max=256m \
     --conf spark.sql.files.maxPartitionBytes=268435456 \
WangJinfeng committed
28
     --deploy-mode cluster --executor-memory 6g --driver-memory 6g  --executor-cores 2  --num-executors 20 \
wang-jinfeng committed
29 30 31 32 33
     ../${JAR} -date ${LOG_TIME} -host ${host} -cluster ${cluster} -database ${database} -table ${table}

if [[ $? -ne 0 ]];then
  exit 255
fi