Read -ROOT- table to find that.  It'll usually have one row only with
detail on the .META. region including info:server column which has
meta server location.
St.Ack


On Fri, Jul 23, 2010 at 4:07 PM, Ted Yu <[email protected]> wrote:
> For item 1, I was also looking to find out the region server name which
> hosts .META.
>
> Thanks
>
> On Fri, Jul 23, 2010 at 3:51 PM, Stack <[email protected]> wrote:
>
>> On Fri, Jul 23, 2010 at 2:40 PM, Ted Yu <[email protected]> wrote:
>> > Hi,
>> > I am looking for HBase API for getting the following information:
>> > 1. is Meta table available - I found
>> > RegionServerOperation.metaTableAvailable() but it is protected
>>
>> Thats not what you think it is Ted.
>>
>> To see if meta is available, do a Scan on it every so often.  You can
>> open a Scanner -- via thrift if you are using perl, or write a bit of
>> jruby and have it return a non-zero exit code on fail  -- on it as you
>> would any other.  If the scan does not complete in some time then its
>> not deployed.
>>
>>
>> > 2. I found ProcessRegionStatusChange.metaRegionAvailable() which is also
>> > protected
>>
>> Yeah, this is stuff internal to the servers; it won't get you what you
>> want.
>>
>> > 3. cluster statistics: the total number of tables, the total space
>> consumed
>> > by all the tables
>> >
>>
>> Total number of tables is something you'd have to do yourself I'd say.
>>  Given the above meta scan, look at the row names and when their
>> prefix changes -- their prefix is the table name the region belongs
>> too, increment your table count.
>>
>> To see how much space is being used by hbase, thats ./bin/hadoop fs
>> -dus /HBASE.ROOTDIR parsing whatever it returns.
>>
>> St.Ack
>>
>> > The goal is to call the above APIs from Perl library our Ops has
>> developed
>> > to facilitate cluster management.
>> >
>> > Thanks
>> >
>>
>

Reply via email to