Bladeren bron

feat:添加补数据脚本

zhaohaipeng 9 maanden geleden
bovenliggende
commit
fae58b3dbf
1 gewijzigde bestanden met toevoegingen van 18 en 18 verwijderingen
  1. 18 18
      recommend/data_new_table.sh

+ 18 - 18
recommend/data_new_table.sh

@@ -31,24 +31,24 @@ HADOOP=/opt/apps/HADOOP-COMMON/hadoop-common-current/bin/hadoop
 
 # 0 判断上游表是否生产完成,最长等待到max_hour点
 # shellcheck disable=SC2154
-echo "$(date +%Y-%m-%d_%H-%M-%S)----------step0------------开始校验是否生产完数据,分区信息:beginStr:${begin_early_2_Str}${beginHhStr},endStr:${end_early_2_Str}${endHhStr}"
-while true; do
-  python_return_code=$(python /root/joe/recommend-emr-dataprocess/qiaojialiang/checkHiveDataUtil.py --table ${table} --beginStr ${begin_early_2_Str}${beginHhStr} --endStr ${end_early_2_Str}${endHhStr})
-  echo "python 返回值:${python_return_code}"
-  if [ $python_return_code -eq 0 ]; then
-    echo "Python程序返回0,校验存在数据,退出循环。"
-    break
-  fi
-  echo "Python程序返回非0值,不存在数据,等待五分钟后再次调用。"
-  sleep 300
-  current_hour=$(date +%H)
-  current_minute=$(date +%M)
-  # shellcheck disable=SC2039
-  if (( current_hour > max_hour || (current_hour == max_hour && current_minute >= max_minute) )); then
-    echo "最长等待时间已到,失败:${current_hour}-${current_minute}"
-    exit 1
-  fi
-done
+# echo "$(date +%Y-%m-%d_%H-%M-%S)----------step0------------开始校验是否生产完数据,分区信息:beginStr:${begin_early_2_Str}${beginHhStr},endStr:${end_early_2_Str}${endHhStr}"
+# while true; do
+#   python_return_code=$(python /root/joe/recommend-emr-dataprocess/qiaojialiang/checkHiveDataUtil.py --table ${table} --beginStr ${begin_early_2_Str}${beginHhStr} --endStr ${end_early_2_Str}${endHhStr})
+#   echo "python 返回值:${python_return_code}"
+#   if [ $python_return_code -eq 0 ]; then
+#     echo "Python程序返回0,校验存在数据,退出循环。"
+#     break
+#   fi
+#   echo "Python程序返回非0值,不存在数据,等待五分钟后再次调用。"
+#   sleep 300
+#   current_hour=$(date +%H)
+#   current_minute=$(date +%M)
+#   # shellcheck disable=SC2039
+#   if (( current_hour > max_hour || (current_hour == max_hour && current_minute >= max_minute) )); then
+#     echo "最长等待时间已到,失败:${current_hour}-${current_minute}"
+#     exit 1
+#   fi
+# done
 
 # 1 生产原始数据
 echo "$(date +%Y-%m-%d_%H-%M-%S)----------step1------------开始根据${table}生产原始数据"