hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akira AJISAKA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10544) Find command - add operator functions to find command
Date Mon, 16 Feb 2015 22:42:11 GMT

    [ 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.
        } else if (arg.startsWith("-")) {
          // starts with - but isn't an known expression
          throw new IllegalArgumentException("Unknown expression: " + arg);
On the other hand, the command will throw {{IOException}} if another argument is wrong.
      } else {
        throw new IOException("Unexpected argument: " + arg);
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:
+  // test both children passing
+  @Test(timeout = 1000)
+  public void testFailBoth() throws IOException {
# "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,
> Add operator functions (OR, NOT) to the find command created under HADOOP-8989.

This message was sent by Atlassian JIRA

View raw message