Hi ,
I wanna get Regions first key and last key for Htable.i did code like
this. please suggest am i doing right way
// people is table name
//con is Hbase configration
HTable ht=new HTable(con,"people");
NavigableMap<HRegionInfo,
ServerName> np=ht.getRegionLocations();
Set<HRegionInfo> setinfo=np.keySet();
List<HRegionInfo> lis=new ArrayList<HRegionInfo>();
lis.addAll(setinfo);
for(org.apache.hadoop.hbase.HRegionInfo h :lis)
{
System.out.println(h.getRegionId() + "getRegionId");
String s = new String(h.getStartKey());
System.out.println(s.toString()+"-------start key");
//System.out.println(new String(h.getStartKey())
+"------end key");
}
This functionality returns 0 .Means startkey returns as 0(s.length()).But
am able to get regionid
so anything i misunderstood?
cheers
Beeshma
--