Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super sxssf #184

Closed
wants to merge 8 commits into from
Closed

Super sxssf #184

wants to merge 8 commits into from

Conversation

mobreza
Copy link

@mobreza mobreza commented Jun 26, 2020

Rebased MR #141 on master.

@mobreza
Copy link
Author

mobreza commented Jun 26, 2020

@pjfanning This is to resume discussions and figure out if this code is still useful since it's a year since the previous MR.

@pjfanning
Copy link
Contributor

This code does not compile

@pjfanning
Copy link
Contributor

  • protected ISheetInjector createSheetInjector(InputStream xis) throws IOException is now correct
  • I don't like the SuperSXSSF names, can we use EmittingSXSSF instead?

The workbook constructor does not compile but this does

    public EmittingSXSSFWorkbook(XSSFWorkbook workbook, int rowAccessWindowSize) {
        super(workbook, rowAccessWindowSize, false, false);
    }
@pjfanning
Copy link
Contributor

Thanks. Merged with f06c454

We can treat this as beta for now, as I expect that we might need to add some checks to handle edge cases.

@mobreza
Copy link
Author

mobreza commented Jun 28, 2020

I'll check our existing code that uses this extension. What's the URL of the maven SNAPSHOTS repository?

@mobreza
Copy link
Author

mobreza commented Jun 28, 2020

Thanks, will have a look. I was expecting it at https://repository.apache.org/content/groups/snapshots.

@pjfanning
Copy link
Contributor

mobreza#1 (comment) provides an example of how to use code (except the SuperSXXSF classes are renamed as EmittingSXXSF

@pjfanning
Copy link
Contributor

@mobreza I'm struggling to think of a good name for these classes. SuperSXSSF was too vague but EmittingSXSSF is not right either. How about DeferredSXSSF or LazySXSSF because of the fact that the actual generation of the rows is delayed until you start writing to the output stream?

@mobreza
Copy link
Author

mobreza commented Jun 29, 2020

Migration from 3.17 (!) to 5.0.0-SNAPSHOT required renaming the SuperSXSSF* to EmittingSXSSF* and some minor updates: https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/compare/master...apache-poi-5.0.0-SNAPSHOT

I didn't experience any problems with generating Excel files. Downloads start immediately and canceling the download request results in ending the database scan:

07:06:04,435 qtp1795970853-260  WARN o.g.s.s.i.DownloadServiceImpl:277 - Writing Excel to output stream
07:06:08,744 qtp1795970853-260  WARN o.g.s.s.i.DownloadServiceImpl:206 - Error generating: org.eclipse.jetty.io.EofException
07:06:08,749 qtp1795970853-260  WARN o.g.s.a.v.AccessionController:553 - Download was aborted: Closed

Our code uses templates and blank workbooks.

@pjfanning
Copy link
Contributor

Renamed the classes in 9f8b864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants