[jira] [Commented] (HDFS-10352) Allow users to get last access time of a given directory
[ https://issues.apache.org/jira/browse/HDFS-10352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15266999#comment-15266999 ] Colin Patrick McCabe commented on HDFS-10352: - -1. As [~linyiqun] commented, the performance would be bad, because it is O(N) in terms of number of files in the directory. This also would be very confusing to operators, since it doesn't match the semantics of any other known filesystem or operating system. Finally, if users want to take the maximum value of all the entries in a directory, they can easily do this by calling listDir and computing the maximum themselves. This is just as (in)efficient as what is proposed here, and much cleaner. > Allow users to get last access time of a given directory > > > Key: HDFS-10352 > URL: https://issues.apache.org/jira/browse/HDFS-10352 > Project: Hadoop HDFS > Issue Type: Improvement > Components: fs >Affects Versions: 2.6.4 >Reporter: Eric Lin >Assignee: Lin Yiqun >Priority: Minor > > Currently FileStatus.getAccessTime() function will return 0 if path is a > directory, it would be ideal that if a directory path is passed, the code > will go through all the files under the directory and return the MAX access > time of all the files. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-10352) Allow users to get last access time of a given directory
[ https://issues.apache.org/jira/browse/HDFS-10352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15266464#comment-15266464 ] Lin Yiqun commented on HDFS-10352: -- {quote} Maybe we can create another getAccessTime() with different number of parameters. Default to not checking children files, but if forced, the code can check accordingly. {quote} This comment looks resonable. I will post a patch later, assign this JIRA to me. > Allow users to get last access time of a given directory > > > Key: HDFS-10352 > URL: https://issues.apache.org/jira/browse/HDFS-10352 > Project: Hadoop HDFS > Issue Type: Improvement > Components: fs >Affects Versions: 2.6.4 >Reporter: Eric Lin >Priority: Minor > > Currently FileStatus.getAccessTime() function will return 0 if path is a > directory, it would be ideal that if a directory path is passed, the code > will go through all the files under the directory and return the MAX access > time of all the files. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-10352) Allow users to get last access time of a given directory
[ https://issues.apache.org/jira/browse/HDFS-10352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15266174#comment-15266174 ] Eric Lin commented on HDFS-10352: - Hi [~linyiqun], Thanks for your comment. You have a valid point. Maybe we can create another getAccessTime() with different number of parameters. Default to not checking children files, but if forced, the code can check accordingly. I understand its potential issue here if there are too many files under the directory, but this is still a handy feature that can benefit some users, and the edge case probably won't happen often. Thanks > Allow users to get last access time of a given directory > > > Key: HDFS-10352 > URL: https://issues.apache.org/jira/browse/HDFS-10352 > Project: Hadoop HDFS > Issue Type: Improvement > Components: fs >Affects Versions: 2.6.4 >Reporter: Eric Lin >Priority: Minor > > Currently FileStatus.getAccessTime() function will return 0 if path is a > directory, it would be ideal that if a directory path is passed, the code > will go through all the files under the directory and return the MAX access > time of all the files. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-10352) Allow users to get last access time of a given directory
[ https://issues.apache.org/jira/browse/HDFS-10352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15266085#comment-15266085 ] Lin Yiqun commented on HDFS-10352: -- Hi, [~ericlin], I also agree with this. But I'm not sure about its performance when one directory has lots of children files and it maybe costs some time to traverse all children files and compare their time. And finally it return the result slowly. I'm glad to work for this if someone else also support this proposal. > Allow users to get last access time of a given directory > > > Key: HDFS-10352 > URL: https://issues.apache.org/jira/browse/HDFS-10352 > Project: Hadoop HDFS > Issue Type: Bug > Components: fs >Affects Versions: 2.6.4 >Reporter: Eric Lin >Priority: Minor > > Currently FileStatus.getAccessTime() function will return 0 if path is a > directory, it would be ideal that if a directory path is passed, the code > will go through all the files under the directory and return the MAX access > time of all the files. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Commented] (HDFS-10352) Allow users to get last access time of a given directory
[ https://issues.apache.org/jira/browse/HDFS-10352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15266041#comment-15266041 ] Jin-Ho David Shin commented on HDFS-10352: -- test > Allow users to get last access time of a given directory > > > Key: HDFS-10352 > URL: https://issues.apache.org/jira/browse/HDFS-10352 > Project: Hadoop HDFS > Issue Type: Bug > Components: fs >Affects Versions: 2.6.4 >Reporter: Eric Lin >Priority: Minor > > Currently FileStatus.getAccessTime() function will return 0 if path is a > directory, it would be ideal that if a directory path is passed, the code > will go through all the files under the directory and return the MAX access > time of all the files. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org