00_train_data_make.sh 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/sh
  2. set -x
  3. dts=('20250222' '20250223' '20250224')
  4. for dt in "${dts[@]}"; do
  5. echo "开始处理: ${dt}"
  6. /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
  7. --class com.aliyun.odps.spark.examples.makedata_recsys.v20250218.makedata_recsys_41_originData_20250218 \
  8. --master yarn --driver-memory 2G --executor-memory 5G --executor-cores 1 --num-executors 12 \
  9. --conf spark.yarn.executor.memoryOverhead=2G \
  10. /root/zhaohp/recommend-emr-dataprocess/target/spark-examples-1.0.0-SNAPSHOT-shaded.jar \
  11. tablePart:64 beginStr:${dt}00 endStr:${dt}11 repartition:32 \
  12. savePath:/dw/recommend/model/41_recsys_origin_date \
  13. table:dwd_recsys_alg_sample_all_20250212 &
  14. /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
  15. --class com.aliyun.odps.spark.examples.makedata_recsys.v20250218.makedata_recsys_41_originData_20250218 \
  16. --master yarn --driver-memory 2G --executor-memory 5G --executor-cores 1 --num-executors 12 \
  17. --conf spark.yarn.executor.memoryOverhead=2G \
  18. /root/zhaohp/recommend-emr-dataprocess/target/spark-examples-1.0.0-SNAPSHOT-shaded.jar \
  19. tablePart:64 beginStr:${dt}12 endStr:${dt}17 repartition:32 \
  20. savePath:/dw/recommend/model/41_recsys_origin_date \
  21. table:dwd_recsys_alg_sample_all_20250212 &
  22. /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
  23. --class com.aliyun.odps.spark.examples.makedata_recsys.v20250218.makedata_recsys_41_originData_20250218 \
  24. --master yarn --driver-memory 2G --executor-memory 5G --executor-cores 1 --num-executors 12 \
  25. --conf spark.yarn.executor.memoryOverhead=2G \
  26. /root/zhaohp/recommend-emr-dataprocess/target/spark-examples-1.0.0-SNAPSHOT-shaded.jar \
  27. tablePart:64 beginStr:${dt}18 endStr:${dt}23 repartition:32 \
  28. savePath:/dw/recommend/model/41_recsys_origin_date \
  29. table:dwd_recsys_alg_sample_all_20250212 &
  30. wait
  31. echo "${dt} 原始特征生产完成"
  32. /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
  33. --class com.aliyun.odps.spark.examples.makedata_recsys.v20250218.makedata_recsys_41_data_fu_sample_20250218 \
  34. --master yarn --driver-memory 6G --executor-memory 8G --executor-cores 1 --num-executors 30 \
  35. --conf spark.driver.maxResultSize=2g \
  36. /root/zhaohp/recommend-emr-dataprocess/target/spark-examples-1.0.0-SNAPSHOT-shaded.jar \
  37. readPath:/dw/recommend/model/41_recsys_origin_date/${dt}*/* \
  38. savePath:/dw/recommend/model/41_recsys_sample_data/${dt} \
  39. fuSampleRate:0.05 whatLabel:is_share repartition:64
  40. echo "${dt} 负样本采样完成"
  41. /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
  42. --class com.aliyun.odps.spark.examples.makedata_recsys.v20250218.makedata_recsys_43_bucketData_20250218 \
  43. --master yarn --driver-memory 4G --executor-memory 8G --executor-cores 1 --num-executors 16 \
  44. /root/zhaohp/recommend-emr-dataprocess/target/spark-examples-1.0.0-SNAPSHOT-shaded.jar \
  45. readPath:/dw/recommend/model/41_recsys_sample_data/ \
  46. savePath:/dw/recommend/model/43_recsys_train_data_20250218/ \
  47. beginStr:${dt} endStr:${dt} whatLabel:is_share fileName:20250218_bucket_322.txt &
  48. done