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

Shashikant Banerjee commented on HADOOP-15074:
----------------------------------------------

I propose the following change in the DFSOutputStream#hsync api to ensure the 
file size gets updated at the namenode when hsync completes.
{code:java}
@Override
public void hsync() throws IOException {
   try (TraceScope ignored = dfsClient.newPathTraceScope("hsync", src)) {
      flushOrSync(true, EnumSet.of(SyncFlag.UPDATE_LENGTH));
   }
}{code}
[~arpitagarwal]/others, please let me know your opinion on this.

> SequenceFile#Writer flush does not update the length of the written file.
> -------------------------------------------------------------------------
>
>                 Key: HADOOP-15074
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15074
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Mukul Kumar Singh
>            Assignee: Shashikant Banerjee
>            Priority: Major
>
> SequenceFile#Writer flush does not update the length of the file. This 
> happens because as part of the flush, {{UPDATE_LENGTH}} flag is not passed to 
> the DFSOutputStream#hsync.



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

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

Reply via email to