@InterfaceAudience.Private class AsyncTableRegionLocatorImpl extends Object implements AsyncTableRegionLocator
Modifier and Type | Field and Description |
---|---|
private AsyncConnectionImpl |
conn |
private TableName |
tableName |
Constructor and Description |
---|
AsyncTableRegionLocatorImpl(TableName tableName,
AsyncConnectionImpl conn) |
Modifier and Type | Method and Description |
---|---|
void |
clearRegionLocationCache()
Clear all the entries in the region location cache.
|
CompletableFuture<List<HRegionLocation>> |
getAllRegionLocations()
Retrieves all of the regions associated with this table.
|
TableName |
getName()
Gets the fully qualified table name instance of the table whose region we want to locate.
|
CompletableFuture<HRegionLocation> |
getRegionLocation(byte[] row,
int replicaId,
boolean reload)
Finds the region with the given
replicaId on which the given row is being served. |
CompletableFuture<List<HRegionLocation>> |
getRegionLocations(byte[] row,
boolean reload)
Find all the replicas for the region on which the given row is being served.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEndKeys, getRegionLocation, getRegionLocation, getRegionLocation, getRegionLocations, getStartEndKeys, getStartKeys
private final AsyncConnectionImpl conn
public AsyncTableRegionLocatorImpl(TableName tableName, AsyncConnectionImpl conn)
public TableName getName()
AsyncTableRegionLocator
getName
in interface AsyncTableRegionLocator
public CompletableFuture<HRegionLocation> getRegionLocation(byte[] row, int replicaId, boolean reload)
AsyncTableRegionLocator
replicaId
on which the given row is being served.
Returns the location of the region with the given replicaId
to which the row
belongs.getRegionLocation
in interface AsyncTableRegionLocator
row
- Row to find.replicaId
- the replica id of the regionreload
- true to reload information or false to use cached informationpublic CompletableFuture<List<HRegionLocation>> getAllRegionLocations()
AsyncTableRegionLocator
reload
parameter.
Notice that the location for region replicas other than the default replica are also returned.getAllRegionLocations
in interface AsyncTableRegionLocator
List
of all regions associated with this table.public CompletableFuture<List<HRegionLocation>> getRegionLocations(byte[] row, boolean reload)
AsyncTableRegionLocator
getRegionLocations
in interface AsyncTableRegionLocator
row
- Row to find.reload
- true to reload information or false to use cached informationpublic void clearRegionLocationCache()
AsyncTableRegionLocator
clearRegionLocationCache
in interface AsyncTableRegionLocator
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.