[
https://issues.apache.org/jira/browse/HADOOP-10544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14323409#comment-14323409
]
Akira AJISAKA commented on HADOOP-10544:
----------------------------------------
Thanks [~jonallen] for the update! The patch mostly looks good to me.
One question: With the patch, the command will throw
{{IllegalArgumentException}} If the first expression is wrong.
{code}
} else if (arg.startsWith("-")) {
// starts with - but isn't an known expression
throw new IllegalArgumentException("Unknown expression: " + arg);
{code}
On the other hand, the command will throw {{IOException}} if another argument
is wrong.
{code}
} else {
throw new IOException("Unexpected argument: " + arg);
}
{code}
I'm thinking it would be more consistent to throw {{IllegalArgumentException}}
at the both conditions. HADOOP-8989 is committed but not released, so the
change does not break any compatibility.
Other comments are below:
{code}
+ // test both children passing
+ @Test(timeout = 1000)
+ public void testFailBoth() throws IOException {
{code}
# "passing" should be "failing".
# Would you document the precedence of the operators?
# Would you please add test cases for {{Not}} to TestHDFSConf.xml?
> 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)