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:
This should be exposed both for FileSystem and FileContext.