@InterfaceAudience.Private class RegionLocatorOverAsyncTableRegionLocator extends Object implements RegionLocator
RegionLocator
implementation based on AsyncTableRegionLocator
.Modifier and Type | Field and Description |
---|---|
private AsyncTableRegionLocator |
locator |
LOCATOR_META_REPLICAS_MODE, LOCATOR_META_REPLICAS_MODE_LOADBALANCE_SELECTOR
Constructor and Description |
---|
RegionLocatorOverAsyncTableRegionLocator(AsyncTableRegionLocator locator) |
Modifier and Type | Method and Description |
---|---|
void |
clearRegionLocationCache()
Clear all the entries in the region location cache.
|
void |
close() |
List<HRegionLocation> |
getAllRegionLocations()
Retrieves all of the regions associated with this table.
|
TableName |
getName()
Gets the fully qualified table name instance of this table.
|
HRegionLocation |
getRegionLocation(byte[] row,
int replicaId,
boolean reload)
Finds the region with the given replica id on which the given row is being served.
|
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 AsyncTableRegionLocator locator
RegionLocatorOverAsyncTableRegionLocator(AsyncTableRegionLocator locator)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public HRegionLocation getRegionLocation(byte[] row, int replicaId, boolean reload) throws IOException
RegionLocator
getRegionLocation
in interface RegionLocator
row
- Row to find.replicaId
- the replica idreload
- true to reload information or false to use cached informationIOException
- if a remote or network exception occurspublic List<HRegionLocation> getRegionLocations(byte[] row, boolean reload) throws IOException
RegionLocator
getRegionLocations
in interface RegionLocator
row
- Row to find.reload
- true to reload information or false to use cached informationIOException
- if a remote or network exception occurspublic void clearRegionLocationCache()
RegionLocator
clearRegionLocationCache
in interface RegionLocator
public List<HRegionLocation> getAllRegionLocations() throws IOException
RegionLocator
reload
parameter.
Notice that the location for region replicas other than the default replica are also returned.getAllRegionLocations
in interface RegionLocator
List
of all regions associated with this table.IOException
- if a remote or network exception occurspublic TableName getName()
RegionLocator
getName
in interface RegionLocator
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.