Commit 58049861 by fudahua

feat: 新版本的下载

parent 3c96e6d0
...@@ -47,7 +47,7 @@ public class HDFSUtil { ...@@ -47,7 +47,7 @@ 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)); fileSystem.copyToLocalFile(false,new Path(srcPath),new Path(toPath));
return true; return true;
} catch (IOException e) { } catch (IOException e) {
logger.info("下载失败:{}",e); logger.info("下载失败:{}",e);
......
...@@ -997,6 +997,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService { ...@@ -997,6 +997,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
} }
func.deal(cells,titles,first); func.deal(cells,titles,first);
}while ((cells = csvReader.readNext())!=null); }while ((cells = csvReader.readNext())!=null);
logger.info("读取结束:{}",midFile.getName());
csvReader.close(); csvReader.close();
} catch (Exception e) { } catch (Exception e) {
logger.info("读取异常:{}",e); logger.info("读取异常:{}",e);
...@@ -1208,7 +1209,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService { ...@@ -1208,7 +1209,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
} }
count.incrementAndGet(); count.incrementAndGet();
} }
logger.info("{}-count:{}",originalFilePath,count.get());
SXSSFWorkbook wb = xlsxFileInfo.workbook; // 内存中保留 100 行 SXSSFWorkbook wb = xlsxFileInfo.workbook; // 内存中保留 100 行
if (!endFlag) { if (!endFlag) {
......
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