You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Markus Weimer (JIRA)" <ji...@apache.org> on 2016/11/02 00:27:58 UTC

[jira] [Resolved] (REEF-1660) Don't close streams in DFSEvaluatorLogOverwriteReaderWriter before flushing them

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

Markus Weimer resolved REEF-1660.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 0.16

Resolved via [#1176|https://github.com/apache/reef/pull/1176]

> Don't close streams in DFSEvaluatorLogOverwriteReaderWriter before flushing them
> --------------------------------------------------------------------------------
>
>                 Key: REEF-1660
>                 URL: https://issues.apache.org/jira/browse/REEF-1660
>             Project: REEF
>          Issue Type: Sub-task
>          Components: REEF-Runtime-YARN
>            Reporter: Mariia Mykhailova
>            Assignee: Mariia Mykhailova
>            Priority: Critical
>             Fix For: 0.16
>
>
> Currently {{DFSEvaluatorLogOverwriteReaderWriter}} has the following code in log writing:
> {noformat}
> IOUtils.copyBytes(inputStream, outputStream, 4096, true);
> ...
> outputStream.hsync();
> if (inputStream != null) {
>   inputStream.close();
> }
> {noformat}
> The 4th parameter in {{copyBytes}} is {{boolean close}}, which directs IOUtils to close streams after copying is done. So when the code gets to {{hsync()}}, it attempts to sync closed stream. This fails on some systems. If we set {{close}} to {{false}}, closing will be done together with flushing, and writing succeeds.



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