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

Jing Zhao commented on HDFS-3952:
---------------------------------

When using libwebhdfs for writing, buffered data may exist in two places: 1) 
local buffer for http put/post operations, which can be handled locally and has 
already been addressed in the current libwebhdfs, and 2) buffer in the remote 
datanode. For 2), because in webhdfs the remote datanode may act as a proxy 
where a DFSClient is utilized for writing, the main buffered data (which we 
want to flush/hflush) actually resides in the DFSOutputStream created by the 
DFSClient. 

Thus to implement hdfsHFlush, we can simply close the current http connection 
to trigger the close() method of the remote DFSOutputStream, and then reconnect 
the remote datanode for further writing. However, this method is semantically 
different with original hflush because other clients can write to the same file 
before the reconnection. Any other suggestions?
                
> Support hdfsHFlush and hdfsFlush in libwebhdfs (C client)
> ---------------------------------------------------------
>
>                 Key: HDFS-3952
>                 URL: https://issues.apache.org/jira/browse/HDFS-3952
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>    Affects Versions: 3.0.0
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>
> Currently libwebhdfs (C client used to call webhdfs) does not support 
> hdfsFlush and hdfsFlush. We plan to realize these two functions in libwebhdfs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to