Chris Nauroth commented on HADOOP-13625:

This information potentially could go into the file system spec or the end user 
documentation (or both).

Here are the things that set mtime in HDFS.  Some of these are clearly not 
relevant to object stores (e.g. only HDFS implements snapshots and the symlink 
feature is dormant/experimental/unused).

* {{FileSystem#concat}}
* {{FileSystem#create}}
* {{FileSystem#createSnapshot}}
* {{FileSystem#createSymlink}}
* {{FileSystem#rename}} updates mtime for the parent directories (but not the 
renamed file/directory itself)
* {{FileSystem#setTimes}}
* {{FileSystem#truncate}}
* {{FSDataOutputStream#close}}

Here are some notable things that do not update mtime in HDFS.

* {{FileSystem#append}} (though the eventual FSDataOutputStream#close would do 
* {{FSDataOutputStream#hflush}} and {{hsync}}
* crossing a block boundary during {{FSDataOutputStream#write}}

> Document FileSystem actions that trigger update of modification time.
> ---------------------------------------------------------------------
>                 Key: HADOOP-13625
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13625
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Chris Nauroth
> Hadoop users and developers of Hadoop-compatible file systems have sometimes 
> asked questions about which file system actions trigger an update of the 
> path's modification time.  This issue proposes to document which actions do 
> and do not update modification time, so that the information is easy to find 
> without reading HDFS code or manually testing individual cases.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to