Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase, mail # user - HConnection.locateRegions returns null


+
Lyska Anton 2013-01-02, 16:17
Copy link to this message
-
Re: HConnection.locateRegions returns null
Nicolas Liochon 2013-01-02, 16:33
Hi,

It's actually not implemented (I will update the javadoc for the latest
version)
You can use locateRegion(final byte [] tableName, final byte [] row), and
iterates on all region start keys to get all the regions.

Cheers,

Nicolas
On Wed, Jan 2, 2013 at 5:17 PM, Lyska Anton <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> I want to write simple tool for rebalancing regions in cluster.
> For that I need current location of all regions.
> I've found method HConnection.locateRegions(**tableName), but it always
> returns null.
> Also, i've tried to call HConnection.locateRegion(**regionName), and it
> returns null too.
>
> sample code:
>
>         Configuration config = HBaseConfiguration.create();
>         config.set("hbase.zookeeper.**quorum", host);
>
>         HConnection connection = HConnectionManager.**
> createConnection(config);
>         List<HRegionLocation> locations = connection.locateRegions(**tableName);
>  //return null here
>
> HBase Version    0.92.1-cdh4.1.2
>
> Thanks in advance.
>
>
+
Jean-Marc Spaggiari 2013-01-03, 00:34
+
Lyska Anton 2013-01-03, 09:33
+
Nicolas Liochon 2013-01-03, 10:26
+
Jean-Marc Spaggiari 2013-01-03, 18:33
+
Nicolas Liochon 2013-01-03, 19:06
+
Jean-Marc Spaggiari 2013-01-03, 19:27
+
Jean-Marc Spaggiari 2013-01-03, 19:42
+
Jean-Marc Spaggiari 2013-01-03, 19:45
+
Jean-Marc Spaggiari 2013-01-03, 20:26