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
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
source ../dmp_env.sh
today=${ScheduleTime:-$2}
date=$(date +"%Y%m%d" -d "-1 day $today")
region=$1
date_path=$(date +%Y/%m/%d -d "-1 day $today")
# ODS_USER_INFO_PATH="s3://mob-emr-test/dataplatform/DataWareHouse/data/dwh/dm_user_info/${date_path}"
ODS_USER_INFO_REGION_PATH="s3://mob-emr-test/dataplatform/DataWareHouse/data/dwh/dm_user_info_region/${date_path}/${region}"
check_await "${ODS_USER_INFO_REGION_PATH}/_SUCCESS"
sleep 60
if [[ ${region} == "cn" ]]; then
partition=500
cores=2
else
partition=4000
cores=3
fi
spark-submit --class mobvista.dmp.datasource.retargeting.UserFeatureCassandra \
--name "mobvista.dmp.datasource.retargeting.UserFeatureCassandra_wangjf_${date}_${region}" \
--conf spark.sql.shuffle.partitions=${partition} \
--conf spark.default.parallelism=${partition} \
--conf spark.sql.files.maxPartitionBytes=33554432 \
--conf spark.sql.adaptive.enabled=true \
--conf spark.sql.adaptive.advisoryPartitionSizeInBytes=536870912 \
--conf spark.yarn.executor.memoryOverhead=2048 \
--conf spark.driver.extraJavaOptions="-XX:+UseG1GC" \
--conf spark.executor.extraJavaOptions="-XX:+UseG1GC" \
--files ${HIVE_SITE_PATH} \
--jars ${JARS} \
--master yarn --deploy-mode cluster --executor-memory 2g --driver-memory 2g --executor-cores 2 --num-executors ${cores} \
../${JAR} \
-date ${date} -region ${region} -input ${ODS_USER_INFO_REGION_PATH}
if [[ $? -ne 0 ]]; then
exit 255
fi