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
02eeafe1
Commit
02eeafe1
authored
Apr 26, 2023
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 删除文件
parent
0e338de7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
FlatQueryResultServiceImpl.java
...ud/data/hook/service/impl/FlatQueryResultServiceImpl.java
+5
-2
No files found.
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/impl/FlatQueryResultServiceImpl.java
View file @
02eeafe1
...
@@ -910,6 +910,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
...
@@ -910,6 +910,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
logger
.
info
(
"不存在"
);
logger
.
info
(
"不存在"
);
return
;
return
;
}
}
boolean
delHiveFile
=
true
;
Integer
queryDataType
=
task
.
getQueryDataType
();
Integer
queryDataType
=
task
.
getQueryDataType
();
FlatQueryTaskCondition
condition
=
JSON
.
parseObject
(
task
.
getDownloadCondition
(),
FlatQueryTaskCondition
.
class
);
FlatQueryTaskCondition
condition
=
JSON
.
parseObject
(
task
.
getDownloadCondition
(),
FlatQueryTaskCondition
.
class
);
if
(!
task
.
getStatus
().
equals
(
DownloadTaskStatus
.
BUILDING
))
{
if
(!
task
.
getStatus
().
equals
(
DownloadTaskStatus
.
BUILDING
))
{
...
@@ -921,8 +922,6 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
...
@@ -921,8 +922,6 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
//下载文件
//下载文件
String
dirName
=
HDFSUtil
.
getInstance
().
getHdfsName
(
task
.
getId
());
String
dirName
=
HDFSUtil
.
getInstance
().
getHdfsName
(
task
.
getId
());
String
path
=
HDFSUtil
.
getInstance
().
getHdfsPath
(
task
.
getId
());
String
path
=
HDFSUtil
.
getInstance
().
getHdfsPath
(
task
.
getId
());
HDFSUtil
.
getInstance
().
getHdfsName
(
task
.
getId
());
try
{
try
{
StopWatch
stopWatch
=
StopWatch
.
create
(
"down"
);
StopWatch
stopWatch
=
StopWatch
.
create
(
"down"
);
stopWatch
.
start
();
stopWatch
.
start
();
...
@@ -958,6 +957,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
...
@@ -958,6 +957,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
if
(
task
.
getAmount
()!=
total
.
intValue
())
{
if
(
task
.
getAmount
()!=
total
.
intValue
())
{
String
msg
=
"取数任务:"
+
task
.
getId
()+
"下载数量对不上: 数量: "
+
task
.
getAmount
()+
"->"
+
total
;
String
msg
=
"取数任务:"
+
task
.
getId
()+
"下载数量对不上: 数量: "
+
task
.
getAmount
()+
"->"
+
total
;
DingWarningUtil
.
sendCountWarning
(
msg
);
DingWarningUtil
.
sendCountWarning
(
msg
);
delHiveFile
=
false
;
}
}
stopWatch
.
start
();
stopWatch
.
start
();
//是否压缩
//是否压缩
...
@@ -993,6 +993,9 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
...
@@ -993,6 +993,9 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
DownloadTaskServiceImpl
.
getInstance
().
updateDownloadTask
(
task
);
DownloadTaskServiceImpl
.
getInstance
().
updateDownloadTask
(
task
);
//删除文件
//删除文件
delFileOrDirByTaskId
(
task
.
getId
());
delFileOrDirByTaskId
(
task
.
getId
());
if
(
delHiveFile
)
{
HDFSUtil
.
getInstance
().
deleteFile
(
path
);
}
}
}
}
}
...
...
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