FAQ
Hi -

Is it possible to set the access time of a HDFS directory programmatically?

I’m using 0.20.204.0.

I need to do that in unit tests, where my clean up program is going to remove files/dirs whose access time is too far in the past. I can setTimes on the test files without any problem, but not on the directories... The directories created automatically when I create the test fiels have a date (with getAccessTime) of 1969/12/31 16:00 and I can’t control that date, which makes my unit testing impossible.

By the way, setTimes doesn’t allow to set the date on dirs, but getAccessTime is happy to return a date, which is inconsistent, IMHO.

Finally, on our production systems, I’m seeing appropriate dates for both files and directories.

Any insight appreciated,

Thanks!

Frank

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupcommon-user @
categorieshadoop
postedJan 4, '12 at 7:09p
activeJan 4, '12 at 7:09p
posts1
users1
websitehadoop.apache.org...
irc#hadoop

1 user in discussion

Frank Astier: 1 post

People

Translate

site design / logo © 2022 Grokbase