Details
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.