-
Notifications
You must be signed in to change notification settings - Fork 495
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
fixes #1276: Add streaming support to export JSON and GraphML #1330
Conversation
ExportFileManager cypherFileManager = FileManagerFactory.createFileManager(fileName, false, exportConfig.streamStatements()); | ||
final PrintWriter graphMl = cypherFileManager.getPrintWriter("graphml"); | ||
if (exportConfig.streamStatements()) { | ||
long timeout = exportConfig.getTimeoutSeconds(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we reuse the streaming exporter code across all the export formats (CSV, JSON, GraphML) rather than having the same code multiple times?
I think the only thing that changes is the line that does the write/dump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
printWriter.flush(); | ||
printWriter.close(); | ||
return reporter.stream(); | ||
ExportFileManager cypherFileManager = FileManagerFactory.createFileManager(fileName, false, exportConfig.streamStatements()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last parameter into createFileManager
is unused - can probably delete that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@mneedham I updated the PR. |
Fixes #1276
Add streaming support to export JSON and GraphML
Proposed Changes (Mandatory)
A brief list of proposed changes in order to fix the issue: