hadoop-common-issues mailing list archives

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

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

Hudson commented on HADOOP-12164:
---------------------------------

FAILURE: Integrated in Hadoop-Hdfs-trunk #2172 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/2172/])
 HADOOP-12164. Fix TestMove and TestFsShellReturnCode failed to get command name using reflection.
(Lei Xu) (lei: rev 532e38cb7f70606c2c96d05259670e1e91d60ab3)
* hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestMove.java
* hadoop-common-project/hadoop-common/CHANGES.txt
* hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java


> 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