You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Buddy (JIRA)" <ji...@apache.org> on 2014/02/03 16:54:09 UTC
[jira] [Updated] (HDFS-5868) Make hsync implementation pluggable
[ https://issues.apache.org/jira/browse/HDFS-5868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Buddy updated HDFS-5868:
------------------------
Attachment: HDFS-5868.patch
Here is a proposal for allowing implementations of the FsDatasetSpi plugin to implement hsync on streams that are not FileOutputStreams by extending ReplicaOutputStreams and overridding sync.
> Make hsync implementation pluggable
> -----------------------------------
>
> Key: HDFS-5868
> URL: https://issues.apache.org/jira/browse/HDFS-5868
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: datanode
> Affects Versions: 2.4.0
> Reporter: Buddy
> Attachments: HDFS-5868.patch
>
>
> The current implementation of hsync in BlockReceiver only works if the output streams are instances of FileOutputStream. Therefore, there is currently no way for a FSDatasetSpi plugin to implement hsync if it is not using standard OS files.
> One possible solution is to push the implementation of hsync into the ReplicaOutputStreams class. This class is constructed by the ReplicaInPipeline which is constructed by the FSDatasetSpi plugin, therefore it can be extended. Instead of directly calling sync on the output stream, BlockReceiver would call ReplicaOutputStream.sync. The default implementation of sync in ReplicaOutputStream would be the same as the current implementation in BlockReceiver.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)