[ 
https://issues.apache.org/jira/browse/HBASE-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568787#action_12568787
 ] 

Bryan Duxbury commented on HBASE-67:
------------------------------------

I've looked over this patch. It certainly works, and it's an improvement over 
the old way of squeezing it into a small table.

However, I still wonder why the output has to be in a bordered table format in 
the first place. When it's data coming out of the database, you need the table 
to understand what's what. When it's preformatted text, there's no reason to 
bother with a table. 

Would it make sense for the HELP; command to return something like:

{code}
>help;

Type "help [command];" for detailed information.

Commands:
  HELP
  CREATE
  INSERT
  DELETE
  ...
{code}

Then, for example:

{code}

>help create;
CREATE
  Create tables

Syntax:
  CREATE TABLE table_name (
    column_family_name
    [MAX_VERSIONS=n]
    [MAX_LENGTH=n]
    [MAX_LENGTH=n]
    [COMPRESSION=RECORD|BLOCK]
    [IN_MEMORY]
    [BLOOMFILTER=BLOOMFILTER|COUNTING_BLOOMFILTER|RETOUCHED_BLOOMFILTER]
    [VECTOR_SIZE=n NUM_HASH=n], ... 
  );

{code}

This would let you comfortably display a lot more detailed information when 
someone asks for it, and avoid giving them way too much information the first 
time they type help. It would also vastly simplify the code for the help 
formatter, as all you'd have to do is write out the requested command's help 
text to stdout, no longer boxing it and adjusting sizes.

Are there any advantages to tabular format that I'm missing?

> Help Output Format should be easy to read.
> ------------------------------------------
>
>                 Key: HBASE-67
>                 URL: https://issues.apache.org/jira/browse/HBASE-67
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: hql
>    Affects Versions: 0.1.0
>         Environment: All
>            Reporter: Edward Yoon
>            Assignee: Edward Yoon
>            Priority: Trivial
>             Fix For: 0.2.0
>
>         Attachments: 67.patch, 67_v02.patch
>
>
> Current help-output is some difficult to read.
> {code}
> +-------------------------+-------------------------+-------------------------+
> | SELECT                  | Select values from table| SELECT {column_name, [, 
> |
> |                         |                         | column_name] ... | *} 
> FR|
> |                         |                         | OM table_name [WHERE 
> row|
> |                         |                         | ='row_key' | STARTING 
> FR|
> |                         |                         | OM 'row-key'] 
> [NUM_VERSI|
> |                         |                         | ONS = version_count] 
> [TI|
> |                         |                         | MESTAMP 'timestamp'] 
> [LI|
> |                         |                         | MIT = row_count] [INTO 
> F|
> |                         |                         | ILE 'file_name'];       
> |
> +-------------------------+-------------------------+-------------------------+
> | JAR                     | Hadoop RunJar util      | JAR jarFile [mainClass] 
> |
> |                         |                         | arguments...;           
> |
> +-------------------------+-------------------------+-------------------------+
> | CLEAR                   | Clear the screen        | CLEAR;                  
> |
> +-------------------------+-------------------------+-------------------------+
> | DESCRIBE                | Print table information | [DESCRIBE|DESC] 
> table_na|
> |                         |                         | me;                     
> |
> +-------------------------+-------------------------+-------------------------+
> hql >
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to