Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-2747

Scan "show few" long option contains a space

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.5
    • 1.5.2, 1.6.1, 1.7.0
    • shell
    • 1.4.5 on BigTop 0.7.0

    Description

      the "show few" option on the scan command has a space instead of a dash. It's confusing and inconsistent.

      root@bigtop> help scan                       
      usage: scan [-?] [-b <start-row>] [-c <<columnfamily>[:<columnqualifier>]{,<columnfamily>[:<columnqualifier>]}>] [-e <end-row>] [-f <int>] [-fm <className>] [-np] [-r <row>]
             [-s <comma-separated-authorizations>] [-st] [-t <table>]
      description: scans the table, and displays the resulting records
        -?,--help                                                                                  display this help
        -b,--begin-row <start-row>                                                                 begin row (inclusive)
        -c,--columns <<columnfamily>[:<columnqualifier>]{,<columnfamily>[:<columnqualifier>]}>     comma-separated columns
        -e,--end-row <end-row>                                                                     end row (inclusive)
        -f,--show few <int>                                                                        show only a specified number of characters
        -fm,--formatter <className>                                                                fully qualified name of the formatter class to use
        -np,--no-pagination                                                                        disable pagination of output
        -r,--row <row>                                                                             row to scan
        -s,--scan-authorizations <comma-separated-authorizations>                                  scan authorizations (all user auths are used if this argument is not specified)
        -st,--show-timestamps                                                                      display timestamps
        -t,--tableName <table>                                                                     table to be scanned
      root@bigtop> scan -t usertable --show few 40 
      2014-04-28 14:26:55,704 [shell.Shell] ERROR: org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --show
      usage: scan [-?] [-b <start-row>] [-c <<columnfamily>[:<columnqualifier>]{,<columnfamily>[:<columnqualifier>]}>] [-e <end-row>] [-f <int>] [-fm <className>] [-np] [-r <row>] [-s <comma-separated-authorizations>] [-st] [-t <table>]
      description: scans the table, and displays the resulting records
        -?,--help                                                                                  display this help
        -b,--begin-row <start-row>                                                                 begin row (inclusive)
        -c,--columns <<columnfamily>[:<columnqualifier>]{,<columnfamily>[:<columnqualifier>]}>     comma-separated columns
        -e,--end-row <end-row>                                                                     end row (inclusive)
        -f,--show few <int>                                                                        show only a specified number of characters
        -fm,--formatter <className>                                                                fully qualified name of the formatter class to use
        -np,--no-pagination                                                                        disable pagination of output
        -r,--row <row>                                                                             row to scan
        -s,--scan-authorizations <comma-separated-authorizations>                                  scan authorizations (all user auths are used if this argument is not specified)
        -st,--show-timestamps                                                                      display timestamps
        -t,--tableName <table>                                                                     table to be scanned
      root@bigtop> scan -t usertable --show-few 40
      2014-04-28 14:27:00,175 [shell.Shell] ERROR: org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --show-few
      usage: scan [-?] [-b <start-row>] [-c <<columnfamily>[:<columnqualifier>]{,<columnfamily>[:<columnqualifier>]}>] [-e <end-row>] [-f <int>] [-fm <className>] [-np] [-r <row>] [-s <comma-separated-authorizations>] [-st] [-t <table>]
      description: scans the table, and displays the resulting records
        -?,--help                                                                                  display this help
        -b,--begin-row <start-row>                                                                 begin row (inclusive)
        -c,--columns <<columnfamily>[:<columnqualifier>]{,<columnfamily>[:<columnqualifier>]}>     comma-separated columns
        -e,--end-row <end-row>                                                                     end row (inclusive)
        -f,--show few <int>                                                                        show only a specified number of characters
        -fm,--formatter <className>                                                                fully qualified name of the formatter class to use
        -np,--no-pagination                                                                        disable pagination of output
        -r,--row <row>                                                                             row to scan
        -s,--scan-authorizations <comma-separated-authorizations>                                  scan authorizations (all user auths are used if this argument is not specified)
        -st,--show-timestamps                                                                      display timestamps
        -t,--tableName <table>                                                                     table to be scanned
      root@bigtop> scan -t usertable --show\ few 40
      <snip contents>
      

      Expected: dash in name, or other means to not include escaping

      Workaround: use short form (-f) or escape the space as shown above.

      Attachments

        1. ACCUMULO-2747.patch.txt
          2 kB
          Jeffrey S Schwartz

        Activity

          People

            jschwartz73 Jeffrey S Schwartz
            busbey Sean Busbey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: