Package org.apache.hadoop.hbase.client
Class HRegionLocator
java.lang.Object
org.apache.hadoop.hbase.client.HRegionLocator
- All Implemented Interfaces:
 Closeable,AutoCloseable,RegionLocator
An implementation of 
RegionLocator. Used to view region location information for a single
 HBase table. Lightweight. Get as needed and just close when done. Instances of this class SHOULD
 NOT be constructed directly. Obtain an instance via Connection. See
 ConnectionFactory class comment for an example of how.
 
 This class is thread safe- 
Field Summary
FieldsFields inherited from interface org.apache.hadoop.hbase.client.RegionLocator
LOCATOR_META_REPLICAS_MODE, LOCATOR_META_REPLICAS_MODE_LOADBALANCE_SELECTOR - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidClear all the entries in the region location cache.voidclose()Retrieves all of the regions associated with this table.getName()Gets the fully qualified table name instance of this table.getRegionLocation(byte[] row, int replicaId, boolean reload) Finds the region with the given replica id 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.getRegionNames(List<HRegionLocation> locations) private List<RegionLocations>private <R,T extends Throwable> 
RtracedLocationFuture(TraceUtil.ThrowingCallable<R, T> action, Function<R, List<String>> getRegionNames, Supplier<io.opentelemetry.api.trace.Span> spanSupplier) 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.RegionLocator
getEndKeys, getRegionLocation, getRegionLocation, getRegionLocation, getRegionLocations, getStartEndKeys, getStartKeys 
- 
Field Details
- 
tableName
 - 
connection
 
 - 
 - 
Constructor Details
- 
HRegionLocator
 
 - 
 - 
Method Details
- 
close
- Specified by:
 closein interfaceAutoCloseable- Specified by:
 closein interfaceCloseable- Throws:
 IOException
 - 
getRegionLocation
public HRegionLocation getRegionLocation(byte[] row, int replicaId, boolean reload) throws IOException Description copied from interface:RegionLocatorFinds the region with the given replica id on which the given row is being served.- Specified by:
 getRegionLocationin interfaceRegionLocator- Parameters:
 row- Row to find.replicaId- the replica idreload- true to reload information or false to use cached information- Returns:
 - Location of the row.
 - Throws:
 IOException- if a remote or network exception occurs
 - 
getRegionLocations
Description copied from interface:RegionLocatorFind all the replicas for the region on which the given row is being served.- Specified by:
 getRegionLocationsin interfaceRegionLocator- 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.
 - Throws:
 IOException- if a remote or network exception occurs
 - 
getAllRegionLocations
Description copied from interface:RegionLocatorRetrieves 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 interfaceRegionLocator- Returns:
 - a 
Listof all regions associated with this table. - Throws:
 IOException- if a remote or network exception occurs
 - 
getRegionNames
 - 
clearRegionLocationCache
Description copied from interface:RegionLocatorClear all the entries in the region location cache. This may cause performance issue so use it with caution.- Specified by:
 clearRegionLocationCachein interfaceRegionLocator
 - 
getName
Description copied from interface:RegionLocatorGets the fully qualified table name instance of this table.- Specified by:
 getNamein interfaceRegionLocator
 - 
listRegionLocations
- Throws:
 IOException
 - 
tracedLocationFuture
private <R,T extends Throwable> R tracedLocationFuture(TraceUtil.ThrowingCallable<R, T> action, Function<R, throws TList<String>> getRegionNames, Supplier<io.opentelemetry.api.trace.Span> spanSupplier) - Throws:
 T extends Throwable
 
 -