Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
Patch
Description
The FLUSH_PASSED_TO_STREAM feature of jackson's JSONGenerator controls if flush calls to JsonEncoder are passed to the underlying stream. The default value for this is true causing the underlying stream to be flushed every time encoder.flush is called. Currently, JsonEncoder doesn't provide a way to change this behaviour. In many scenarios, a flush call is made to the encoder with the intention of flushing the buffer to the underlying stream, and not the stream itself, which has a detrimental impact on performance. The patch provided creates a way to specify the default behaviour of underlying JSONGenerator during JsonEncoder's initialization itself. This will be extremely helpful in scenarios such as Hadoop's MR Evenwriter, allowing the caller to set the desired behaviour for optimal performance.
Attachments
Attachments
Issue Links
- links to