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

Switch to Threaded View
HBase >> mail # user >> Is it possible to get the region count of a table via an API?


Copy link to this message
-
Re: Is it possible to get the region count of a table via an API?
You can also use HTable#getRegionLocations():

  public NavigableMap<HRegionInfo, ServerName> getRegionLocations()
throwsIOException {

FYI
On Wed, Aug 28, 2013 at 6:12 AM, Surendra , Manchikanti <
[EMAIL PROTECTED]> wrote:

> List<
> http://docs.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true
> >
> <HRegionInfo<
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/HRegionInfo.html>>
> = HBaseAdmin#getTableRegions(tablename);
>
> HRegionInfo.getServerName();
>
> Regards,
> Surendra M
>
> -- Surendra Manchikanti
>
>
> On Wed, Aug 28, 2013 at 5:59 PM, Pavan Sudheendra <[EMAIL PROTECTED]
> >wrote:
>
> > How do i get the Server Name associated with the region?
> >
> >
> > On Wed, Aug 28, 2013 at 3:46 PM, Ashwanth Kumar <
> > [EMAIL PROTECTED]> wrote:
> >
> > > To check how regions you have in a table (and possibly what they are)
> > >  HBaseAdmin#getTableRegions<
> > >
> >
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HBaseAdmin.html#getTableRegions(byte[])
> > > >.
> > > In order to split the table you can use
> > > HBAdmin#split<
> > >
> >
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HBaseAdmin.html#split(byte[])
> > > >
> > > .
> > >
> > > PS: #split() is an Async Operation.
> > >
> > >
> > > On Wed, Aug 28, 2013 at 3:41 PM, Pavan Sudheendra <[EMAIL PROTECTED]
> > > >wrote:
> > >
> > > > Hi all,
> > > > I know what we can go over to the HBase UI and make a split on our
> > table
> > > so
> > > > that it will be distributed over the cluster.. Is there a way to know
> > it
> > > > via an API and to possibly change it? This is to know how many map
> > tasks
> > > > run on our table before we actually run the MR job..
> > > > --
> > > > Regards-
> > > > Pavan
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > Ashwanth Kumar / ashwanthkumar.in
> > >
> >
> >
> >
> > --
> > Regards-
> > Pavan
> >
>