Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12164

Fix TestMove and TestFsShellReturnCode failed to get command name using reflection.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      When enabled hadoop.shell.missing.defaultFs.warning, a few tests were failed as following:

      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)
      

      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.

        Activity

        Hide
        eddyxu Lei (Eddy) Xu added a comment -

        Uploaded the patch, which added static String NAME fields to testing commands.

        Show
        eddyxu Lei (Eddy) Xu added a comment - Uploaded the patch, which added static String NAME fields to testing commands.
        Hide
        andrew.wang Andrew Wang added a comment -

        LGTM +1 pending Jenkins

        Show
        andrew.wang Andrew Wang added a comment - LGTM +1 pending Jenkins
        Hide
        hadoopqa Hadoop QA added a comment -



        +1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 6m 52s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 tests included 0m 0s The patch appears to include 2 new or modified test files.
        +1 javac 7m 37s There were no new javac warning messages.
        +1 release audit 0m 19s The applied patch does not increase the total number of release audit warnings.
        +1 checkstyle 1m 5s There were no new checkstyle issues.
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 33s mvn install still works.
        +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
        +1 findbugs 1m 48s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 common tests 22m 44s Tests passed in hadoop-common.
            42m 33s  



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12742968/HADOOP-12164.000.patch
        Optional Tests javac unit findbugs checkstyle
        git revision trunk / d0cc038
        hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7120/artifact/patchprocess/testrun_hadoop-common.txt
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7120/testReport/
        Java 1.7.0_55
        uname Linux asf901.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/7120/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 pre-patch 6m 52s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 2 new or modified test files. +1 javac 7m 37s There were no new javac warning messages. +1 release audit 0m 19s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 5s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 33s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 1m 48s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 22m 44s Tests passed in hadoop-common.     42m 33s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12742968/HADOOP-12164.000.patch Optional Tests javac unit findbugs checkstyle git revision trunk / d0cc038 hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7120/artifact/patchprocess/testrun_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7120/testReport/ Java 1.7.0_55 uname Linux asf901.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/7120/console This message was automatically generated.
        Hide
        eddyxu Lei (Eddy) Xu added a comment -

        Thanks a lot for the quick review, Andrew Wang.

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

        Show
        eddyxu Lei (Eddy) Xu added a comment - Thanks a lot for the quick review, Andrew Wang . I've committed it into branch-2 and trunk.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8103 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8103/)
        HADOOP-12164. Fix TestMove and TestFsShellReturnCode failed to get command name using reflection. (Lei Xu) (lei: rev 532e38cb7f70606c2c96d05259670e1e91d60ab3)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestMove.java
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8103 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8103/ ) HADOOP-12164 . Fix TestMove and TestFsShellReturnCode failed to get command name using reflection. (Lei Xu) (lei: rev 532e38cb7f70606c2c96d05259670e1e91d60ab3) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestMove.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #975 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/975/)
        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
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #975 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/975/ ) 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
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #245 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/245/)
        HADOOP-12164. Fix TestMove and TestFsShellReturnCode failed to get command name using reflection. (Lei Xu) (lei: rev 532e38cb7f70606c2c96d05259670e1e91d60ab3)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestMove.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #245 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/245/ ) HADOOP-12164 . Fix TestMove and TestFsShellReturnCode failed to get command name using reflection. (Lei Xu) (lei: rev 532e38cb7f70606c2c96d05259670e1e91d60ab3) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestMove.java
        Hide
        hudson Hudson added a comment -

        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
        Show
        hudson Hudson added a comment - 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
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #233 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/233/)
        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/TestFsShellReturnCode.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestMove.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #233 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/233/ ) 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/TestFsShellReturnCode.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestMove.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2191 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2191/)
        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/TestFsShellReturnCode.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestMove.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2191 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2191/ ) 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/TestFsShellReturnCode.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestMove.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #243 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/243/)
        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/TestFsShellReturnCode.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestMove.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #243 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/243/ ) 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/TestFsShellReturnCode.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestMove.java

          People

          • Assignee:
            eddyxu Lei (Eddy) Xu
            Reporter:
            eddyxu Lei (Eddy) Xu
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development