hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Belousov <sergey.belou...@gmail.com>
Subject Re: HBase shell (JRuby) access to internal classes for schema management
Date Mon, 13 Apr 2015 04:03:49 GMT
Thank you Esteban for reply

I tried to do  @hbase.hbase_admin but I could not call any methods from
for example when I do

hbase(main):001:0> @shell.hbase_admin

I got
=> #<Hbase::Admin:0x43fda8d9
@formatter=#<Shell::Formatter::Console:0x600f5704 @out=Kernel,
@max_width=236, @row_count=0>,

NoMethodError: undefined method `listTables' for #<Hbase::Admin:0x79b2852b>

NoMethodError: undefined method `getTableRegions' for

shell is more or interactive tool from what I see but as I mentioned I want
to use it in a scripts for our schema updates

starting with checking for table exist. than need to check regions and
create new base on some conditions etc...

How I can get to full admin/table class in the shell without duplicating
all code in my scripts? I am very new to JRuby and I looks like I just
missing something here...

thank you,

On Sun, Apr 12, 2015 at 11:32 PM, Esteban Gutierrez <esteban@cloudera.com>

> Hello Sergey,
> Yes, its totally doable. However, it would be great if you could let us
> know any feature that you consider missing from the hbase shell that would
> be nice to have. Or you just can open a HBASE JIRA[1] for further
> discussion.
> Thanks,
> Esteban.
> [1] http://issues.apache.org/jira/browse/HBASE
> --
> Cloudera, Inc.
> On Fri, Apr 10, 2015 at 5:18 PM, Sergey Belousov <
> sergey.belousov@gmail.com>
> wrote:
> > Hi All
> >
> > We having our DDL scripts for HBase in JRuby an run the using HBase
> shell.
> >
> > Considering that HBase shell is nothing else but JRuby interpreter and
> you
> > can do all you can in JRuby there (or may be almost all) I am wondering
> if
> > I can access internal clases like Admin from shell so I will rely on code
> > in HBase shell to do my DDL scripts and do do all that in DDL scripts.
> >
> >
> > Thank you!
> >

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message