stat_freq.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. year=""
  3. if(($#==1))
  4. then
  5. year=$1
  6. else
  7. year=2025
  8. fi
  9. set -x
  10. export SPARK_HOME=/opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8
  11. export PATH=$SPARK_HOME/bin:$PATH
  12. export HADOOP_CONF_DIR=/etc/taihao-apps/hadoop-conf
  13. export JAVA_HOME=/usr/lib/jvm/java-1.8.0
  14. # params
  15. readPath=/dw/recommend/model/user_profile/data/
  16. suffix="y,8,4,0,e,a,c,k,o,w,g,s,u,q"
  17. whatLabel=gender
  18. class="1,2"
  19. featureIndex=2
  20. repartition=10
  21. savePath=/dw/recommend/model/832_recsys_analysis_data
  22. # 1 统计特征
  23. /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
  24. --class com.aliyun.odps.spark.examples.makedata_recsys_r_rate.stat_origin_feature \
  25. --master yarn --driver-memory 4G --executor-memory 6G --executor-cores 1 --num-executors 16 \
  26. --conf spark.yarn.executor.memoryoverhead=2048 \
  27. /mnt/disk1/jch/recommend-emr-dataprocess/target/spark-examples-1.0.0-SNAPSHOT-jar-with-dependencies.jar \
  28. readPath:${readPath} \
  29. year:${year} \
  30. suffix:${suffix} \
  31. whatLabel:${whatLabel} \
  32. class:${class} \
  33. featureIndex:${featureIndex} \
  34. repartition:${repartition} \
  35. savePath:${savePath} \