youku_imei_laxin_request.sh 1.27 KB
Newer Older
wang-jinfeng committed
1 2 3 4 5 6 7 8 9 10 11
#!/bin/sh

# # # # # # # # # # # # # # # # # # # # # #
# @author : jiangfan
# @date : 2020-11-24 15:00:51
# # # # # # # # # # # # # # # # # # # # # #

source ../../dmp_env.sh

LOG_TIME=$(date -d "$ScheduleTime" +"%Y-%m-%d")

wang-jinfeng committed
12 13
if [[ ! -d "/home/hadoop/wangjf" ]]; then
  mkdir /home/hadoop/wangjf
wang-jinfeng committed
14

wang-jinfeng committed
15
  cd /home/hadoop/wangjf/
wang-jinfeng committed
16 17 18 19 20 21 22

  hdfs dfs -get s3://mob-emr-test/wangjf/data/pem/dataplatform_cn.pem .

  chmod 600 dataplatform_cn.pem
fi

fors=2500
wang-jinfeng committed
23

wang-jinfeng committed
24
concurrent=10000
wang-jinfeng committed
25

wang-jinfeng committed
26 27
device_type="IMEI_MD5"

wang-jinfeng committed
28
shell=" -cp /root/workspace/DMP-1.0.3-jar-with-dependencies.jar mobvista.dmp.datasource.ali.YOUKURequest ${fors} ${concurrent} ${LOG_TIME} ${device_type}"
wang-jinfeng committed
29

wang-jinfeng committed
30
ssh -o "StrictHostKeyChecking no" -i /home/hadoop/wangjf/dataplatform_cn.pem -l root 182.92.177.185 "sh -x /root/workspace/check_process.sh '${shell}'"
wang-jinfeng committed
31

wang-jinfeng committed
32
if [[ $? -ne 0 ]]; then
wang-jinfeng committed
33 34 35
  exit 255
fi

wang-jinfeng committed
36
ssh -o "StrictHostKeyChecking no" -i /home/hadoop/wangjf/dataplatform_cn.pem -l root 182.92.177.185 "/root/workspace/exec_youku.sh ${fors} ${concurrent} ${LOG_TIME} ${device_type} >/root/workspace/exec_youku_imei.log &"
wang-jinfeng committed
37

wang-jinfeng committed
38
if [[ $? -ne 0 ]]; then
wang-jinfeng committed
39 40 41
  exit 255
fi

wang-jinfeng committed
42
sleep $((fors * 25))
wang-jinfeng committed
43

wang-jinfeng committed
44
ssh -o "StrictHostKeyChecking no" -i /home/hadoop/wangjf/dataplatform_cn.pem -l root 182.92.177.185 "sh -x /root/workspace/check_process.sh '${shell}'"
wang-jinfeng committed
45

wang-jinfeng committed
46 47 48
if [[ $? -ne 0 ]]; then
  exit 255
fi