- #!/bin/sh
- day=$1
- root_path="/root/spark-data"
- oss_hdfs_path="oss://art-recommend.oss-cn-hangzhou.aliyuncs.com/"
- model_path="$root_path/model"
- model_online="$model_path/online"
- cat $model_path/model_ctr_$day.txt | sed '1d' | awk -F " " '{if($2!="0") print $1"\t"$2}' > $model_online/model_ad_ctr.txt
- hdfs dfs -rmr ${oss_hdfs_path}/ad_ctr_model/model_ad_ctr.txt
- hdfs dfs -put $model_online/model_ad_ctr.txt ${oss_hdfs_path}/ad_ctr_model/
|