hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stack <st...@duboce.net>
Subject Re: hbase shell scripting
Date Tue, 26 May 2009 22:52:47 GMT
Will this work for you?

$ echo "create 'table1'" |./bin/hbase shell
$ echo "create 'table2'"|./bin/hbase shell

or I was thinking that you could put the below into a script and run it:

create 'table1'
create'table2'

but looking at bin/hirb.rb, when you pass a script to shell to run,
most of the hbase aspects of the jirb shell have not been put up yet.
This we should fix.  Meantime, study how ./bin/hirb.rb works and do
sufficient initialization in your own script or just write jruby using
the bin/hirb.rb content for example.

Let me know if you'd like more help.

St.Ack



On Tue, May 26, 2009 at 3:43 PM, Norbert Antunes
<norbertantunes@gmail.com> wrote:
> Hi,
>
> In the HBase shell wiki page it states the following:
>
> "Your script can lean on the methods provided by the HBase Shell."
>
> Can anyone provide a link or an example of how this would be done?  I am
> trying to write a script that will create 2 tables, but I have been
> unsuccessful so far.  I want to create a simple script so that I can
> share the script with other members of my team.  They would then be able
> to run the script and the tables would be created automatically.
>
> Is there an easy way to do this using hbase shell scripting?
>
> Thanks.
>
>

Mime
View raw message