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
5450c936
Commit
5450c936
authored
Apr 07, 2023
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新版本的下载
parent
681e41fc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
14 deletions
+9
-14
FlatQueryResultServiceImpl.java
...ud/data/hook/service/impl/FlatQueryResultServiceImpl.java
+2
-3
ExcelTest.java
gic-cloud-data-hook-service/src/test/java/ExcelTest.java
+0
-4
Test.java
gic-cloud-data-hook-service/src/test/java/Test.java
+0
-0
hdfs.java
gic-cloud-data-hook-service/src/test/java/hdfs.java
+7
-7
No files found.
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/impl/FlatQueryResultServiceImpl.java
View file @
5450c936
...
@@ -893,7 +893,6 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
...
@@ -893,7 +893,6 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
xlsxFiles
.
add
(
currentFile
.
get
().
filepath
);
xlsxFiles
.
add
(
currentFile
.
get
().
filepath
);
}
}
saveXlsSplitNew
(
currentFile
.
get
().
filepath
,
cells
,
titles
,
currentFile
.
get
(),
count
,
false
);
saveXlsSplitNew
(
currentFile
.
get
().
filepath
,
cells
,
titles
,
currentFile
.
get
(),
count
,
false
);
count
.
incrementAndGet
();
});
});
//结束
//结束
saveXlsSplitNew
(
currentFile
.
get
().
filepath
,
null
,
null
,
currentFile
.
get
(),
count
,
true
);
saveXlsSplitNew
(
currentFile
.
get
().
filepath
,
null
,
null
,
currentFile
.
get
(),
count
,
true
);
...
@@ -1225,8 +1224,8 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
...
@@ -1225,8 +1224,8 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
DataFormat
yyyyMMddDataFormat
=
xlsxFileInfo
.
workbook
.
createDataFormat
();
DataFormat
yyyyMMddDataFormat
=
xlsxFileInfo
.
workbook
.
createDataFormat
();
yyyyMMdd
.
setDataFormat
(
yyyyMMddDataFormat
.
getFormat
(
"yyyy-MM-dd"
));
yyyyMMdd
.
setDataFormat
(
yyyyMMddDataFormat
.
getFormat
(
"yyyy-MM-dd"
));
xlsxFileInfo
.
yyyyMMdd
=
yyyyMMdd
;
xlsxFileInfo
.
yyyyMMdd
=
yyyyMMdd
;
count
.
incrementAndGet
();
}
}
count
.
incrementAndGet
();
SXSSFWorkbook
wb
=
xlsxFileInfo
.
workbook
;
// 内存中保留 100 行
SXSSFWorkbook
wb
=
xlsxFileInfo
.
workbook
;
// 内存中保留 100 行
if
(!
endFlag
)
{
if
(!
endFlag
)
{
...
@@ -1265,7 +1264,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
...
@@ -1265,7 +1264,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
}
}
Integer
limitSize
=
FileUtil
.
getLimitSize
();
Integer
limitSize
=
FileUtil
.
getLimitSize
();
int
c
=
count
.
get
();
int
c
=
count
.
get
();
if
(
c
>
limitSize
||
endFlag
)
{
if
(
c
>
=
limitSize
.
intValue
()
||
endFlag
)
{
logger
.
info
(
"{}-count:{}"
,
originalFilePath
,
count
.
get
());
logger
.
info
(
"{}-count:{}"
,
originalFilePath
,
count
.
get
());
FileOutputStream
fileOut
=
new
FileOutputStream
(
originalFilePath
);
FileOutputStream
fileOut
=
new
FileOutputStream
(
originalFilePath
);
wb
.
write
(
fileOut
);
wb
.
write
(
fileOut
);
...
...
gic-cloud-data-hook-service/src/test/java/ExcelTest.java
View file @
5450c936
...
@@ -21,10 +21,6 @@ public class ExcelTest {
...
@@ -21,10 +21,6 @@ public class ExcelTest {
DataFormat
format
=
wb
.
createDataFormat
();
DataFormat
format
=
wb
.
createDataFormat
();
cellStyle
.
setDataFormat
(
format
.
getFormat
(
"yyyy-MM-dd HH:mm:ss"
));
cellStyle
.
setDataFormat
(
format
.
getFormat
(
"yyyy-MM-dd HH:mm:ss"
));
// CellStyle cellStyle = wb.createCellStyle();
// DataFormat format = wb.createDataFormat();
// cellStyle.setDataFormat(format.getFormat("yyyy-MM-dd HH:mm:ss"));
int
n
=
0
;
int
n
=
0
;
do
{
do
{
Row
row
=
sheet
.
createRow
(
n
);
Row
row
=
sheet
.
createRow
(
n
);
...
...
gic-cloud-data-hook-service/src/test/java/Test.java
View file @
5450c936
This diff is collapsed.
Click to expand it.
gic-cloud-data-hook-service/src/test/java/hdfs.java
View file @
5450c936
...
@@ -20,13 +20,13 @@ public class hdfs {
...
@@ -20,13 +20,13 @@ public class hdfs {
// e.printStackTrace();
// e.printStackTrace();
// }
// }
// HDFSUtil.getInstance().downloadFile("/data/emr/order-1.csv
","D:\\testorder");
HDFSUtil
.
getInstance
().
downloadFile
(
"/data/hook/hdfs1680836264869
"
,
"D:\\testorder"
);
Integer
[]
arr
=
new
Integer
[]{
1
,
2
,
3
,
4
,
5
,
6
};
//
Integer[] arr=new Integer[]{1,2,3,4,5,6};
Arrays
.
asList
(
arr
).
parallelStream
().
forEach
(
mid
->{
//
Arrays.asList(arr).parallelStream().forEach(mid->{
Thread
thread
=
Thread
.
currentThread
();
//
Thread thread = Thread.currentThread();
String
name
=
thread
.
getName
();
//
String name = thread.getName();
System
.
out
.
println
(
name
);
//
System.out.println(name);
});
//
});
// try{
// try{
// CSVReader csvReader = new CSVReader(new FileReader("C:\\Users\\hua\\Desktop\\part-00000-fa2dd286-1eda-452d-91a3-a222beb0f327-c000.csv"));
// CSVReader csvReader = new CSVReader(new FileReader("C:\\Users\\hua\\Desktop\\part-00000-fa2dd286-1eda-452d-91a3-a222beb0f327-c000.csv"));
...
...
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