[ 
https://issues.apache.org/jira/browse/YARN-5915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15683683#comment-15683683
 ] 

Jason Lowe commented on YARN-5915:
----------------------------------

Sorry for missing this in YARN-4814.  I thought the fix was equivalent because 
calling flush on the json generator won't actually flush the underlying stream 
if JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM is set to false:
{code}
    @Override
    public final void flush()
        throws IOException
    {
        _flushBuffer();
        if (_outputStream != null) {
            if (isEnabled(Feature.FLUSH_PASSED_TO_STREAM)) {
                _outputStream.flush();
            }
        }
    }
{code}

Could you elaborate on how the filesystem flush is getting called?  The mapper 
code is calling jgen.flush on every write, but how is that making it to the 
filesystem if FLUSH_PASSED_TO_STREAM is false on the json generator?  If that 
property is false it appears all flushing the json generator will do is simply 
writing to the underlying output stream (but not flushing), which seems like 
exactly what we want.  Is the output stream unbuffered such that the write is 
acting like a flush?

> ATS 1.5 FileSystemTimelineWriter causes flush() to be called after every 
> event write
> ------------------------------------------------------------------------------------
>
>                 Key: YARN-5915
>                 URL: https://issues.apache.org/jira/browse/YARN-5915
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: timelineserver
>    Affects Versions: 3.0.0-alpha1
>            Reporter: Atul Sikaria
>            Assignee: Atul Sikaria
>         Attachments: YARN-5915.01.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to