You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Mariia Mykhailova (JIRA)" <ji...@apache.org> on 2016/11/01 23:01:59 UTC

[jira] [Updated] (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 ]

Mariia Mykhailova updated REEF-1660:
------------------------------------
    Issue Type: Sub-task  (was: Bug)
        Parent: REEF-345

> 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
>
> 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)