Package org.apache.hadoop.hbase.io.hfile
Class BlockCacheUtil.CachedBlocksByFile
java.lang.Object
org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile
- Enclosing class:
- BlockCacheUtil
Use one of these to keep a running account of cached blocks by file. Throw it away when done.
This is different than metrics in that it is stats on current state of a cache. See
getLoadedCachedBlocksByFile
-
Field Summary
Modifier and TypeFieldDescriptionprivate NavigableMap<String,
NavigableSet<CachedBlock>> Map by filename.private int
private int
private long
(package private) FastLongHistogram
private final int
How many blocks to look at before we give up.private final long
private long
-
Constructor Summary
-
Method Summary
-
Field Details
-
count
-
dataBlockCount
-
size
-
dataSize
-
now
-
max
How many blocks to look at before we give up. There could be many millions of blocks. We don't want the ui to freeze while we run through 1B blocks... users will think hbase dead. UI displays warning in red when stats are incomplete. -
cachedBlockByFile
Map by filename. use concurent utils because we want our Map and contained blocks sorted. -
hist
-
-
Constructor Details
-
CachedBlocksByFile
-
CachedBlocksByFile
CachedBlocksByFile(org.apache.hadoop.conf.Configuration c)
-
-
Method Details
-
update
Returns True if full.... if we won't be adding any more. -
isFull
- Returns:
- True if full; i.e. there are more items in the cache but we only loaded up the
maximum set in configuration
hbase.ui.blockcache.by.file.max
(Default: DEFAULT_MAX).
-
getCachedBlockStatsByFile
-
getCount
Returns count of blocks in the cache -
getDataCount
-
getSize
Returns size of blocks in the cache -
getDataSize
Returns Size of data. -
getAgeInCacheSnapshot
-
toString
-