| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #!/bin/bash
- feature_file=""
- year=""
- if(($#==2))
- then
- feature_file=$1
- year=$2
- else
- exit -1
- fi
- set -x
- export SPARK_HOME=/opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8
- export PATH=$SPARK_HOME/bin:$PATH
- export HADOOP_CONF_DIR=/etc/taihao-apps/hadoop-conf
- export JAVA_HOME=/usr/lib/jvm/java-1.8.0
- # params
- readPath=/dw/recommend/model/user_profile/data/
- suffix="y,8,4,0,e,a,c,k,o,w,g,s,u,q,i,m"
- whatLabel=gender
- class="0"
- minCnt=10
- savePath=/dw/recommend/model/user_profile/gender/sample/predict/
- # 1 生产数据
- /opt/apps/SPARK2/spark-2.4.8-hadoop3.2-1.0.8/bin/spark-class2 org.apache.spark.deploy.SparkSubmit \
- --class com.aliyun.odps.spark.examples.makedata_recsys_r_rate.makedata_profile_gender_sample_20251114 \
- --master yarn --driver-memory 4G --executor-memory 6G --executor-cores 1 --num-executors 8 \
- --conf spark.yarn.executor.memoryoverhead=2048 \
- --files ${feature_file} \
- /mnt/disk1/jch/recommend-emr-dataprocess/target/spark-examples-1.0.0-SNAPSHOT-jar-with-dependencies.jar \
- readPath:${readPath} \
- year:${year} \
- suffix:${suffix} \
- whatLabel:${whatLabel} \
- class:${class} \
- featureFile:${feature_file} \
- minCnt:${minCnt} \
- repartition:32 \
- savePath:${savePath} \
|