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

GAO Rui commented on HDFS-7661:
-------------------------------

I am running into trouble when trying to overwrite and roll by data file file 
channel position by directly operate on underlying {{RandomAccessFile}} of data 
file {{OutputStream}} in {{BlockReceiver#receivePacket()}} just like what we 
are doing for overwrite checksum file.  

I  was planing to truncate both the overwritten data in the end of both data 
file and .meta file in parity datanode, then store the overwritten data in the 
end of .meta file.  One possible way to keep the data before first flush safe 
even if the second flush fails,  maybe we could add {{upgrade/rollback}} 
mechanism of {{DataStorage}} alike method to data/checksum file of parity 
datanodes.    

I will try to address the {{RandomAccessFile}} issue and attach this wip patch 
ASAP. 

> Erasure coding: support hflush and hsync
> ----------------------------------------
>
>                 Key: HDFS-7661
>                 URL: https://issues.apache.org/jira/browse/HDFS-7661
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: GAO Rui
>         Attachments: EC-file-flush-and-sync-steps-plan-2015-12-01.png, 
> HDFS-7661-unitTest-wip-trunk.patch, 
> HDFS-EC-file-flush-sync-design-version1.1.pdf, 
> HDFS-EC-file-flush-sync-design-version2.0.pdf
>
>
> We also need to support hflush/hsync and visible length. 



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

Reply via email to