hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lei (Eddy) Xu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-12164) Fix TestMove and TestFsShellReturnCode failed to get command name using reflection.
Date Wed, 01 Jul 2015 00:48:04 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-12164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lei (Eddy) Xu updated HADOOP-12164:
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 2.8.0
                   3.0.0
           Status: Resolved  (was: Patch Available)

Thanks a lot for the quick review, [~andrew.wang].

I've committed it into branch-2 and trunk.

> Fix TestMove and TestFsShellReturnCode failed to get command name using reflection.
> -----------------------------------------------------------------------------------
>
>                 Key: HADOOP-12164
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12164
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.7.0
>            Reporter: Lei (Eddy) Xu
>            Assignee: Lei (Eddy) Xu
>            Priority: Minor
>             Fix For: 3.0.0, 2.8.0
>
>         Attachments: HADOOP-12164.000.patch
>
>
> When enabled {{hadoop.shell.missing.defaultFs.warning}}, a few tests were failed as following:
> {noformat}
> java.lang.RuntimeException: failed to get .NAME
> 	at java.lang.Class.getDeclaredField(Class.java:1948)
> 	at org.apache.hadoop.fs.shell.Command.getCommandField(Command.java:458)
> 	at org.apache.hadoop.fs.shell.Command.getName(Command.java:401)
> 	at org.apache.hadoop.fs.shell.FsCommand.getCommandName(FsCommand.java:80)
> 	at org.apache.hadoop.fs.shell.FsCommand.processRawArguments(FsCommand.java:111)
> 	at org.apache.hadoop.fs.shell.Command.run(Command.java:154)
> 	at org.apache.hadoop.fs.TestFsShellReturnCode.testChgrpGroupValidity(TestFsShellReturnCode.java:434)
> {noformat}
> The reason is that, in {{FsCommand#processRawArguments}}, it uses {{getCommandName()}},
which uses reflection to find {{static String NAME}} field, to build error message. But in
the tests, the commands are built without {{static String NAME}} field, since it is not inherited.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message