# !/bin/sh
source ../dmp_env.sh
## date=$1
## deal_time="";
## year=""
## month=""
## day=""
## if [ "$date" ]; then
## deal_time=$(date +%Y%m%d -d "$date")
## year=$(date +%Y -d "$date")
## month=$(date +%m -d "$date")
## day=$(date +%d -d "$date")
## #cdndate=`date -d "$format_day" +%Y%m%d`
## echo "$deal_time"
## else
## deal_time=$(date -d "-1 day" +%Y%m%d)
## year=$(date -d "-1 day" +%Y)
## month=$(date -d "-1 day" +%m)
## day=$(date -d "-1 day" +%d)
## echo "$deal_time"
##
## fi
## echo  "$deal_time"


deal_time=$(date -d "$ScheduleTime 1 days ago" +"%Y%m%d")
echo  "$deal_time"
sleep 10s

spark-submit --class mobvista.dmp.datasource.event_tag.Dmp_event_source \
  --master yarn --deploy-mode cluster --conf spark.akka.frameSize=100 \
  --conf spark.driver.memory=2G \
  --num-executors 35 --executor-cores 2 --executor-memory 5G \
  --conf spark.shuffle.file.buffer=256k \
  --conf spark.shuffle.compress=true --conf spark.io.compression.codec=lz4\
  --conf spark.driver.maxResultSize=2024M \
  --name event_tag_source_daily --conf spark.app.loadTime=${deal_time} \
  --conf spark.app.coalesce_num=500 --conf spark.yarn.executor.memoryOverhead=3048 \
  ../DMP.jar
