Package org.apache.hadoop.hbase.client
Class AsyncTableRegionLocatorImpl
java.lang.Object
org.apache.hadoop.hbase.client.AsyncTableRegionLocatorImpl
- All Implemented Interfaces:
AsyncTableRegionLocator
The implementation of AsyncRegionLocator.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear all the entries in the region location cache.Retrieves all of the regions associated with this table.getName()
Gets the fully qualified table name instance of the table whose region we want to locate.getRegionLocation
(byte[] row, int replicaId, boolean reload) Finds the region with the givenreplicaId
on which the given row is being served.getRegionLocations
(byte[] row, boolean reload) Find all the replicas for the region on which the given row is being served.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.client.AsyncTableRegionLocator
getEndKeys, getRegionLocation, getRegionLocation, getRegionLocation, getRegionLocations, getStartEndKeys, getStartKeys
-
Field Details
-
tableName
-
conn
-
-
Constructor Details
-
AsyncTableRegionLocatorImpl
-
-
Method Details
-
getName
Description copied from interface:AsyncTableRegionLocator
Gets the fully qualified table name instance of the table whose region we want to locate.- Specified by:
getName
in interfaceAsyncTableRegionLocator
-
getRegionLocation
public CompletableFuture<HRegionLocation> getRegionLocation(byte[] row, int replicaId, boolean reload) Description copied from interface:AsyncTableRegionLocator
Finds the region with the givenreplicaId
on which the given row is being served. Returns the location of the region with the givenreplicaId
to which the row belongs.- Specified by:
getRegionLocation
in interfaceAsyncTableRegionLocator
- Parameters:
row
- Row to find.replicaId
- the replica id of the regionreload
- true to reload information or false to use cached information
-
getAllRegionLocations
Description copied from interface:AsyncTableRegionLocator
Retrieves all of the regions associated with this table. Usually we will go to meta table directly in this method so there is noreload
parameter. Notice that the location for region replicas other than the default replica are also returned.- Specified by:
getAllRegionLocations
in interfaceAsyncTableRegionLocator
- Returns:
- a
List
of all regions associated with this table.
-
getRegionLocations
Description copied from interface:AsyncTableRegionLocator
Find all the replicas for the region on which the given row is being served.- Specified by:
getRegionLocations
in interfaceAsyncTableRegionLocator
- Parameters:
row
- Row to find.reload
- true to reload information or false to use cached information- Returns:
- Locations for all the replicas of the row.
-
clearRegionLocationCache
Description copied from interface:AsyncTableRegionLocator
Clear all the entries in the region location cache. This may cause performance issue so use it with caution.- Specified by:
clearRegionLocationCache
in interfaceAsyncTableRegionLocator
-