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

Consume Input stream instead of file in split and to-csv #8

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

pingtimeout
Copy link
Contributor

I recommend to tick the Hide whitespace changes box when reviewing this PR.

This PR is about making sure that OrderedHistogramLogReader consumes an InputStream instead of a File. The change does not impact a lot of the codebase, as HistogramLogScanner already supports reading from an InputStream.

The main advantage is that if a Java application processes a file that is compressed, the GZIPInputStream can be passed straight away to HdrLogProcessing instead of decompressing in a temporary file.

To enable this ^ use case, the SplitHistogramLogs and HdrToCsv logics are extracted to a dedicated class. This makes it possible to include HdrLogProcessing as a library, rather than only use it from the command line.

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

Successfully merging this pull request may close these issues.

None yet

1 participant