You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by drunkenfist <su...@gmail.com> on 2014/03/06 09:31:10 UTC
Fetching HBase Region info for a particular table on a particular
region server
Hi,
I'm kinda new to HBase API, so pardon me if the question seems very basic.
I wanted to know if I can fetch the region info of a particular table on a
particular region server. Basically I want to fetch the region size of a
table (say 't1') on a region server (say 'rs1').
Any help is appreciated. Thanks in advance.
--
View this message in context: http://apache-hbase.679495.n3.nabble.com/Fetching-HBase-Region-info-for-a-particular-table-on-a-particular-region-server-tp4056742.html
Sent from the HBase User mailing list archive at Nabble.com.
Re: Fetching HBase Region info for a particular table on a particular
region server
Posted by Ted Yu <yu...@gmail.com>.
If it didn't work, mind showing us the error ?
On Wed, Mar 12, 2014 at 12:15 PM, drunkenfist <su...@gmail.com>wrote:
> Does that work? That's what I was using, but I get a feeling it just
> creates
> a new object with no reference whatsoever to the table name.
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/Fetching-HBase-Region-info-for-a-particular-table-on-a-particular-region-server-tp4056742p4056935.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
Re: Fetching HBase Region info for a particular table on a
particular region server
Posted by drunkenfist <su...@gmail.com>.
Does that work? That's what I was using, but I get a feeling it just creates
a new object with no reference whatsoever to the table name.
--
View this message in context: http://apache-hbase.679495.n3.nabble.com/Fetching-HBase-Region-info-for-a-particular-table-on-a-particular-region-server-tp4056742p4056935.html
Sent from the HBase User mailing list archive at Nabble.com.
Re: Fetching HBase Region info for a particular table on a particular
region server
Posted by Ted Yu <yu...@gmail.com>.
Configuration conf = HBaseConfiguration.create();
HTable table = new HTable(conf, tablename);
On Wed, Mar 12, 2014 at 12:07 PM, drunkenfist <su...@gmail.com>wrote:
> Quick question... How do I get the HTable object of table, given the name
> of
> the table as a String?
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/Fetching-HBase-Region-info-for-a-particular-table-on-a-particular-region-server-tp4056742p4056933.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
Re: Fetching HBase Region info for a particular table on a
particular region server
Posted by drunkenfist <su...@gmail.com>.
Quick question... How do I get the HTable object of table, given the name of
the table as a String?
--
View this message in context: http://apache-hbase.679495.n3.nabble.com/Fetching-HBase-Region-info-for-a-particular-table-on-a-particular-region-server-tp4056742p4056933.html
Sent from the HBase User mailing list archive at Nabble.com.
Re: Fetching HBase Region info for a particular table on a
particular region server
Posted by drunkenfist <su...@gmail.com>.
Thanks Ted. Works just fine.
--
View this message in context: http://apache-hbase.679495.n3.nabble.com/Fetching-HBase-Region-info-for-a-particular-table-on-a-particular-region-server-tp4056742p4056796.html
Sent from the HBase User mailing list archive at Nabble.com.
Re: Fetching HBase Region info for a particular table on a particular
region server
Posted by Ted Yu <yu...@gmail.com>.
Take a look at HBASE-10413 Tablesplit.getLength returns 0
RegionSizeCalculator.java should give you what you need.
On Thu, Mar 6, 2014 at 8:11 AM, drunkenfist <su...@gmail.com>wrote:
> So there is no way to get the region size of a table from a region server?
>
> Or is it possible to get the HDFS containing the region server name and
> then
> get the region size of a particular table from that HDFS?
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/Fetching-HBase-Region-info-for-a-particular-table-on-a-particular-region-server-tp4056742p4056761.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
Re: Fetching HBase Region info for a particular table on a particular
region server
Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Take a look at Hannibal... Will help you a lot.
https://github.com/sentric/hannibal
JM
2014-03-06 11:11 GMT-05:00 drunkenfist <su...@gmail.com>:
> So there is no way to get the region size of a table from a region server?
>
> Or is it possible to get the HDFS containing the region server name and
> then
> get the region size of a particular table from that HDFS?
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/Fetching-HBase-Region-info-for-a-particular-table-on-a-particular-region-server-tp4056742p4056761.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
Re: Fetching HBase Region info for a particular table on a
particular region server
Posted by drunkenfist <su...@gmail.com>.
So there is no way to get the region size of a table from a region server?
Or is it possible to get the HDFS containing the region server name and then
get the region size of a particular table from that HDFS?
Thanks.
--
View this message in context: http://apache-hbase.679495.n3.nabble.com/Fetching-HBase-Region-info-for-a-particular-table-on-a-particular-region-server-tp4056742p4056761.html
Sent from the HBase User mailing list archive at Nabble.com.
Re: Fetching HBase Region info for a particular table on a particular
region server
Posted by Bharath Vissapragada <bh...@cloudera.com>.
Hey,
There is no dependency between region size and regionserver. Though regions
"map" to regionserver, they actually lie on HDFS. RS is just a virtual
entity that manages a bunch of regions.
So the easiest way to get the size of a region is to fetch it from HDFS?
- Bharath
On Thu, Mar 6, 2014 at 8:13 PM, drunkenfist <su...@gmail.com>wrote:
> Thanks Divye, but wouldn't that fetch the storefilesize of all tables? I
> want
> the region size of a specific table, given the tablename and regionserver
> name.
>
> And are storefilesize and region size the same?
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/Fetching-HBase-Region-info-for-a-particular-table-on-a-particular-region-server-tp4056742p4056758.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
--
Bharath Vissapragada
<http://www.cloudera.com>
Re: Fetching HBase Region info for a particular table on a
particular region server
Posted by drunkenfist <su...@gmail.com>.
Thanks Divye, but wouldn't that fetch the storefilesize of all tables? I want
the region size of a specific table, given the tablename and regionserver
name.
And are storefilesize and region size the same?
Thanks.
--
View this message in context: http://apache-hbase.679495.n3.nabble.com/Fetching-HBase-Region-info-for-a-particular-table-on-a-particular-region-server-tp4056742p4056758.html
Sent from the HBase User mailing list archive at Nabble.com.
Re: Fetching HBase Region info for a particular table on a particular
region server
Posted by divye sheth <di...@gmail.com>.
I believe what you are looking for is here:
http://stackoverflow.com/questions/14573466/get-hbase-region-size-via-api
Thanks
Divye Sheth
On Thu, Mar 6, 2014 at 2:01 PM, drunkenfist <su...@gmail.com>wrote:
> Hi,
>
> I'm kinda new to HBase API, so pardon me if the question seems very basic.
>
> I wanted to know if I can fetch the region info of a particular table on a
> particular region server. Basically I want to fetch the region size of a
> table (say 't1') on a region server (say 'rs1').
>
> Any help is appreciated. Thanks in advance.
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/Fetching-HBase-Region-info-for-a-particular-table-on-a-particular-region-server-tp4056742.html
> Sent from the HBase User mailing list archive at Nabble.com.
>