hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Yates (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-5548) Add ability to get a table in the shell
Date Wed, 21 Mar 2012 05:33:54 GMT

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

Jesse Yates commented on HBASE-5548:
------------------------------------

bq. You pass in the shell instance now instead of formatter when we create a table instance.
Do we get the formatter to use from the shell?

Turns out passing in the formatter was cruft - we weren't actually using it. The shell is
passed in here so we can use it to do 'good' help output (referencing individual methods).


bq. For the help, we print out a tail 'Access an HTable....' every time whatever the help
asked for. Is this right? Should we only print out this 'Access an HTable....' stuff if nothing
is passed to the table help method?

It shouldn't be running every time - bug if it is. The lines:
{code}
+      if command
+        return @shell.help_command(command)
+      end
+      return <<-EOF
{code}

ensures that only if they _don't_ pass in a command name, that we print out the 'Access an
HTable...' lines (note the if...return, end. If you do match the if, then run the help for
that command, else print out the general table help. Just a little cleaner to drop the else).

bq. The above comment doesn't run right?

Nope, but thought it would be good to leave in there for future shell-hackers. This was a
big step in my understanding of what is going on.

Thanks for feedback stack!
                
> Add ability to get a table in the shell
> ---------------------------------------
>
>                 Key: HBASE-5548
>                 URL: https://issues.apache.org/jira/browse/HBASE-5548
>             Project: HBase
>          Issue Type: Improvement
>          Components: shell
>            Reporter: Jesse Yates
>            Assignee: Jesse Yates
>             Fix For: 0.96.0
>
>         Attachments: ruby_HBASE-5528-v0.patch, ruby_HBASE-5548-v1.patch, ruby_HBASE-5548-v2.patch
>
>
> Currently, all the commands that operate on a table in the shell first have to take the
table as name as input. 
> There are two main considerations:
> * It is annoying to have to write the table name every time, when you should just be
able to get a reference to a table
> * the current implementation is very wasteful - it creates a new HTable for each call
(but reuses the connection since it uses the same configuration)
> We should be able to get a handle to a single HTable and then operate on that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message