ga_prepare.sh 1.2 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 21 22 23 24 25 26 27 28 29 30 31 32 33 34
#!/bin/bash

# # # # # # # # # # # # # # # # # # # # # #
# @file    :ga_prepare.sh
# @author  :wangjf
# @revision:2018-11-06 14:41:53
# # # # # # # # # # # # # # # # # # # # # #

source ./dmp_env.sh

ScheduleTime=$1

LOG_TIME=$(date +%Y%m%d -d "-1 day $ScheduleTime")
year=${LOG_TIME:0:4}
month=${LOG_TIME:4:2}
day=${LOG_TIME:6:2}

MID_TIME=$(date +%Y-%m-%d -d "-1 day $ScheduleTime")
# check_await "${INPUT_PATH}/_SUCCESS"

INPUT_PATH="s3://live-ga-rawdata-annotated/${year}/${month}/${day}"

#   替换为线上路径
OUTPUT_PATH="s3://mob-emr-test/wangjf/ga/${year}/${month}/${day}"

spark-submit --class mobvista.dmp.datasource.ga.GaParser \
     --name "mobvista.dmp.datasource.ga.GaParser" \
     --conf spark.yarn.executor.memoryOverhead=2048 \
     --conf spark.network.timeout=720s \
     --conf spark.sql.shuffle.partitions=2000 \
     --conf spark.default.parallelism=2000 \
     --conf spark.speculation=true \
     --conf spark.speculation.quantile=0.9 \
     --conf spark.speculation.multiplier=1.2 \
WangJinfeng committed
35
     --deploy-mode cluster --executor-memory 8g --driver-memory 4g  --executor-cores 4  --num-executors 180 \
wang-jinfeng committed
36
     ${JAR} -date_str_midline ${MID_TIME} -input ${INPUT_PATH} -output ${OUTPUT_PATH} -coalesce 2000