[ 
https://issues.apache.org/jira/browse/AVRO-2282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Saurabh updated AVRO-2282:
--------------------------
    Description: The 
[FLUSH_PASSED_TO_STREAM|https://github.com/codehaus/jackson/blob/0a27dab7220032346b78f09c55f4428a1284977a/src/java/org/codehaus/jackson/JsonGenerator.java#L120]
 feature of 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.   (was: The 
F[LUSH_PASSED_TO_STREAM|https://github.com/codehaus/jackson/blob/0a27dab7220032346b78f09c55f4428a1284977a/src/java/org/codehaus/jackson/JsonGenerator.java#L120]
 feature of 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. )

> Control default FLUSH_PASSED_TO_STREAM behavior of JsonEncoder
> --------------------------------------------------------------
>
>                 Key: AVRO-2282
>                 URL: https://issues.apache.org/jira/browse/AVRO-2282
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Saurabh
>            Priority: Major
>             Fix For: 1.7.4
>
>         Attachments: avrojsonencoder1.patch, avrojsonencoder1.patch
>
>
> The 
> [FLUSH_PASSED_TO_STREAM|https://github.com/codehaus/jackson/blob/0a27dab7220032346b78f09c55f4428a1284977a/src/java/org/codehaus/jackson/JsonGenerator.java#L120]
>  feature of 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. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to