hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: updating shell functionality
Date Thu, 24 Nov 2011 05:11:03 GMT
On Tue, Nov 22, 2011 at 10:34 AM, Jesse Yates <jesse.k.yates@gmail.com> wrote:
> What I'm proposing is that instead of altering tables like this(for setting
> arbitrary keys, but this could be things like MAX_FILESIZE, etc):
>  alter 'table', METHOD=>'table_attr', "key1" => "v1"
> We could actually have the use make explicit method calls (which should
> give auto-complete in irb) on an object you get from alter. Then you can do
> something like this:
>  hbase> alter('table').table_attr "key1" => "v1"

I'm up for shell improvements.  It needs them bad.

On the above, does anyone else find it a little odd wrapping the
table's name in a verb and then setting attributes on whats returned?

Should it be something like:

hbase> table_schema = getTableSchema("table")
hbase> table_schema.attr "key" => "value"


hbase> table_schema.attr(key, value)

> This approach might also be something we can extend to much of the current
> shell functionality while still retaining much of the current code. I think
> moving this this kind of approach applies anywhere we would need to do
> chaining of invocations. Clearly, it depends on the situation, but
> leveraging OOP, rather than switching on string, makes a lot of sense (at
> least to me :)

If folks want to go that way, thats fine.

Was thinking the shell should be like bash or like mysql' shell.


View raw message