hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswara Rao G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8989) hadoop dfs -find feature
Date Wed, 09 Apr 2014 19:34:35 GMT

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

Uma Maheswara Rao G commented on HADOOP-8989:
---------------------------------------------

On quick look at your patch:
 I think you get the results as full paths
{noformat}
hdfs://127.0.0.1:59894/texttest
hdfs://127.0.0.1:59894/texttest/file..bz2
hdfs://127.0.0.1:59894/texttest/file.deflate
hdfs://127.0.0.1:59894/texttest/file.gz
{noformat}
This should be relative paths I think from where you are finding, no?

Overall your work looks to be great. I think having bulk patch may be had to review and many
things may be overlooked. How about splitting this to small patches?

{code}
/**
 * Implements the -mindepth expression for the
 * {@link org.apache.hadoop.fs.shell.find.Find} command.
 */
final class MaxDepth extends BaseExpression {
{code}
javadoc should say maxdepth



> 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, HADOOP-8989.patch,
HADOOP-8989.patch, HADOOP-8989.patch, HADOOP-8989.patch, HADOOP-8989.patch, HADOOP-8989.patch,
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 was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message