Commit 4debf60f by 陶光胜

优化

parent 98a9893e
......@@ -94,7 +94,7 @@ public class HiveHelper implements ApplicationContextAware {
e.printStackTrace();
}
}
return null;
throw new RuntimeException("获取连接异常");
} // TRY CATCH OVER
}
......@@ -109,6 +109,7 @@ public class HiveHelper implements ApplicationContextAware {
conn = balaDownloadSource.getConnection();
return conn;
} catch (Exception ex) {
DingtalkMessageUtil.sendAlertMessage("获取bala下载连接告警:获取连接超时", "https://oapi.dingtalk.com/robot/send?access_token=157ad00c2b6491f2f0aac1d89121e4bd2d82d9d33cad0596b88dacfdc12fe455");
ex.printStackTrace();
if (conn != null) {
try {
......@@ -117,7 +118,7 @@ public class HiveHelper implements ApplicationContextAware {
e.printStackTrace();
}
}
return null;
throw new RuntimeException("获取连接异常");
} // TRY CATCH OVER
}
......
......@@ -546,11 +546,17 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
log.debug("自助指标当前正在执行的任务为:", JSON.toJSONString(taskConditions.get(i)));
if (taskConditions.get(i).getBuildPermitted().equals(Global.YES)
&& !taskConditions.get(i).getEnterpriseIds().contains("ff8080816dd0385e016ddca436d01fe1")) {
condition = taskConditions.remove(i); // 移除并获取第一个任务条件
break;
try{
connection = HiveHelper.getDownloadHiveConnection();
condition = taskConditions.remove(i); // 移除并获取第一个任务条件
break;
}catch (Exception e){
log.debug("获取连接异常:", e.getMessage());
e.printStackTrace();
continue;
}
} // IF OVER
} // FOR OVER
connection = HiveHelper.getDownloadHiveConnection();
takeFile(condition, connection);
} // 没有任务则忽略
}catch (Exception e){
......@@ -589,11 +595,19 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
log.debug("自助指标当前正在执行的任务为:", JSON.toJSONString(taskConditions.get(i)));
if (taskConditions.get(i).getBuildPermitted().equals(Global.YES)
&& taskConditions.get(i).getEnterpriseIds().contains("ff8080816dd0385e016ddca436d01fe1")) {
condition = taskConditions.remove(i); // 移除并获取第一个任务条件
break;
try{
connection = HiveHelper.getBalaDownloadHiveConnection();
condition = taskConditions.remove(i); // 移除并获取第一个任务条件
break;
}catch (Exception e){
log.debug("获取连接异常:", e.getMessage());
e.printStackTrace();
continue;
}
} // IF OVER
} // FOR OVER
connection = HiveHelper.getBalaDownloadHiveConnection();
takeFile(condition, connection);
} // 没有任务则忽略
}catch (Exception e){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment