adn_request_id_mapping.sh 1.2 KB
Newer Older
WangJinfeng 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
#! /bin/bash

source ../dmp_env.sh

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

# INPUT_PATH=${ETL_ADN_ORG_REQ_HOURS}/${date_path}

INPUT_PATH=${ADN_REQUEST_PATH}/${date_path}

check_await "${INPUT_PATH}/virginia/23/_SUCCESS"

BUSINESS="adn_request"

OUTPUT_PATH=${ID_MAPPING}/${date_path}/${BUSINESS}

spark-submit --class mobvista.dmp.datasource.id_mapping.AdnRequest \
  --name "EtlDeviceIdDaily.$BUSINESS.$LOG_TIME" \
  --conf spark.yarn.executor.memoryOverhead=2048 \
  --conf spark.network.timeout=720s \
  --conf spark.sql.shuffle.partitions=3000 \
  --conf spark.default.parallelism=3000 \
  --conf spark.executor.extraJavaOptions="-XX:+UseG1GC" \
WangJinfeng committed
25
  --master yarn --deploy-mode cluster --executor-memory 10g --driver-memory 8g --executor-cores 5 --num-executors 200 \
WangJinfeng committed
26 27 28 29 30 31 32 33 34
  ../${JAR} -date ${LOG_TIME} -business ${BUSINESS} -output ${OUTPUT_PATH} -coalesce 1000

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

common_mount_partition "dwd" "dwd_device_ios_ids_inc_daily" "dt='${LOG_TIME}',active_type='${BUSINESS}'" "${OUTPUT_PATH}/ios"

common_mount_partition "dwd" "dwd_device_android_ids_inc_daily" "dt='${LOG_TIME}',active_type='${BUSINESS}'" "${OUTPUT_PATH}/android"