reyun_pseudo_package_to_s3.sh 1.17 KB
Newer Older
fan.jiang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!/bin/sh

# # # # # # # # # # # # # # # # # # # # # #
# @author : jiangfan
# @date : 2021-07-01 12:06:00
# # # # # # # # # # # # # # # # # # # # # #
#!/usr/bin/env bash

source ../../dmp_env.sh

dt_today=$(date -d "$ScheduleTime 1 days ago" +"%Y%m%d")
dt_slash_today=$(date -d "$ScheduleTime 1 days ago" +"%Y/%m/%d")
update_date=$(date -d "$ScheduleTime 1 days ago" +"%Y-%m-%d")

INPUT_PATH="${DM_INSTALL_LIST}_v2/${dt_slash_today}/reyun"

check_await  "${INPUT_PATH}/_SUCCESS"

OUTPUT_PATH="${RTDMP_TMP_PACKAGE_NAME_PATH}/reyun_pseudo_package_to_s3/${dt_slash_today}"

hadoop fs -rm -r "${OUTPUT_PATH}"

spark-submit --class mobvista.dmp.datasource.reyun.ReyunPseudoPackageToS3 \
 --conf spark.network.timeout=720s \
 --conf spark.driver.maxResultSize=4g \
 --conf spark.default.parallelism=2000 \
 --conf spark.sql.shuffle.partitions=2000 \
 --conf spark.sql.broadcastTimeout=1200 \
 --conf spark.sql.autoBroadcastJoinThreshold=31457280 \
WangJinfeng committed
30
 --deploy-mode cluster  --executor-memory 6g --driver-memory 4g  --executor-cores 3  --num-executors 20 \
fan.jiang committed
31 32 33 34 35 36
 ../../${JAR}  \
 -output ${OUTPUT_PATH} -coalesce 100  -dt_today ${dt_today}  -update_date ${update_date}

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