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

Konstantin Shvachko commented on HDFS-15567:
--------------------------------------------

Here are some options to start the discussion:
# A straightforward way is to just add {{msync()}} to {{FileSystem}} with the 
default implementation as unsupported operation. This is similar to snapshot or 
extended attributes operations, which have meaningful implementation only for 
HDFS-based file systems: {{WebHdfsFileSystem}}, {{ViewFileSystem}}.
# Add  {{DistributedFileSystem.msync()}}, but not {{FileSystem}}. {{msync()}} 
is specific to HDFS, although both WebHDFS and ViewFS can benefit from it.
# Expose {{msync()}} via some utility class like {{HAUtil}}. In the end it is 
an HA feature.
# Do nothing - calling {{msync()}} via DFSClient is good enough.

> [SBN Read] HDFS should expose msync() API to allow downstream applications 
> call it explicetly.
> ----------------------------------------------------------------------------------------------
>
>                 Key: HDFS-15567
>                 URL: https://issues.apache.org/jira/browse/HDFS-15567
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: ha, hdfs-client
>            Reporter: Konstantin Shvachko
>            Priority: Major
>
> Consistent reads from Standby introduced {{msync()}} API HDFS-13688, which 
> updates client's state ID with current state of the Active NameNode to 
> guarantee consistency of subsequent calls to an ObserverNode. Currently this 
> API is exposed via {{DFSClient}} only, which makes it hard for applications 
> to access {{msync()}}. One way is to use something like this:
> {code}
> if(fs instanceof DistributedFileSystem) {
>   ((DistributedFileSystem)fs).getClient().msync();
> }
> {code}
> This should be exposed both for {{FileSystem}} and {{FileContext}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to