hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramkrishna.S.Vasudevan" <ramkrishna.vasude...@huawei.com>
Subject RE: HRegionInfo returns empty values.
Date Fri, 19 Oct 2012 08:51:04 GMT
Can you tell me how the splitkeys are formed when the table was created? 
Or there are no splits at all for your table?  If there are no splits then
you will get empty start and endkey.

Regards
Ram

> -----Original Message-----
> From: Henry JunYoung KIM [mailto:henry.jykim@gmail.com]
> Sent: Friday, October 19, 2012 2:13 PM
> To: user@hbase.apache.org
> Subject: HRegionInfo returns empty values.
> 
> Hi, hbase-users.
> 
> To get a start-key and end-key from each region, I implemented simple
> code like this.
> 
> 
> 
> 	HTable table = new HTable(admin.getConf(), admin.getTableName());
>         NavigableMap<HRegionInfo, ServerName> locations =
> table.getRegionLocations();
>         for (Map.Entry<HRegionInfo, ServerName> entry:
> locations.entrySet()) {
>             HRegionInfo info = entry.getKey();
> 
>             System.out.println("server : " +
> entry.getValue().getHostname());
>             System.out.println("start : " + info.getStartKey().length);
>             System.out.println("end : " + info.getEndKey().length);
> 	}
> 
> 
> but, this code returns
> 
> server : one-of-servers-name
> start : 0
> end : 0
> 
> start-key and end-key is empty. nothing!
> data size is very strong. it's about 10,000.
> from integer 0 to integer 10,000.
> 
> how could I get correct range of a region?
> 
> thanks for your concerns.


Mime
View raw message