hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Allen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8989) hadoop dfs -find feature
Date Wed, 28 Nov 2012 22:52:01 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-8989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506017#comment-13506017
] 

Jonathan Allen commented on HADOOP-8989:
----------------------------------------

Allen - I haven't done any specific studies of the NN impact but I would expect it to be the
same as any of the existing recursive command (e.g. ls -R).  The code uses the existing recursion
code and applies the expressions to the returned FileStatus on the client side.  The -exec
option obviously impacts the NN but no more than if you ran the command directly (though you
don't have the JVM start-up overhead so the rate of NN messages will be higher).

Wolfgang - I'll look at adding those option expressions in (I got to the point where it looked
like I'd be adding expressions forever so I decided to stop and see what people asked for).

Daryn - if you do get a chance to review this then the main code is pretty much finished (though
I need to sort out the formatting before submitting properly) but I've reworked the unit tests
since uploading the last patch (I'll upload a new at the weekend).  I still need to update
the documentation web page and add some stuff in the CLI test suites.
                
> hadoop dfs -find feature
> ------------------------
>
>                 Key: HADOOP-8989
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8989
>             Project: Hadoop Common
>          Issue Type: New Feature
>            Reporter: Marco Nicosia
>            Assignee: Jonathan Allen
>         Attachments: HADOOP-8989.patch, HADOOP-8989.patch, HADOOP-8989.patch
>
>
> Both sysadmins and users make frequent use of the unix 'find' command, but Hadoop has
no correlate. Without this, users are writing scripts which make heavy use of hadoop dfs -lsr,
and implementing find one-offs. I think hdfs -lsr is somewhat taxing on the NameNode, and
a really slow experience on the client side. Possibly an in-NameNode find operation would
be only a bit more taxing on the NameNode, but significantly faster from the client's point
of view?
> The minimum set of options I can think of which would make a Hadoop find command generally
useful is (in priority order):
> * -type (file or directory, for now)
> * -atime/-ctime-mtime (... and -creationtime?) (both + and - arguments)
> * -print0 (for piping to xargs -0)
> * -depth
> * -owner/-group (and -nouser/-nogroup)
> * -name (allowing for shell pattern, or even regex?)
> * -perm
> * -size
> One possible special case, but could possibly be really cool if it ran from within the
NameNode:
> * -delete
> The "hadoop dfs -lsr | hadoop dfs -rm" cycle is really, really slow.
> Lower priority, some people do use operators, mostly to execute -or searches such as:
> * find / \(-nouser -or -nogroup\)
> Finally, I thought I'd include a link to the [Posix spec for find|http://www.opengroup.org/onlinepubs/009695399/utilities/find.html]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message