[
https://issues.apache.org/jira/browse/HADOOP-10544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14323438#comment-14323438
]
Akira AJISAKA commented on HADOOP-10544:
----------------------------------------
Tried some queries, hit an error.
{code}
# hdfs dfs -find . \( -name "a*" \( -o -name "b*" \) -a -name "*c"
-find: Fatal internal error
java.util.NoSuchElementException
at java.util.LinkedList.removeFirst(LinkedList.java:268)
at java.util.LinkedList.pop(LinkedList.java:799)
at
org.apache.hadoop.fs.shell.find.BaseExpression.addChildren(BaseExpression.java:212)
at org.apache.hadoop.fs.shell.find.Or.addChildren(Or.java:73)
at org.apache.hadoop.fs.shell.find.Find.parseExpression(Find.java:327)
at org.apache.hadoop.fs.shell.find.Find.parseExpression(Find.java:279)
at org.apache.hadoop.fs.shell.find.Find.parseExpression(Find.java:279)
at org.apache.hadoop.fs.shell.find.Find.processOptions(Find.java:201)
at org.apache.hadoop.fs.shell.Command.run(Command.java:165)
at org.apache.hadoop.fs.FsShell.run(FsShell.java:287)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at org.apache.hadoop.fs.FsShell.main(FsShell.java:340)
{code}
Would you validate the number of arguments in {{addChildren}}/{{addArguments}}
and throw {{IllegalArgumentException}} when the number of arguments is wrong?
In addition, would you validate
* the number of '(' matches the number of ')',
* and the number of ')' does not exceed the number of '(' at any point?
> Find command - add operator functions to find command
> -----------------------------------------------------
>
> Key: HADOOP-10544
> URL: https://issues.apache.org/jira/browse/HADOOP-10544
> Project: Hadoop Common
> Issue Type: Sub-task
> Reporter: Jonathan Allen
> Assignee: Jonathan Allen
> Priority: Minor
> Attachments: HADOOP-10544.patch, HADOOP-10544.patch,
> HADOOP-10544.patch, HADOOP-10544.patch, HADOOP-10544.patch
>
>
> Add operator functions (OR, NOT) to the find command created under
> HADOOP-8989.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)