Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3834

Unused Command.java fields NAME, DESCRIPTION and USAGE

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: shell
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The static fields NAME, USAGE AND DESCRIPTION in Command.java are not used and cannot be overridden by subclasses since Java does not support static variable overriding. We can get rid of these three fields in the Command.java and only keep them as static fields in subclasses.

        Activity

        Hide
        jingzhao Jing Zhao added a comment -

        In the current patch I only removed the three unused fields from Command.java. We'd better define abstract data manipulators and inspectors to re-organize NAME, USAGE, AND DESCRIPTION for all the subclasses of Command.

        Show
        jingzhao Jing Zhao added a comment - In the current patch I only removed the three unused fields from Command.java. We'd better define abstract data manipulators and inspectors to re-organize NAME, USAGE, AND DESCRIPTION for all the subclasses of Command.
        Hide
        daryn Daryn Sharp added a comment -

        I'd not thrilled with the static fields, but I left it that way when overhauling FsShell to maintain compatibility while incrementally converting commands. DFSAdmin is also using the class, so you may want to double check that it has no problem with the change. I don't think it should, so +1 if DFSAdmin has no problems.

        Show
        daryn Daryn Sharp added a comment - I'd not thrilled with the static fields, but I left it that way when overhauling FsShell to maintain compatibility while incrementally converting commands. DFSAdmin is also using the class, so you may want to double check that it has no problem with the change. I don't think it should, so +1 if DFSAdmin has no problems.
        Hide
        hadoopqa Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12541841/HDFS-3834.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 1 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3068//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3068//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12541841/HDFS-3834.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 1 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The javadoc tool did not generate any warning messages. +1 eclipse:eclipse. The patch built with eclipse:eclipse. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3068//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3068//console This message is automatically generated.
        Hide
        sureshms Suresh Srinivas added a comment - - edited

        As Jing indicated, I think none of the subclasses of Command use these fields. +1 for the patch.

        Show
        sureshms Suresh Srinivas added a comment - - edited As Jing indicated, I think none of the subclasses of Command use these fields. +1 for the patch.
        Hide
        sureshms Suresh Srinivas added a comment -

        I committed the patch. Thank you Jing Zhao.

        Show
        sureshms Suresh Srinivas added a comment - I committed the patch. Thank you Jing Zhao.
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #2634 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2634/)
        HDFS-3834. Remove unused static fields NAME, DESCRIPTION and Usage from Command. Contributed by Jing Zhao. (Revision 1377001)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377001
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Command.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCommandFactory.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2634 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2634/ ) HDFS-3834 . Remove unused static fields NAME, DESCRIPTION and Usage from Command. Contributed by Jing Zhao. (Revision 1377001) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377001 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Command.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCommandFactory.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #2698 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2698/)
        HDFS-3834. Remove unused static fields NAME, DESCRIPTION and Usage from Command. Contributed by Jing Zhao. (Revision 1377001)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377001
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Command.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCommandFactory.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2698 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2698/ ) HDFS-3834 . Remove unused static fields NAME, DESCRIPTION and Usage from Command. Contributed by Jing Zhao. (Revision 1377001) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377001 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Command.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCommandFactory.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #2635 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2635/)
        Correcting the jira number back to HDFS-3834 from HDFS-3844. I should pay better attention. (Revision 1377008)
        Correcting the jira number from HDFS-3834 to HDFS-3844 for the commit 1377001 (Revision 1377007)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377008
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377007
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2635 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2635/ ) Correcting the jira number back to HDFS-3834 from HDFS-3844 . I should pay better attention. (Revision 1377008) Correcting the jira number from HDFS-3834 to HDFS-3844 for the commit 1377001 (Revision 1377007) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377008 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377007 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #2699 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2699/)
        Correcting the jira number back to HDFS-3834 from HDFS-3844. I should pay better attention. (Revision 1377008)
        Correcting the jira number from HDFS-3834 to HDFS-3844 for the commit 1377001 (Revision 1377007)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377008
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377007
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2699 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2699/ ) Correcting the jira number back to HDFS-3834 from HDFS-3844 . I should pay better attention. (Revision 1377008) Correcting the jira number from HDFS-3834 to HDFS-3844 for the commit 1377001 (Revision 1377007) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377008 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377007 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #2662 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2662/)
        HDFS-3834. Remove unused static fields NAME, DESCRIPTION and Usage from Command. Contributed by Jing Zhao. (Revision 1377001)

        Result = FAILURE
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377001
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Command.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCommandFactory.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2662 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2662/ ) HDFS-3834 . Remove unused static fields NAME, DESCRIPTION and Usage from Command. Contributed by Jing Zhao. (Revision 1377001) Result = FAILURE suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377001 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Command.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCommandFactory.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #2663 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2663/)
        Correcting the jira number back to HDFS-3834 from HDFS-3844. I should pay better attention. (Revision 1377008)
        Correcting the jira number from HDFS-3834 to HDFS-3844 for the commit 1377001 (Revision 1377007)

        Result = FAILURE
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377008
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377007
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2663 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2663/ ) Correcting the jira number back to HDFS-3834 from HDFS-3844 . I should pay better attention. (Revision 1377008) Correcting the jira number from HDFS-3834 to HDFS-3844 for the commit 1377001 (Revision 1377007) Result = FAILURE suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377008 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377007 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1145 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1145/)
        Correcting the jira number back to HDFS-3834 from HDFS-3844. I should pay better attention. (Revision 1377008)
        Correcting the jira number from HDFS-3834 to HDFS-3844 for the commit 1377001 (Revision 1377007)
        HDFS-3834. Remove unused static fields NAME, DESCRIPTION and Usage from Command. Contributed by Jing Zhao. (Revision 1377001)

        Result = FAILURE
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377008
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377007
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377001
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Command.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCommandFactory.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1145 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1145/ ) Correcting the jira number back to HDFS-3834 from HDFS-3844 . I should pay better attention. (Revision 1377008) Correcting the jira number from HDFS-3834 to HDFS-3844 for the commit 1377001 (Revision 1377007) HDFS-3834 . Remove unused static fields NAME, DESCRIPTION and Usage from Command. Contributed by Jing Zhao. (Revision 1377001) Result = FAILURE suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377008 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377007 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377001 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Command.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCommandFactory.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1176 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1176/)
        Correcting the jira number back to HDFS-3834 from HDFS-3844. I should pay better attention. (Revision 1377008)
        Correcting the jira number from HDFS-3834 to HDFS-3844 for the commit 1377001 (Revision 1377007)
        HDFS-3834. Remove unused static fields NAME, DESCRIPTION and Usage from Command. Contributed by Jing Zhao. (Revision 1377001)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377008
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377007
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377001
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Command.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCommandFactory.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1176 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1176/ ) Correcting the jira number back to HDFS-3834 from HDFS-3844 . I should pay better attention. (Revision 1377008) Correcting the jira number from HDFS-3834 to HDFS-3844 for the commit 1377001 (Revision 1377007) HDFS-3834 . Remove unused static fields NAME, DESCRIPTION and Usage from Command. Contributed by Jing Zhao. (Revision 1377001) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377008 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377007 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1377001 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Command.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCommandFactory.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

          People

          • Assignee:
            jingzhao Jing Zhao
            Reporter:
            jingzhao Jing Zhao
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development