Repository navigation
Conversation
|
I think you can remove TestCachedBlockQueue as well |
|
There is a method in BlockCacheManager.java that still has documentation referencing LRU. Unsure if this needs to be updated to TinyLFU or its talking about a different LRU like the LRU Map I see throughout the code /**
* This method provides a way for a cache implementation to access arbitrary configuration set
* by a user.
*
* <p>
* When running in a tserver, returns all Accumulo properties that have a prefix of
* {@code tserver.cache.config.<prefix>.<type>.} or
* {@code tserver.cache.config.<prefix>.default.} with values for specific cache types
* overriding defaults.
*
* <p>
* When running in a scan server, returns all Accumulo properties that have a prefix of
* {@code sserver.cache.config.<prefix>.<type>.} or
* {@code sserver.cache.config.<prefix>.default.} with values for specific cache types
* overriding defaults.
*
* <p>
* For example assume the following data is in Accumulo's system config and the plugin is
* running in a tserver.
*
* <pre>
* tserver.cache.config.lru.default.evictAfter=3600
* tserver.cache.config.lru.default.loadFactor=.75
* tserver.cache.config.lru.index.loadFactor=.55
* tserver.cache.config.lru.data.loadFactor=.65
* </pre>
*
* <p>
* If this method is called with {@code prefix=lru} and {@code type=INDEX} then it would return
* a map with the following key values. The load factor setting for index overrides the default
* value.
*
* <pre>
* evictAfter=3600
* loadFactor=.55
* </pre>
*
* @param prefix A unique identifier that corresponds to a particular BlockCacheManager
* implementation.
*/
Map<String,String> getProperties(String prefix, CacheType type); |
|
@Amemeda - can you merge |
I can't find where else its used in the code? I don't think moving it into |
Yea I think this should be updated. Maybe just swap the example to use a generic prefix like |
|
Users who have |
SynchronizedLoadingBlochCache has no usages, but it is referenced in BlockCache.getBlock documentation, so I was assuming it was still usable, I will still remove it for now /**
* This method allows a cache to prevent concurrent loads of the same block. However a cache
* implementation is not required to prevent concurrent loads.
* {@link SynchronousLoadingBlockCache} is an abstract class that a cache can extent which does
* prevent concurrent loading of the same block.
*
*
* @param blockName Block name to fetch
* @param loader If the block is not present in the cache, the loader can be called to load it.
* @return Block or null if block is not in the cache or didn't load.
*/
CacheEntry getBlock(String blockName, Loader loader); |

LruBlockCachewas deprecated in #4920 and replaced withTinyLfuBlockCache, this pr removesLruBlockCacheand related code:LruBlockCache.java: DeletedLruBlockCacheConfiguration.java: DeletedLruBlockCacheManager.java: DeletedTestlLruBlockCache.java: DeletedBlockCacheFactoryTest: Updated to remove deprecated testtestCreateLruBlockCacheFactory()CachedBlock.java: Deleted (only uses were in deleted test file)CacheBlockQueue.java: Deleted (only uses were in deleted test file)HeapSize.java: Deleted (only uses were in deleted test file)TestCachedBlockQueue: Deleted, only tested lru cache using the above 3 filesSynchronizedLoadingBlockCache.java: Deletedblockfile.cache.lrusubfolder: Emptied and deletedCloses #4921