Commit 84c71daf by fudahua

feat: 取数平台过滤项

parent b6641bae
...@@ -47,7 +47,9 @@ public class HDFSUtil { ...@@ -47,7 +47,9 @@ public class HDFSUtil {
*/ */
public boolean downloadFile(String srcPath,String toPath) { public boolean downloadFile(String srcPath,String toPath) {
try { try {
fileSystem.copyToLocalFile(true,new Path(srcPath),new Path(toPath)); Config appConfig = ConfigService.getAppConfig();
Integer delFlag = appConfig.getIntProperty("del.hive.flag", 1);
fileSystem.copyToLocalFile(delFlag.intValue()==1?true:false,new Path(srcPath),new Path(toPath));
return true; return true;
} catch (IOException e) { } catch (IOException e) {
logger.info("下载失败:{}",e); logger.info("下载失败:{}",e);
......
...@@ -978,15 +978,15 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService { ...@@ -978,15 +978,15 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
task.setOverTime(new Date()); task.setOverTime(new Date());
task.setFilePath(cloudFileUrl); task.setFilePath(cloudFileUrl);
//删除文件
delFileOrDirByTaskId(task.getId());
}catch (Exception e) { }catch (Exception e) {
logger.info("异常:{}",e); logger.info("异常:{}",e);
task.setStatus(DownloadTaskStatus.ERROR); task.setStatus(DownloadTaskStatus.ERROR);
}finally { }finally {
DownloadTaskServiceImpl.getInstance().updateDownloadTask(task); DownloadTaskServiceImpl.getInstance().updateDownloadTask(task);
//删除文件
delFileOrDirByTaskId(task.getId());
} }
} }
......
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