You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by he...@apache.org on 2021/01/03 08:40:17 UTC
[hadoop] branch branch-2.10 updated: HDFS-15751. Add documentation
for msync() API to filesystem.md. Contributed by Konstantin V Shvachko.
This is an automated email from the ASF dual-hosted git repository.
hexiaoqiao pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-2.10 by this push:
new 1efadde HDFS-15751. Add documentation for msync() API to filesystem.md. Contributed by Konstantin V Shvachko.
1efadde is described below
commit 1efadde067b53829ac67b9acf242c93b87503582
Author: He Xiaoqiao <he...@apache.org>
AuthorDate: Sun Jan 3 16:25:17 2021 +0800
HDFS-15751. Add documentation for msync() API to filesystem.md. Contributed by Konstantin V Shvachko.
Reviewed-by: He Xiaoqiao <he...@apache.org>
Reviewed-by: Chao Sun <su...@apache.org>
---
.../src/site/markdown/filesystem/filesystem.md | 30 ++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md b/hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md
index 8897019..5c5cc76 100644
--- a/hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md
+++ b/hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md
@@ -92,6 +92,36 @@ Get the status of a path
stat.isEncrypted = False
+
+### `msync()`
+
+Synchronize metadata state of the client with the latest state of the metadata
+service of the FileSystem.
+
+In highly available FileSystems standby service can be used as a read-only
+metadata replica. This call is essential to guarantee consistency of
+reads from the standby replica and to avoid stale reads.
+
+It is currently only implemented for HDFS and others will just throw
+`UnsupportedOperationException`.
+
+#### Preconditions
+
+
+#### Postconditions
+
+This call internally records the state of the metadata service at the time of
+the call. This guarantees consistency of subsequent reads from any metadata
+replica. It assures the client will never access the state of the metadata that
+preceded the recorded state.
+
+#### HDFS implementation notes
+
+HDFS supports `msync()` in HA mode by calling the Active NameNode and requesting
+its latest journal transaction ID. For more details see HDFS documentation
+[Consistent Reads from HDFS Observer NameNode](https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/ObserverNameNode.html)
+
+
### `Path getHomeDirectory()`
The function `getHomeDirectory` returns the home directory for the FileSystem
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org