[
https://issues.apache.org/jira/browse/HADOOP-3177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601786#action_12601786
]
Tsz Wo (Nicholas), SZE commented on HADOOP-3177:
------------------------------------------------
The class for the wrapperStream is OutputStream. I think it should be
java.io.FileOutputStream since we are doing FileSystem. Then, the new method
FSDataOutputStream.fsync() just has to call wrapperStream.getFD().sync(). This
will work for all FileSystem
For DFS, we need to define a new class, say DfsFileDescriptor, extending
java.io.FileDescriptor and make DfsFileDescriptor.sync() calls
DFSOutputStream.fsync().
For other FileSystem subclass, if getFD() is not defined, we could throw
IOException("not supported").
> Expose DFSOutputStream.fsync API though the FileSystem interface
> ----------------------------------------------------------------
>
> Key: HADOOP-3177
> URL: https://issues.apache.org/jira/browse/HADOOP-3177
> Project: Hadoop Core
> Issue Type: Improvement
> Components: dfs
> Reporter: dhruba borthakur
> Assignee: dhruba borthakur
>
> In the current code, there is a DFSOutputStream.fsync() API that allows a
> client to flush all buffered data to the datanodes and also persist block
> locations on the namenode. This API should be exposed through the generic API
> in the org.hadoop.fs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.