Hadoop Common
  1. Hadoop Common
  2. HADOOP-6314

"bin/hadoop fs -help count" fails to show help about only "count" command.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Currently "hadoop fs -help count" fails to show help about only count command.
      Instead it displays following output

      [rphulari@statepick-lm]> bin/hadoop fs -help count
      hadoop fs is the command to execute fs commands. The full syntax is: 
      
      hadoop fs [-fs <local | file system URI>] [-conf <configuration file>]
      	[-D <property=value>] [-ls <path>] [-lsr <path>] [-df [<path>]] [-du <path>]
      	[-dus <path>] [-mv <src> <dst>] [-cp <src> <dst>] [-rm [-skipTrash] <src>]
      	[-rmr [-skipTrash] <src>] [-put <localsrc> ... <dst>] [-copyFromLocal <localsrc> ... <dst>]
      	[-moveFromLocal <localsrc> ... <dst>] [-get [-ignoreCrc] [-crc] <src> <localdst>
      	[-getmerge <src> <localdst> [addnl]] [-cat <src>]
      	[-copyToLocal [-ignoreCrc] [-crc] <src> <localdst>] [-moveToLocal <src> <localdst>]
      	[-mkdir <path>] [-report] [-setrep [-R] [-w] <rep> <path/file>]
      	[-touchz <path>] [-test -[ezd] <path>] [-stat [format] <path>]
      	[-tail [-f] <path>] [-text <path>]
      
      ..
      ..
      ..
      
      

      Expected output of "bin/hadoop fs -help count " should be

      [rphulari@statepick-lm]> bin/hadoop  fs -help count
      -count[-q] <path>: Count the number of directories, files and bytes under the paths
      		that match the specified file pattern.  The output columns are:
      		DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME or
      		QUOTA REMAINING_QUATA SPACE_QUOTA REMAINING_SPACE_QUOTA 
      		      DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME
      
      1. CountHelp.patch
        0.6 kB
        Ravi Phulari
      2. CountHelp.patch
        0.5 kB
        Ravi Phulari

        Issue Links

          Activity

          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #91 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/91/)
          . Fix "fs -help" for the "-count" commond. Contributed by Ravi Phulari

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #91 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/91/ ) . Fix "fs -help" for the "-count" commond. Contributed by Ravi Phulari
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk #158 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/158/)
          . Fix "fs -help" for the "-count" commond. Contributed by Ravi Phulari

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk #158 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/158/ ) . Fix "fs -help" for the "-count" commond. Contributed by Ravi Phulari
          Hide
          Tsz Wo Nicholas Sze added a comment -

          I have committed this. Thanks, Ravi!

          Show
          Tsz Wo Nicholas Sze added a comment - I have committed this. Thanks, Ravi!
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12422334/CountHelp.patch
          against trunk revision 833553.

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

          -1 tests included. The patch doesn't appear to include any new or modified tests.
          Please justify why no new tests are needed for this patch.
          Also please list what manual steps were performed to verify this patch.

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

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

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

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

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

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

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/136/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/136/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/136/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/136/console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12422334/CountHelp.patch against trunk revision 833553. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/136/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/136/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/136/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/136/console This message is automatically generated.
          Hide
          Ravi Phulari added a comment -

          Test patch result against trunk.

           [exec] 
               [exec] 
               [exec] 
               [exec] 
               [exec] -1 overall.  
               [exec] 
               [exec]     +1 @author.  The patch does not contain any @author tags.
               [exec] 
               [exec]     -1 tests included.  The patch doesn't appear to include any new or modified tests.
               [exec]                         Please justify why no new tests are needed for this patch.
               [exec]                         Also please list what manual steps were performed to verify this patch.
               [exec] 
               [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
               [exec] 
               [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
               [exec] 
               [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
               [exec] 
               [exec]     +1 release audit.  The applied patch does not increase the total number of release audit warnings.
               [exec] 
               [exec] 
               [exec] 
               [exec] 
               [exec] ======================================================================
               [exec] ======================================================================
               [exec]     Finished build.
               [exec] ======================================================================
               [exec] ======================================================================
               [exec] 
          
          Show
          Ravi Phulari added a comment - Test patch result against trunk. [exec] [exec] [exec] [exec] [exec] -1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] -1 tests included. The patch doesn't appear to include any new or modified tests. [exec] Please justify why no new tests are needed for this patch. [exec] Also please list what manual steps were performed to verify this patch. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. [exec] [exec] [exec] [exec] [exec] ====================================================================== [exec] ====================================================================== [exec] Finished build. [exec] ====================================================================== [exec] ====================================================================== [exec]
          Hide
          Tsz Wo Nicholas Sze added a comment -

          +1 patch looks good.

          Show
          Tsz Wo Nicholas Sze added a comment - +1 patch looks good.
          Hide
          Ravi Phulari added a comment -

          Nicholas, Thanks for suggestion, I have attached updated patch.
          Gary, Thanks for pointing it out , I have created HADOOP-6316 for adding missing unit tests .

          Show
          Ravi Phulari added a comment - Nicholas, Thanks for suggestion, I have attached updated patch. Gary, Thanks for pointing it out , I have created HADOOP-6316 for adding missing unit tests .
          Hide
          Tsz Wo Nicholas Sze added a comment -

          Count.matches(..) is used by some other codes. Changing it will affect the "fs -count" command.

          The correct fix is to revert the following.

          @@ -1493,7 +1458,7 @@
                 System.out.println(chown);
               } else if ("chgrp".equals(cmd)) {
                 System.out.println(chgrp);
          -    } else if (Count.NAME.equals(cmd)) {
          +    } else if (Count.matches(cmd)) {
                 System.out.println(Count.DESCRIPTION);
               } else if ("help".equals(cmd)) {
                 System.out.println(help);
          
          Show
          Tsz Wo Nicholas Sze added a comment - Count.matches(..) is used by some other codes. Changing it will affect the "fs -count" command. The correct fix is to revert the following. @@ -1493,7 +1458,7 @@ System .out.println(chown); } else if ( "chgrp" .equals(cmd)) { System .out.println(chgrp); - } else if (Count.NAME.equals(cmd)) { + } else if (Count.matches(cmd)) { System .out.println(Count.DESCRIPTION); } else if ( "help" .equals(cmd)) { System .out.println(help);
          Hide
          gary murry added a comment -

          Please create a jira for the missing unit tests and mark it as blocked by Hadoop-6222.

          Show
          gary murry added a comment - Please create a jira for the missing unit tests and mark it as blocked by Hadoop-6222.
          Hide
          Ravi Phulari added a comment -

          Patch does not include Unit tests because there is no TestCLI in core. Jira HADOOP-6222

          ant test-patch results

          {noformt}

          [exec]
          [exec]
          [exec]
          [exec]
          [exec] +1 overall.
          [exec]
          [exec] +1 @author. The patch does not contain any @author tags.
          [exec]
          [exec] -1 tests included. The patch doesn't appear to include any new or modified tests.
          [exec] Please justify why no new tests are needed for this patch.
          [exec] Also please list what manual steps were performed to verify this patch.
          [exec]
          [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
          [exec]
          [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
          [exec]
          [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
          [exec]
          [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
          [exec]
          [exec]
          [exec]
          [exec]
          [exec] ======================================================================
          [exec] ======================================================================
          [exec] Finished build.
          [exec] ======================================================================
          [exec] ======================================================================
          [exec]
          [exec]

          BUILD SUCCESSFUL
          Total time: 20 minutes 22 seconds

          
          
          Show
          Ravi Phulari added a comment - Patch does not include Unit tests because there is no TestCLI in core. Jira HADOOP-6222 ant test-patch results {noformt} [exec] [exec] [exec] [exec] [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] -1 tests included. The patch doesn't appear to include any new or modified tests. [exec] Please justify why no new tests are needed for this patch. [exec] Also please list what manual steps were performed to verify this patch. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. [exec] [exec] [exec] [exec] [exec] ====================================================================== [exec] ====================================================================== [exec] Finished build. [exec] ====================================================================== [exec] ====================================================================== [exec] [exec] BUILD SUCCESSFUL Total time: 20 minutes 22 seconds

            People

            • Assignee:
              Ravi Phulari
              Reporter:
              Ravi Phulari
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development