Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 852b45a

Browse files
authored
Add comment on HDFS's strategy for updating access time by MetadataUpdateEvent (#2071)
1 parent 3385309 commit 852b45a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

smart-hadoop-support/smart-hadoop/src/main/java/org/smartdata/hdfs/metric/fetcher/InotifyEventApplier.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ private List<String> getSqlStatement(Event event) throws IOException, MetaStoreE
146146
", dest path:" + ((Event.RenameEvent) event).getDstPath());
147147
return this.getRenameSql((Event.RenameEvent)event);
148148
case METADATA:
149+
// The property dfs.namenode.accesstime.precision in HDFS's configuration controls
150+
// the precision of access time. Its default value is 1h. To avoid missing a
151+
// MetadataUpdateEvent for updating access time, a smaller value should be set.
149152
path = ((Event.MetadataUpdateEvent)event).getPath();
150153
if (shouldIgnore(path)) {
151154
return Arrays.asList();

0 commit comments

Comments
 (0)