@InterfaceAudience.Private public class MemcachedBlockCache extends Object implements BlockCache
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_SIZE |
static String |
MEMCACHED_CONFIG_KEY |
static long |
MEMCACHED_DEFAULT_TIMEOUT |
static String |
MEMCACHED_OPTIMEOUT_KEY |
static boolean |
MEMCACHED_OPTIMIZE_DEFAULT |
static String |
MEMCACHED_OPTIMIZE_KEY |
static String |
MEMCACHED_TIMEOUT_KEY |
| Constructor and Description |
|---|
MemcachedBlockCache(org.apache.hadoop.conf.Configuration c) |
| Modifier and Type | Method and Description |
|---|---|
void |
cacheBlock(BlockCacheKey cacheKey,
Cacheable buf) |
void |
cacheBlock(BlockCacheKey cacheKey,
Cacheable buf,
boolean inMemory) |
boolean |
evictBlock(BlockCacheKey cacheKey) |
int |
evictBlocksByHfileName(String hfileName)
This method does nothing so that memcached can handle all evictions.
|
Cacheable |
getBlock(BlockCacheKey cacheKey,
boolean caching,
boolean repeat,
boolean updateCacheMetrics) |
BlockCache[] |
getBlockCaches() |
long |
getBlockCount() |
long |
getCurrentDataSize() |
long |
getCurrentSize() |
long |
getDataBlockCount() |
long |
getFreeSize() |
long |
getMaxSize() |
CacheStats |
getStats() |
Iterator<CachedBlock> |
iterator() |
void |
shutdown() |
long |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreturnBlockforEach, spliteratorpublic static final int MAX_SIZE
public static final String MEMCACHED_CONFIG_KEY
public static final String MEMCACHED_TIMEOUT_KEY
public static final String MEMCACHED_OPTIMEOUT_KEY
public static final String MEMCACHED_OPTIMIZE_KEY
public static final long MEMCACHED_DEFAULT_TIMEOUT
public static final boolean MEMCACHED_OPTIMIZE_DEFAULT
public MemcachedBlockCache(org.apache.hadoop.conf.Configuration c)
throws IOException
IOExceptionpublic void cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory)
cacheBlock in interface BlockCachepublic void cacheBlock(BlockCacheKey cacheKey, Cacheable buf)
cacheBlock in interface BlockCachepublic Cacheable getBlock(BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics)
getBlock in interface BlockCachepublic boolean evictBlock(BlockCacheKey cacheKey)
evictBlock in interface BlockCachepublic int evictBlocksByHfileName(String hfileName)
evictBlocksByHfileName in interface BlockCachepublic CacheStats getStats()
getStats in interface BlockCachepublic void shutdown()
shutdown in interface BlockCachepublic long size()
size in interface BlockCachepublic long getMaxSize()
getMaxSize in interface BlockCachepublic long getFreeSize()
getFreeSize in interface BlockCachepublic long getCurrentSize()
getCurrentSize in interface BlockCachepublic long getCurrentDataSize()
getCurrentDataSize in interface BlockCachepublic long getBlockCount()
getBlockCount in interface BlockCachepublic long getDataBlockCount()
getDataBlockCount in interface BlockCachepublic Iterator<CachedBlock> iterator()
iterator in interface Iterable<CachedBlock>iterator in interface BlockCachepublic BlockCache[] getBlockCaches()
getBlockCaches in interface BlockCacheCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.