HdrLogProcessing icon indicating copy to clipboard operation
HdrLogProcessing copied to clipboard

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

Open pingtimeout opened this issue 4 years ago • 0 comments

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.

pingtimeout avatar Feb 26 '21 13:02 pingtimeout