@InterfaceAudience.Private public class MetaCache extends Object
| Constructor and Description |
|---|
MetaCache(MetricsConnection metrics) |
| Modifier and Type | Method and Description |
|---|---|
void |
cacheLocation(org.apache.hadoop.hbase.TableName tableName,
RegionLocations locations)
Put a newly discovered HRegionLocation into the cache.
|
void |
cacheLocation(org.apache.hadoop.hbase.TableName tableName,
org.apache.hadoop.hbase.ServerName source,
HRegionLocation location)
Put a newly discovered HRegionLocation into the cache.
|
void |
clearCache()
Delete all cached entries.
|
void |
clearCache(HRegionLocation location) |
void |
clearCache(RegionInfo hri)
Deletes the cached location of the region if necessary, based on some error from source.
|
void |
clearCache(org.apache.hadoop.hbase.ServerName serverName)
Delete all cached entries of a server.
|
void |
clearCache(org.apache.hadoop.hbase.TableName tableName)
Delete all cached entries of a table.
|
void |
clearCache(org.apache.hadoop.hbase.TableName tableName,
byte[] row)
Delete a cached location, no matter what it is.
|
void |
clearCache(org.apache.hadoop.hbase.TableName tableName,
byte[] row,
int replicaId)
Delete a cached location with specific replicaId.
|
void |
clearCache(org.apache.hadoop.hbase.TableName tableName,
byte[] row,
org.apache.hadoop.hbase.ServerName serverName)
Delete a cached location for a table, row and server
|
RegionLocations |
getCachedLocation(org.apache.hadoop.hbase.TableName tableName,
byte[] row)
Search the cache for a location that fits our table and row key.
|
int |
getNumberOfCachedRegionLocations(org.apache.hadoop.hbase.TableName tableName)
Return the number of cached region for a table.
|
boolean |
isRegionCached(org.apache.hadoop.hbase.TableName tableName,
byte[] row)
Check the region cache to see whether a region is cached yet or not.
|
public MetaCache(MetricsConnection metrics)
public RegionLocations getCachedLocation(org.apache.hadoop.hbase.TableName tableName, byte[] row)
public void cacheLocation(org.apache.hadoop.hbase.TableName tableName,
org.apache.hadoop.hbase.ServerName source,
HRegionLocation location)
tableName - The table name.source - the source of the new locationlocation - the new locationpublic void cacheLocation(org.apache.hadoop.hbase.TableName tableName,
RegionLocations locations)
tableName - The table name.locations - the new locationspublic boolean isRegionCached(org.apache.hadoop.hbase.TableName tableName,
byte[] row)
tableName - tableNamerow - rowpublic int getNumberOfCachedRegionLocations(org.apache.hadoop.hbase.TableName tableName)
public void clearCache()
public void clearCache(org.apache.hadoop.hbase.ServerName serverName)
public void clearCache(org.apache.hadoop.hbase.TableName tableName)
public void clearCache(org.apache.hadoop.hbase.TableName tableName,
byte[] row)
tableName - tableNamerow - public void clearCache(org.apache.hadoop.hbase.TableName tableName,
byte[] row,
int replicaId)
tableName - tableNamerow - row keyreplicaId - region replica idpublic void clearCache(org.apache.hadoop.hbase.TableName tableName,
byte[] row,
org.apache.hadoop.hbase.ServerName serverName)
public void clearCache(RegionInfo hri)
hri - The region in question.public void clearCache(HRegionLocation location)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.