|
@@ -44,23 +44,23 @@ HADOOP=/opt/apps/HADOOP-COMMON/hadoop-common-current/bin/hadoop
|
|
|
OSS_PATH=oss://art-recommend.oss-cn-hangzhou.aliyuncs.com/zhangbo/
|
|
|
|
|
|
|
|
|
-cat /root/joe/recommend-emr-dataprocess/model/model_nba8_0709_0713.txt |
|
|
|
- awk -F " " '{
|
|
|
- if (NR == 1) {
|
|
|
- print $1"\t"$2
|
|
|
- } else {
|
|
|
- split($0, fields, " ");
|
|
|
- OFS="\t";
|
|
|
- line=""
|
|
|
- for (i = 1; i <= 10 && i <= length(fields); i++) {
|
|
|
- line = (line ? line "\t" : "") fields[i];
|
|
|
- }
|
|
|
- print line
|
|
|
- }
|
|
|
- }' > /root/joe/recommend-emr-dataprocess/model/model_nba8_0709_0713_change.txt
|
|
|
-if [ $? -ne 0 ]; then
|
|
|
- echo "新模型文件格式转换失败"
|
|
|
-fi
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
online_model_path=${OSS_PATH}/${model_name}.txt
|
|
|
$HADOOP fs -test -e ${online_model_path}
|
|
@@ -70,12 +70,12 @@ if [ $? -eq 0 ]; then
|
|
|
else
|
|
|
echo "数据不存在"
|
|
|
fi
|
|
|
-$HADOOP fs -put /root/joe/recommend-emr-dataprocess/model/model_nba8_0709_0713_change.txt ${online_model_path}
|
|
|
+$HADOOP fs -put /root/joe/recommend-emr-dataprocess/model/model_nba8_20240716_change.txt ${online_model_path}
|
|
|
if [ $? -eq 0 ]; then
|
|
|
echo "推荐模型文件至OSS成功"
|
|
|
|
|
|
cp -f ${LAST_MODEL_HOME}/model_online.txt ${LAST_MODEL_HOME}/model_online_$(date +\%Y\%m\%d).txt
|
|
|
- cp -f /root/joe/recommend-emr-dataprocess/model/model_nba8_0709_0713.txt ${LAST_MODEL_HOME}/model_online.txt
|
|
|
+ cp -f /root/joe/recommend-emr-dataprocess/model/model_nba8_20240716.txt ${LAST_MODEL_HOME}/model_online.txt
|
|
|
if [ $? -ne 0 ]; then
|
|
|
echo "模型备份失败"
|
|
|
fi
|