test_make_orign.sh 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/bin/sh
  2. set -x
  3. export PATH=$SPARK_HOME/bin:$PATH
  4. export HADOOP_CONF_DIR=/etc/taihao-apps/hadoop-conf
  5. export JAVA_HOME=/usr/lib/jvm/java-1.8.0
  6. export SPARK_HOME=/opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8
  7. sh_path=$(dirname $0)
  8. source ${sh_path}/00_common.sh
  9. source /root/anaconda3/bin/activate py37
  10. today_early_1="$(date -d '1 days ago' +%Y%m%d)"
  11. TRAIN_PATH=/dw/recommend/model/31_ad_sample_data_dev_20250623
  12. TABLE=alg_recsys_ad_sample_all
  13. make_origin_data() {
  14. local step_start_time=$(date +%s)
  15. /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
  16. --class com.aliyun.odps.spark.examples.makedata_ad.v20240718.makedata_ad_31_originData_20250623 \
  17. --master yarn --driver-memory 1G --executor-memory 2G --executor-cores 1 --num-executors 16 \
  18. ./target/spark-examples-1.0.0-SNAPSHOT-shaded.jar \
  19. tablePart:64 repartition:32 \
  20. beginStr:${today_early_1}00 endStr:${today_early_1}12 \
  21. savePath:${TRAIN_PATH} \
  22. table:${TABLE} \
  23. filterHours:00,01,02,03,04,05,06,07 \
  24. idDefaultValue:0.1 &
  25. local task1=$!
  26. /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
  27. --class com.aliyun.odps.spark.examples.makedata_ad.v20240718.makedata_ad_31_originData_20250623 \
  28. --master yarn --driver-memory 1G --executor-memory 2G --executor-cores 1 --num-executors 16 \
  29. ./target/spark-examples-1.0.0-SNAPSHOT-shaded.jar \
  30. tablePart:64 repartition:32 \
  31. beginStr:${today_early_1}13 endStr:${today_early_1}18 \
  32. savePath:${TRAIN_PATH} \
  33. table:${TABLE} \
  34. filterHours:00,01,02,03,04,05,06,07 \
  35. idDefaultValue:0.1 &
  36. local task2=$!
  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_20250623 \
  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. local task3=$!
  48. wait ${task1}
  49. local task1_return_code=$?
  50. wait ${task2}
  51. local task2_return_code=$?
  52. wait ${task3}
  53. local task3_return_code=$?
  54. }
  55. make_origin_data