ASF Bugzilla – Attachment 36226 Details for
Bug 62872
Writing large files with 800k rows gives java.io.IOException: This archive contains unclosed entries.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Test Case
test62872.txt (text/plain), 1.05 KB, created by
andreas
on 2018-11-01 03:09:11 UTC
(
hide
)
Description:
Test Case
Filename:
MIME Type:
Creator:
andreas
Created:
2018-11-01 03:09:11 UTC
Size:
1.05 KB
patch
obsolete
>@Test > public void test62872() throws Exception { > final int COLUMN_COUNT = 300; > final int ROW_COUNT = 800000; > > SXSSFWorkbook workbook = new SXSSFWorkbook(100); > workbook.setCompressTempFiles(true); > SXSSFSheet sheet = workbook.createSheet("RawData"); > > int numberOfColumns = COLUMN_COUNT; > > SXSSFRow row = sheet.createRow(0); > SXSSFCell cell; > > for (int i = 1; i <= numberOfColumns; i++) { > cell = row.createCell(i - 1); > cell.setCellValue("Column " + i); > } > > for (int i = 1; i < ROW_COUNT; i++) { > row = sheet.createRow(i); > for (int j = 1; j <= numberOfColumns; j++) { > cell = row.createCell(j - 1); > > //make some noise > cell.setCellValue(new Date()); > } > i++; > // if (i % 1000 == 0) > // logger.info("Created Row " + i); > } > > try (FileOutputStream out = new FileOutputStream(File.createTempFile("test62872", ".xlsx"))) { > workbook.write(out); > workbook.dispose(); > workbook.close(); > out.flush(); > } > // logger.info("File written!"); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 62872
:
36225
| 36226 |
36258
|
36286
|
36287