25_ad_data_make.sh 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/bin/sh
  2. # 广告数据生产
  3. set -x
  4. export SPARK_HOME=/opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8
  5. export PATH=$SPARK_HOME/bin:$PATH
  6. export HADOOP_CONF_DIR=/etc/taihao-apps/hadoop-conf
  7. export JAVA_HOME=/usr/lib/jvm/java-1.8.0
  8. source /root/anaconda3/bin/activate py37
  9. # 全局常量
  10. HADOOP=/opt/apps/HADOOP-COMMON/hadoop-common-current/bin/hadoop
  11. FM_HOME=/root/sunmingze/alphaFM
  12. TRAIN_PATH=/dw/recommend/model/31_ad_sample_data_v4
  13. BUCKET_FEATURE_PATH=/dw/recommend/model/33_ad_train_data_v4
  14. TABLE=alg_recsys_ad_sample_all
  15. today="$(date +%Y%m%d)"
  16. today_early_1="$(date -d '1 days ago' +%Y%m%d)"
  17. /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
  18. --class com.aliyun.odps.spark.examples.makedata_ad.v20240718.makedata_ad_31_originData_20240718 \
  19. --master yarn --driver-memory 1G --executor-memory 2G --executor-cores 1 --num-executors 16 \
  20. ./target/spark-examples-1.0.0-SNAPSHOT-shaded.jar \
  21. tablePart:64 repartition:32 \
  22. beginStr:${today_early_1}00 endStr:${today_early_1}12 \
  23. savePath:${TRAIN_PATH} \
  24. table:${TABLE} \
  25. filterHours:00,01,02,03,04,05,06,07 \
  26. idDefaultValue:0.1 &
  27. /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
  28. --class com.aliyun.odps.spark.examples.makedata_ad.v20240718.makedata_ad_31_originData_20240718 \
  29. --master yarn --driver-memory 1G --executor-memory 2G --executor-cores 1 --num-executors 16 \
  30. ./target/spark-examples-1.0.0-SNAPSHOT-shaded.jar \
  31. tablePart:64 repartition:32 \
  32. beginStr:${today_early_1}13 endStr:${today_early_1}18 \
  33. savePath:${TRAIN_PATH} \
  34. table:${TABLE} \
  35. filterHours:00,01,02,03,04,05,06,07 \
  36. idDefaultValue:0.1 &
  37. /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
  38. --class com.aliyun.odps.spark.examples.makedata_ad.v20240718.makedata_ad_31_originData_20240718 \
  39. --master yarn --driver-memory 1G --executor-memory 2G --executor-cores 1 --num-executors 16 \
  40. ./target/spark-examples-1.0.0-SNAPSHOT-shaded.jar \
  41. tablePart:64 repartition:32 \
  42. beginStr:${today_early_1}19 endStr:${today_early_1}23 \
  43. savePath:${TRAIN_PATH} \
  44. table:${TABLE} \
  45. filterHours:00,01,02,03,04,05,06,07 \
  46. idDefaultValue:0.1 &
  47. wait
  48. /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
  49. --class com.aliyun.odps.spark.examples.makedata_ad.v20240718.makedata_ad_33_bucketData_20240718 \
  50. --master yarn --driver-memory 2G --executor-memory 4G --executor-cores 1 --num-executors 16 \
  51. ./target/spark-examples-1.0.0-SNAPSHOT-shaded.jar \
  52. beginStr:${today_early_1} endStr:${today_early_1} repartition:100 \
  53. filterNames:_4h_,_5h_,adid_,targeting_conversion_ \
  54. readPath:${TRAIN_PATH} \
  55. savePath:${BUCKET_FEATURE_PATH}