Package org.apache.hadoop.hbase.io.hfile
Class TestMemcachedBlockCache.MockMemcachedBlockCache
java.lang.Object
org.apache.hadoop.hbase.io.hfile.MemcachedBlockCache
org.apache.hadoop.hbase.io.hfile.TestMemcachedBlockCache.MockMemcachedBlockCache
- All Implemented Interfaces:
Iterable<org.apache.hadoop.hbase.io.hfile.CachedBlock>,org.apache.hadoop.hbase.conf.ConfigurationObserver,org.apache.hadoop.hbase.io.hfile.BlockCache
- Enclosing class:
- TestMemcachedBlockCache
private class TestMemcachedBlockCache.MockMemcachedBlockCache
extends org.apache.hadoop.hbase.io.hfile.MemcachedBlockCache
Must not be an anonymous or local class, as Gson serializes those as null, which would break
CacheTestUtils.testConvertToJSON(BlockCache).-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.io.hfile.MemcachedBlockCache
MAX_SIZE, MAX_TIME, MEMCACHED_CONFIG_KEY, MEMCACHED_DEFAULT_TIMEOUT, MEMCACHED_OPTIMEOUT_KEY, MEMCACHED_OPTIMIZE_DEFAULT, MEMCACHED_OPTIMIZE_KEY, MEMCACHED_TIMEOUT_KEY, STAT_THREAD_PERIOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate <T> net.spy.memcached.internal.OperationFuture<T>createFuture(String key, long opTimeout, T result) protected net.spy.memcached.MemcachedClientcreateMemcachedClient(net.spy.memcached.ConnectionFactory factory, List<InetSocketAddress> serverAddresses) Methods inherited from class org.apache.hadoop.hbase.io.hfile.MemcachedBlockCache
cacheBlock, cacheBlock, evictBlock, evictBlocksByHfileName, getBlock, getBlockCaches, getBlockCount, getCurrentDataSize, getCurrentSize, getDataBlockCount, getFreeSize, getMaxSize, getStats, iterator, logStats, shutdown, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.io.hfile.BlockCache
blockFitsIntoTheCache, cacheBlock, evictBlocksRangeByHfileName, getBlock, getBlockSize, getFullyCachedFiles, getRegionCachedInfo, isAlreadyCached, isCacheEnabled, isMetaBlock, notifyFileCachingCompleted, onConfigurationChange, shouldCacheBlock, shouldCacheFile, waitForCacheInitializationMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MockMemcachedBlockCache
MockMemcachedBlockCache(org.apache.hadoop.conf.Configuration conf) throws IOException - Throws:
IOException
-
-
Method Details
-
createFuture
private <T> net.spy.memcached.internal.OperationFuture<T> createFuture(String key, long opTimeout, T result) -
createMemcachedClient
protected net.spy.memcached.MemcachedClient createMemcachedClient(net.spy.memcached.ConnectionFactory factory, List<InetSocketAddress> serverAddresses) throws IOException - Overrides:
createMemcachedClientin classorg.apache.hadoop.hbase.io.hfile.MemcachedBlockCache- Throws:
IOException
-