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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear 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 givenreplicaIdon 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, waitMethods 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:AsyncTableRegionLocatorGets the fully qualified table name instance of the table whose region we want to locate.- Specified by:
getNamein interfaceAsyncTableRegionLocator
-
getRegionLocation
public CompletableFuture<HRegionLocation> getRegionLocation(byte[] row, int replicaId, boolean reload) Description copied from interface:AsyncTableRegionLocatorFinds the region with the givenreplicaIdon which the given row is being served. Returns the location of the region with the givenreplicaIdto which the row belongs.- Specified by:
getRegionLocationin 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:AsyncTableRegionLocatorRetrieves all of the regions associated with this table. Usually we will go to meta table directly in this method so there is noreloadparameter. Notice that the location for region replicas other than the default replica are also returned.- Specified by:
getAllRegionLocationsin interfaceAsyncTableRegionLocator- Returns:
- a
Listof all regions associated with this table.
-
getRegionLocations
Description copied from interface:AsyncTableRegionLocatorFind all the replicas for the region on which the given row is being served.- Specified by:
getRegionLocationsin 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:AsyncTableRegionLocatorClear all the entries in the region location cache. This may cause performance issue so use it with caution.- Specified by:
clearRegionLocationCachein interfaceAsyncTableRegionLocator
-