#!/bin/sh set -x start_date="" end_date="" if(($#==2)) then start_date=$1 end_date=$2 else start_date=$(date +%Y%m%d -d "-15 $days day") end_date=$(date +%Y%m%d -d "-2 $days day") fi # env 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 # param sampleRate=-1 readPath=/dw/recommend/model/83_origin_data/ savePath=/dw/recommend/model/83_recsys_feature/ /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.feature_stat \ --master yarn --driver-memory 2G --executor-memory 4G --executor-cores 1 --num-executors 24 \ /mnt/disk1/jch/recommend-emr-dataprocess/target/spark-examples-1.0.0-SNAPSHOT-jar-with-dependencies.jar \ readPath:${readPath} \ beginStr:${start_date} endStr:${end_date} \ repartition:8 \ savePath:${savePath}