Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-cloud
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data-hook
gic-cloud
Commits
4debf60f
Commit
4debf60f
authored
Dec 06, 2021
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
98a9893e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
8 deletions
+23
-8
HiveHelper.java
...main/java/com/gic/cloud/data/hook/service/HiveHelper.java
+3
-2
FlatQueryResultServiceImpl.java
...ud/data/hook/service/impl/FlatQueryResultServiceImpl.java
+20
-6
No files found.
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/HiveHelper.java
View file @
4debf60f
...
...
@@ -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
}
...
...
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/impl/FlatQueryResultServiceImpl.java
View file @
4debf60f
...
...
@@ -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
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment