blob: d469cf8e88dd75ff0e4fc769db5cee5678d64bff [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LruAdaptiveBlockCache (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="LruAdaptiveBlockCache (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":9,"i3":10,"i4":10,"i5":9,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/LruAdaptiveBlockCache.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InvalidHFileException.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.BlockBucket.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html" target="_top">Frames</a></li>
<li><a href="LruAdaptiveBlockCache.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.hadoop.hbase.io.hfile</div>
<h2 title="Class LruAdaptiveBlockCache" class="title">Class LruAdaptiveBlockCache</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CachedBlock.html" title="interface in org.apache.hadoop.hbase.io.hfile">CachedBlock</a>&gt;, <a href="../../../../../../org/apache/hadoop/hbase/io/HeapSize.html" title="interface in org.apache.hadoop.hbase.io">HeapSize</a>, <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a>, <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/FirstLevelBlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">FirstLevelBlockCache</a>, <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/ResizableBlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">ResizableBlockCache</a></dd>
</dl>
<hr>
<br>
<pre>@InterfaceAudience.Private
public class <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.149">LruAdaptiveBlockCache</a>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/FirstLevelBlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">FirstLevelBlockCache</a></pre>
<div class="block"><b>This realisation improve performance of classical LRU
cache up to 3 times via reduce GC job.</b>
</p>
The classical block cache implementation that is memory-aware using <a href="../../../../../../org/apache/hadoop/hbase/io/HeapSize.html" title="interface in org.apache.hadoop.hbase.io"><code>HeapSize</code></a>,
memory-bound using an
LRU eviction algorithm, and concurrent: backed by a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent"><code>ConcurrentHashMap</code></a> and with a
non-blocking eviction thread giving constant-time <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-boolean-"><code>cacheBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey, org.apache.hadoop.hbase.io.hfile.Cacheable, boolean)</code></a> and <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-"><code>getBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey, boolean, boolean, boolean)</code></a>
operations.
</p>
Contains three levels of block priority to allow for scan-resistance and in-memory families
<a href="../../../../../../org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.html#setInMemory-boolean-"><code>ColumnFamilyDescriptorBuilder.setInMemory(boolean)</code></a> (An
in-memory column family is a column family that should be served from memory if possible):
single-access, multiple-accesses, and in-memory priority. A block is added with an in-memory
priority flag if <a href="../../../../../../org/apache/hadoop/hbase/client/ColumnFamilyDescriptor.html#isInMemory--"><code>ColumnFamilyDescriptor.isInMemory()</code></a>,
otherwise a block becomes a single access priority the first time it is read into this block
cache. If a block is accessed again while in cache, it is marked as a multiple access priority
block. This delineation of blocks is used to prevent scans from thrashing the cache adding a
least-frequently-used element to the eviction algorithm.
<p/>
Each priority is given its own chunk of the total cache to ensure fairness during eviction. Each
priority will retain close to its maximum size, however, if any priority is not using its entire
chunk the others are able to grow beyond their chunk size.
<p/>
Instantiated at a minimum with the total size and average block size. All sizes are in bytes. The
block size is not especially important as this cache is fully dynamic in its sizing of blocks. It
is only used for pre-allocating data structures and in initial heap estimation of the map.
<p/>
The detailed constructor defines the sizes for the three priorities (they should total to the
<code>maximum size</code> defined). It also sets the levels that trigger and control the eviction
thread.
<p/>
The <code>acceptable size</code> is the cache size level which triggers the eviction process to
start. It evicts enough blocks to get the size below the minimum size specified.
<p/>
Eviction happens in a separate thread and involves a single full-scan of the map. It determines
how many bytes must be freed to reach the minimum size, and then while scanning determines the
fewest least-recently-used blocks necessary from each of the three priorities (would be 3 times
bytes to free). It then uses the priority chunk sizes to evict fairly according to the relative
sizes and usage.
<p/>
Adaptive LRU cache lets speed up performance while we are reading much more data than can fit
into BlockCache and it is the cause of a high rate of evictions. This in turn leads to heavy
Garbage Collector works. So a lot of blocks put into BlockCache but never read, but spending
a lot of CPU resources for cleaning. We could avoid this situation via parameters:
<p/>
<b>hbase.lru.cache.heavy.eviction.count.limit</b> - set how many times we have to run the
eviction process that starts to avoid putting data to BlockCache. By default it is 0 and it
meats the feature will start at the beginning. But if we have some times short reading the same
data and some times long-term reading - we can divide it by this parameter. For example we know
that our short reading used to be about 1 minutes, then we have to set the parameter about 10
and it will enable the feature only for long time massive reading (after ~100 seconds). So when
we use short-reading and want all of them in the cache we will have it (except for eviction of
course). When we use long-term heavy reading the feature will be enabled after some time and
bring better performance.
<p/>
<b>hbase.lru.cache.heavy.eviction.mb.size.limit</b> - set how many bytes in 10 seconds desirable
putting into BlockCache (and evicted from it). The feature will try to reach this value and
maintain it. Don't try to set it too small because it leads to premature exit from this mode.
For powerful CPUs (about 20-40 physical cores) it could be about 400-500 MB. Average system
(~10 cores) 200-300 MB. Some weak systems (2-5 cores) may be good with 50-100 MB.
How it works: we set the limit and after each ~10 second calculate how many bytes were freed.
Overhead = Freed Bytes Sum (MB) * 100 / Limit (MB) - 100;
For example we set the limit = 500 and were evicted 2000 MB. Overhead is:
2000 * 100 / 500 - 100 = 300%
The feature is going to reduce a percent caching data blocks and fit evicted bytes closer to
100% (500 MB). Some kind of an auto-scaling.
If freed bytes less then the limit we have got negative overhead.
For example if were freed 200 MB:
200 * 100 / 500 - 100 = -60%
The feature will increase the percent of caching blocks.
That leads to fit evicted bytes closer to 100% (500 MB).
The current situation we can find out in the log of RegionServer:
BlockCache evicted (MB): 0, overhead (%): -100, heavy eviction counter: 0, current caching
DataBlock (%): 100 - means no eviction, 100% blocks is caching
BlockCache evicted (MB): 2000, overhead (%): 300, heavy eviction counter: 1, current caching
DataBlock (%): 97 - means eviction begin, reduce of caching blocks by 3%.
It help to tune your system and find out what value is better set. Don't try to reach 0%
overhead, it is impossible. Quite good 50-100% overhead,
it prevents premature exit from this mode.
<p/>
<b>hbase.lru.cache.heavy.eviction.overhead.coefficient</b> - set how fast we want to get the
result. If we know that our reading is heavy for a long time, we don't want to wait and can
increase the coefficient and get good performance sooner. But if we aren't sure we can do it
slowly and it could prevent premature exit from this mode. So, when the coefficient is higher
we can get better performance when heavy reading is stable. But when reading is changing we
can adjust to it and set the coefficient to lower value.
For example, we set the coefficient = 0.01. It means the overhead (see above) will be
multiplied by 0.01 and the result is the value of reducing percent caching blocks. For example,
if the overhead = 300% and the coefficient = 0.01,
then percent of caching blocks will reduce by 3%.
Similar logic when overhead has got negative value (overshooting). Maybe it is just short-term
fluctuation and we will try to stay in this mode. It helps avoid premature exit during
short-term fluctuation. Backpressure has simple logic: more overshooting - more caching blocks.
<p/>
Find more information about improvement: https://issues.apache.org/jira/browse/HBASE-23887</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.BlockBucket.html" title="class in org.apache.hadoop.hbase.io.hfile">LruAdaptiveBlockCache.BlockBucket</a></span></code>
<div class="block">Used to group blocks into priority buckets.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.EvictionThread.html" title="class in org.apache.hadoop.hbase.io.hfile">LruAdaptiveBlockCache.EvictionThread</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.StatisticsThread.html" title="class in org.apache.hadoop.hbase.io.hfile">LruAdaptiveBlockCache.StatisticsThread</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#acceptableFactor">acceptableFactor</a></span></code>
<div class="block">Acceptable size of cache (no evictions if size < acceptable)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#blockSize">blockSize</a></span></code>
<div class="block">Approximate block size</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#CACHE_FIXED_OVERHEAD">CACHE_FIXED_OVERHEAD</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#cacheDataBlockPercent">cacheDataBlockPercent</a></span></code>
<div class="block">Percent of cached data blocks</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html?is-external=true" title="class or interface in java.util.concurrent.atomic">AtomicLong</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#count">count</a></span></code>
<div class="block">Cache access count (sequential ID)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#dataBlockElements">dataBlockElements</a></span></code>
<div class="block">Current number of cached data block elements</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#dataBlockSize">dataBlockSize</a></span></code>
<div class="block">Current size of data blocks</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_ACCEPTABLE_FACTOR">DEFAULT_ACCEPTABLE_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_CONCURRENCY_LEVEL">DEFAULT_CONCURRENCY_LEVEL</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_HARD_CAPACITY_LIMIT_FACTOR">DEFAULT_HARD_CAPACITY_LIMIT_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_IN_MEMORY_FORCE_MODE">DEFAULT_IN_MEMORY_FORCE_MODE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_LOAD_FACTOR">DEFAULT_LOAD_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_LRU_CACHE_HEAVY_EVICTION_COUNT_LIMIT">DEFAULT_LRU_CACHE_HEAVY_EVICTION_COUNT_LIMIT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_LRU_CACHE_HEAVY_EVICTION_MB_SIZE_LIMIT">DEFAULT_LRU_CACHE_HEAVY_EVICTION_MB_SIZE_LIMIT</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_LRU_CACHE_HEAVY_EVICTION_OVERHEAD_COEFFICIENT">DEFAULT_LRU_CACHE_HEAVY_EVICTION_OVERHEAD_COEFFICIENT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_MAX_BLOCK_SIZE">DEFAULT_MAX_BLOCK_SIZE</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_MEMORY_FACTOR">DEFAULT_MEMORY_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_MIN_FACTOR">DEFAULT_MIN_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_MULTI_FACTOR">DEFAULT_MULTI_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#DEFAULT_SINGLE_FACTOR">DEFAULT_SINGLE_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html?is-external=true" title="class or interface in java.util.concurrent.atomic">AtomicLong</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#elements">elements</a></span></code>
<div class="block">Current number of cached elements</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#evictionInProgress">evictionInProgress</a></span></code>
<div class="block">Volatile boolean to track if we are in an eviction process or not</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/ReentrantLock.html?is-external=true" title="class or interface in java.util.concurrent.locks">ReentrantLock</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#evictionLock">evictionLock</a></span></code>
<div class="block">Eviction lock (locked when eviction in process)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.EvictionThread.html" title="class in org.apache.hadoop.hbase.io.hfile">LruAdaptiveBlockCache.EvictionThread</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#evictionThread">evictionThread</a></span></code>
<div class="block">Eviction thread</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#forceInMemory">forceInMemory</a></span></code>
<div class="block">Whether in-memory hfile's data block has higher priority when evicting</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#hardCapacityLimitFactor">hardCapacityLimitFactor</a></span></code>
<div class="block">hard capacity limit</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#heavyEvictionCountLimit">heavyEvictionCountLimit</a></span></code>
<div class="block">Limit of count eviction process when start to avoid to cache blocks</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#heavyEvictionMbSizeLimit">heavyEvictionMbSizeLimit</a></span></code>
<div class="block">Limit of volume eviction process when start to avoid to cache blocks</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#heavyEvictionOverheadCoefficient">heavyEvictionOverheadCoefficient</a></span></code>
<div class="block">Adjust auto-scaling via overhead of evition rate</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static org.slf4j.Logger</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LOG">LOG</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LRU_ACCEPTABLE_FACTOR_CONFIG_NAME">LRU_ACCEPTABLE_FACTOR_CONFIG_NAME</a></span></code>
<div class="block">Acceptable size of cache (no evictions if size < acceptable)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LRU_CACHE_HEAVY_EVICTION_COUNT_LIMIT">LRU_CACHE_HEAVY_EVICTION_COUNT_LIMIT</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LRU_CACHE_HEAVY_EVICTION_MB_SIZE_LIMIT">LRU_CACHE_HEAVY_EVICTION_MB_SIZE_LIMIT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LRU_CACHE_HEAVY_EVICTION_OVERHEAD_COEFFICIENT">LRU_CACHE_HEAVY_EVICTION_OVERHEAD_COEFFICIENT</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LRU_HARD_CAPACITY_LIMIT_FACTOR_CONFIG_NAME">LRU_HARD_CAPACITY_LIMIT_FACTOR_CONFIG_NAME</a></span></code>
<div class="block">Hard capacity limit of cache, will reject any put if size > this * acceptable</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LRU_IN_MEMORY_FORCE_MODE_CONFIG_NAME">LRU_IN_MEMORY_FORCE_MODE_CONFIG_NAME</a></span></code>
<div class="block">Configuration key to force data-block always (except in-memory are too much)
cached in memory for in-memory hfile, unlike inMemory, which is a column-family
configuration, inMemoryForceMode is a cluster-wide configuration</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LRU_MAX_BLOCK_SIZE">LRU_MAX_BLOCK_SIZE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LRU_MEMORY_PERCENTAGE_CONFIG_NAME">LRU_MEMORY_PERCENTAGE_CONFIG_NAME</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LRU_MIN_FACTOR_CONFIG_NAME">LRU_MIN_FACTOR_CONFIG_NAME</a></span></code>
<div class="block">Percentage of total size that eviction will evict until; e.g.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LRU_MULTI_PERCENTAGE_CONFIG_NAME">LRU_MULTI_PERCENTAGE_CONFIG_NAME</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LRU_SINGLE_PERCENTAGE_CONFIG_NAME">LRU_SINGLE_PERCENTAGE_CONFIG_NAME</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent">ConcurrentHashMap</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>,<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruCachedBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">LruCachedBlock</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#map">map</a></span></code>
<div class="block">Defined the cache map as <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent"><code>ConcurrentHashMap</code></a> here, because in
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-"><code>getBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey, boolean, boolean, boolean)</code></a>, we need to guarantee the atomicity
of map#computeIfPresent (key, func).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#maxBlockSize">maxBlockSize</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#maxSize">maxSize</a></span></code>
<div class="block">Maximum allowable size of cache (block put if size > max, evict)</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#memoryFactor">memoryFactor</a></span></code>
<div class="block">In-memory bucket size</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#minFactor">minFactor</a></span></code>
<div class="block">Minimum threshold of cache (when evicting, evict until size < min)</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#multiFactor">multiFactor</a></span></code>
<div class="block">Multiple access bucket size</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#overhead">overhead</a></span></code>
<div class="block">Overhead of the structure itself</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html?is-external=true" title="class or interface in java.util.concurrent">ScheduledExecutorService</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#scheduleThreadPool">scheduleThreadPool</a></span></code>
<div class="block">Statistics thread schedule pool (for heavy debugging, could remove)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#singleFactor">singleFactor</a></span></code>
<div class="block">Single access bucket size</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html?is-external=true" title="class or interface in java.util.concurrent.atomic">AtomicLong</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#size">size</a></span></code>
<div class="block">Current size of cache</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#STAT_THREAD_PERIOD">STAT_THREAD_PERIOD</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheStats.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheStats</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#stats">stats</a></span></code>
<div class="block">Cache statistics</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#victimHandler">victimHandler</a></span></code>
<div class="block">Where to send victims (blocks evicted/missing from the cache).</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LruAdaptiveBlockCache-long-long-">LruAdaptiveBlockCache</a></span>(long&nbsp;maxSize,
long&nbsp;blockSize)</code>
<div class="block">Default constructor.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LruAdaptiveBlockCache-long-long-boolean-">LruAdaptiveBlockCache</a></span>(long&nbsp;maxSize,
long&nbsp;blockSize,
boolean&nbsp;evictionThread)</code>
<div class="block">Constructor used for testing.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LruAdaptiveBlockCache-long-long-boolean-org.apache.hadoop.conf.Configuration-">LruAdaptiveBlockCache</a></span>(long&nbsp;maxSize,
long&nbsp;blockSize,
boolean&nbsp;evictionThread,
org.apache.hadoop.conf.Configuration&nbsp;conf)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LruAdaptiveBlockCache-long-long-boolean-int-float-int-float-float-float-float-float-float-boolean-long-int-long-float-">LruAdaptiveBlockCache</a></span>(long&nbsp;maxSize,
long&nbsp;blockSize,
boolean&nbsp;evictionThread,
int&nbsp;mapInitialSize,
float&nbsp;mapLoadFactor,
int&nbsp;mapConcurrencyLevel,
float&nbsp;minFactor,
float&nbsp;acceptableFactor,
float&nbsp;singleFactor,
float&nbsp;multiFactor,
float&nbsp;memoryFactor,
float&nbsp;hardLimitFactor,
boolean&nbsp;forceInMemory,
long&nbsp;maxBlockSize,
int&nbsp;heavyEvictionCountLimit,
long&nbsp;heavyEvictionMbSizeLimit,
float&nbsp;heavyEvictionOverheadCoefficient)</code>
<div class="block">Configurable constructor.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#LruAdaptiveBlockCache-long-long-org.apache.hadoop.conf.Configuration-">LruAdaptiveBlockCache</a></span>(long&nbsp;maxSize,
long&nbsp;blockSize,
org.apache.hadoop.conf.Configuration&nbsp;conf)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>(package private) long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#acceptableSize--">acceptableSize</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#asReferencedHeapBlock-org.apache.hadoop.hbase.io.hfile.Cacheable-">asReferencedHeapBlock</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;buf)</code>
<div class="block">The block cached in LruAdaptiveBlockCache will always be an heap block: on the one side,
the heap access will be more faster then off-heap, the small index block or meta block
cached in CombinedBlockCache will benefit a lot.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>private static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#assertCounterSanity-long-long-">assertCounterSanity</a></span>(long&nbsp;mapSize,
long&nbsp;counterVal)</code>
<div class="block">Sanity-checking for parity between actual block cache content and metrics.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-">cacheBlock</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;buf)</code>
<div class="block">Cache the block with the specified name and buffer.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-boolean-">cacheBlock</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;buf,
boolean&nbsp;inMemory)</code>
<div class="block">Cache the block with the specified name and buffer.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>private static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#calculateOverhead-long-long-int-">calculateOverhead</a></span>(long&nbsp;maxSize,
long&nbsp;blockSize,
int&nbsp;concurrency)</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#clearCache--">clearCache</a></span>()</code>
<div class="block">Clears the cache.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#containsBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">containsBlock</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey)</code>
<div class="block">Whether the cache contains block with specified cacheKey</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>(package private) long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#evict--">evict</a></span>()</code>
<div class="block">Eviction method.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#evictBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">evictBlock</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey)</code>
<div class="block">Evict block from cache.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>protected long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#evictBlock-org.apache.hadoop.hbase.io.hfile.LruCachedBlock-boolean-">evictBlock</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruCachedBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">LruCachedBlock</a>&nbsp;block,
boolean&nbsp;evictedByEvictionProcess)</code>
<div class="block">Evict the block, and it will be cached by the victim handler if exists &amp;&amp;
block may be read again later</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#evictBlocksByHfileName-java.lang.String-">evictBlocksByHfileName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;hfileName)</code>
<div class="block">Evicts all blocks for a specific HFile.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-">getBlock</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
boolean&nbsp;caching,
boolean&nbsp;repeat,
boolean&nbsp;updateCacheMetrics)</code>
<div class="block">Get the buffer of the block with the specified name.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getBlockCaches--">getBlockCaches</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getBlockCount--">getBlockCount</a></span>()</code>
<div class="block">Returns the number of blocks currently cached in the block cache.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getCacheDataBlockPercent--">getCacheDataBlockPercent</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getCurrentDataSize--">getCurrentDataSize</a></span>()</code>
<div class="block">Returns the occupied size of data blocks, in bytes.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getCurrentSize--">getCurrentSize</a></span>()</code>
<div class="block">Returns the occupied size of the block cache, in bytes.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getDataBlockCount--">getDataBlockCount</a></span>()</code>
<div class="block">Returns the number of data blocks currently cached in the block cache.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/io/encoding/DataBlockEncoding.html" title="enum in org.apache.hadoop.hbase.io.encoding">DataBlockEncoding</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getEncodingCountsForTest--">getEncodingCountsForTest</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>(package private) <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.EvictionThread.html" title="class in org.apache.hadoop.hbase.io.hfile">LruAdaptiveBlockCache.EvictionThread</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getEvictionThread--">getEvictionThread</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getFreeSize--">getFreeSize</a></span>()</code>
<div class="block">Returns the free size of the block cache, in bytes.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>(package private) <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>,<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruCachedBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">LruCachedBlock</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getMapForTests--">getMapForTests</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getMaxSize--">getMaxSize</a></span>()</code>
<div class="block">Get the maximum size of this cache.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>(package private) long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getOverhead--">getOverhead</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheStats.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheStats</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getStats--">getStats</a></span>()</code>
<div class="block">Get counter statistics for this cache.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#heapSize--">heapSize</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>(package private) boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#isEvictionInProgress--">isEvictionInProgress</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CachedBlock.html" title="interface in org.apache.hadoop.hbase.io.hfile">CachedBlock</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#iterator--">iterator</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#logStats--">logStats</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#memorySize--">memorySize</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#minSize--">minSize</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#multiSize--">multiSize</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>private void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#runEviction--">runEviction</a></span>()</code>
<div class="block">Multi-threaded call to run the eviction process.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#setMaxSize-long-">setMaxSize</a></span>(long&nbsp;maxSize)</code>
<div class="block">Sets the max heap size that can be used by the BlockCache.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#setVictimCache-org.apache.hadoop.hbase.io.hfile.BlockCache-">setVictimCache</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a>&nbsp;victimCache)</code>
<div class="block">Specifies the secondary cache.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#shutdown--">shutdown</a></span>()</code>
<div class="block">Shutdown the cache.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#singleSize--">singleSize</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#size--">size</a></span>()</code>
<div class="block">Returns the total size of the block cache, in bytes.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#updateSizeMetrics-org.apache.hadoop.hbase.io.hfile.LruCachedBlock-boolean-">updateSizeMetrics</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruCachedBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">LruCachedBlock</a>&nbsp;cb,
boolean&nbsp;evict)</code>
<div class="block">Helper function that updates the local size counter and also updates any
per-cf or per-blocktype metrics it can discern from given
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruCachedBlock.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>LruCachedBlock</code></a></div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.hadoop.hbase.io.hfile.BlockCache">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.hadoop.hbase.io.hfile.<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></h3>
<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-org.apache.hadoop.hbase.io.hfile.BlockType-">getBlock</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Iterable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true#forEach-java.util.function.Consumer-" title="class or interface in java.lang">forEach</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true#spliterator--" title="class or interface in java.lang">spliterator</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="LOG">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LOG</h4>
<pre>private static final&nbsp;org.slf4j.Logger <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.151">LOG</a></pre>
</li>
</ul>
<a name="LRU_MIN_FACTOR_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LRU_MIN_FACTOR_CONFIG_NAME</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.157">LRU_MIN_FACTOR_CONFIG_NAME</a></pre>
<div class="block">Percentage of total size that eviction will evict until; e.g. if set to .8, then we will keep
evicting during an eviction run till the cache size is down to 80% of the total.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.LRU_MIN_FACTOR_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LRU_ACCEPTABLE_FACTOR_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LRU_ACCEPTABLE_FACTOR_CONFIG_NAME</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.162">LRU_ACCEPTABLE_FACTOR_CONFIG_NAME</a></pre>
<div class="block">Acceptable size of cache (no evictions if size < acceptable)</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.LRU_ACCEPTABLE_FACTOR_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LRU_HARD_CAPACITY_LIMIT_FACTOR_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LRU_HARD_CAPACITY_LIMIT_FACTOR_CONFIG_NAME</h4>
<pre>static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.168">LRU_HARD_CAPACITY_LIMIT_FACTOR_CONFIG_NAME</a></pre>
<div class="block">Hard capacity limit of cache, will reject any put if size > this * acceptable</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.LRU_HARD_CAPACITY_LIMIT_FACTOR_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LRU_SINGLE_PERCENTAGE_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LRU_SINGLE_PERCENTAGE_CONFIG_NAME</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.170">LRU_SINGLE_PERCENTAGE_CONFIG_NAME</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.LRU_SINGLE_PERCENTAGE_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LRU_MULTI_PERCENTAGE_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LRU_MULTI_PERCENTAGE_CONFIG_NAME</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.172">LRU_MULTI_PERCENTAGE_CONFIG_NAME</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.LRU_MULTI_PERCENTAGE_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LRU_MEMORY_PERCENTAGE_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LRU_MEMORY_PERCENTAGE_CONFIG_NAME</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.174">LRU_MEMORY_PERCENTAGE_CONFIG_NAME</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.LRU_MEMORY_PERCENTAGE_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LRU_IN_MEMORY_FORCE_MODE_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LRU_IN_MEMORY_FORCE_MODE_CONFIG_NAME</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.182">LRU_IN_MEMORY_FORCE_MODE_CONFIG_NAME</a></pre>
<div class="block">Configuration key to force data-block always (except in-memory are too much)
cached in memory for in-memory hfile, unlike inMemory, which is a column-family
configuration, inMemoryForceMode is a cluster-wide configuration</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.LRU_IN_MEMORY_FORCE_MODE_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_LOAD_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_LOAD_FACTOR</h4>
<pre>static final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.188">DEFAULT_LOAD_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_LOAD_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_CONCURRENCY_LEVEL">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_CONCURRENCY_LEVEL</h4>
<pre>static final&nbsp;int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.189">DEFAULT_CONCURRENCY_LEVEL</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_CONCURRENCY_LEVEL">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_MIN_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MIN_FACTOR</h4>
<pre>private static final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.192">DEFAULT_MIN_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_MIN_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_ACCEPTABLE_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_ACCEPTABLE_FACTOR</h4>
<pre>static final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.193">DEFAULT_ACCEPTABLE_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_ACCEPTABLE_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_SINGLE_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_SINGLE_FACTOR</h4>
<pre>private static final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.196">DEFAULT_SINGLE_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_SINGLE_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_MULTI_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MULTI_FACTOR</h4>
<pre>private static final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.197">DEFAULT_MULTI_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_MULTI_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_MEMORY_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MEMORY_FACTOR</h4>
<pre>private static final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.198">DEFAULT_MEMORY_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_MEMORY_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_HARD_CAPACITY_LIMIT_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_HARD_CAPACITY_LIMIT_FACTOR</h4>
<pre>private static final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.200">DEFAULT_HARD_CAPACITY_LIMIT_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_HARD_CAPACITY_LIMIT_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_IN_MEMORY_FORCE_MODE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_IN_MEMORY_FORCE_MODE</h4>
<pre>private static final&nbsp;boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.202">DEFAULT_IN_MEMORY_FORCE_MODE</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_IN_MEMORY_FORCE_MODE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="STAT_THREAD_PERIOD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STAT_THREAD_PERIOD</h4>
<pre>private static final&nbsp;int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.205">STAT_THREAD_PERIOD</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.STAT_THREAD_PERIOD">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LRU_MAX_BLOCK_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LRU_MAX_BLOCK_SIZE</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.206">LRU_MAX_BLOCK_SIZE</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.LRU_MAX_BLOCK_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_MAX_BLOCK_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MAX_BLOCK_SIZE</h4>
<pre>private static final&nbsp;long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.207">DEFAULT_MAX_BLOCK_SIZE</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_MAX_BLOCK_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LRU_CACHE_HEAVY_EVICTION_COUNT_LIMIT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LRU_CACHE_HEAVY_EVICTION_COUNT_LIMIT</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.209">LRU_CACHE_HEAVY_EVICTION_COUNT_LIMIT</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.LRU_CACHE_HEAVY_EVICTION_COUNT_LIMIT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_LRU_CACHE_HEAVY_EVICTION_COUNT_LIMIT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_LRU_CACHE_HEAVY_EVICTION_COUNT_LIMIT</h4>
<pre>private static final&nbsp;int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.215">DEFAULT_LRU_CACHE_HEAVY_EVICTION_COUNT_LIMIT</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_LRU_CACHE_HEAVY_EVICTION_COUNT_LIMIT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LRU_CACHE_HEAVY_EVICTION_MB_SIZE_LIMIT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LRU_CACHE_HEAVY_EVICTION_MB_SIZE_LIMIT</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.217">LRU_CACHE_HEAVY_EVICTION_MB_SIZE_LIMIT</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.LRU_CACHE_HEAVY_EVICTION_MB_SIZE_LIMIT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_LRU_CACHE_HEAVY_EVICTION_MB_SIZE_LIMIT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_LRU_CACHE_HEAVY_EVICTION_MB_SIZE_LIMIT</h4>
<pre>private static final&nbsp;long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.219">DEFAULT_LRU_CACHE_HEAVY_EVICTION_MB_SIZE_LIMIT</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_LRU_CACHE_HEAVY_EVICTION_MB_SIZE_LIMIT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LRU_CACHE_HEAVY_EVICTION_OVERHEAD_COEFFICIENT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LRU_CACHE_HEAVY_EVICTION_OVERHEAD_COEFFICIENT</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.221">LRU_CACHE_HEAVY_EVICTION_OVERHEAD_COEFFICIENT</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.LRU_CACHE_HEAVY_EVICTION_OVERHEAD_COEFFICIENT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_LRU_CACHE_HEAVY_EVICTION_OVERHEAD_COEFFICIENT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_LRU_CACHE_HEAVY_EVICTION_OVERHEAD_COEFFICIENT</h4>
<pre>private static final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.223">DEFAULT_LRU_CACHE_HEAVY_EVICTION_OVERHEAD_COEFFICIENT</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache.DEFAULT_LRU_CACHE_HEAVY_EVICTION_OVERHEAD_COEFFICIENT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="map">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>map</h4>
<pre>private final transient&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent">ConcurrentHashMap</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>,<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruCachedBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">LruCachedBlock</a>&gt; <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.233">map</a></pre>
<div class="block">Defined the cache map as <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent"><code>ConcurrentHashMap</code></a> here, because in
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-"><code>getBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey, boolean, boolean, boolean)</code></a>, we need to guarantee the atomicity
of map#computeIfPresent (key, func). Besides, the func method must execute exactly once only
when the key is present and under the lock context, otherwise the reference count will be
messed up. Notice that the
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentSkipListMap.html?is-external=true" title="class or interface in java.util.concurrent"><code>ConcurrentSkipListMap</code></a> can not guarantee that.</div>
</li>
</ul>
<a name="evictionLock">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evictionLock</h4>
<pre>private final transient&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/ReentrantLock.html?is-external=true" title="class or interface in java.util.concurrent.locks">ReentrantLock</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.236">evictionLock</a></pre>
<div class="block">Eviction lock (locked when eviction in process)</div>
</li>
</ul>
<a name="maxBlockSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxBlockSize</h4>
<pre>private final&nbsp;long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.238">maxBlockSize</a></pre>
</li>
</ul>
<a name="evictionInProgress">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evictionInProgress</h4>
<pre>private volatile&nbsp;boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.241">evictionInProgress</a></pre>
<div class="block">Volatile boolean to track if we are in an eviction process or not</div>
</li>
</ul>
<a name="evictionThread">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evictionThread</h4>
<pre>private final transient&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.EvictionThread.html" title="class in org.apache.hadoop.hbase.io.hfile">LruAdaptiveBlockCache.EvictionThread</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.244">evictionThread</a></pre>
<div class="block">Eviction thread</div>
</li>
</ul>
<a name="scheduleThreadPool">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scheduleThreadPool</h4>
<pre>private final transient&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html?is-external=true" title="class or interface in java.util.concurrent">ScheduledExecutorService</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.247">scheduleThreadPool</a></pre>
<div class="block">Statistics thread schedule pool (for heavy debugging, could remove)</div>
</li>
</ul>
<a name="size">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>private final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html?is-external=true" title="class or interface in java.util.concurrent.atomic">AtomicLong</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.252">size</a></pre>
<div class="block">Current size of cache</div>
</li>
</ul>
<a name="dataBlockSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dataBlockSize</h4>
<pre>private final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.255">dataBlockSize</a></pre>
<div class="block">Current size of data blocks</div>
</li>
</ul>
<a name="elements">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>elements</h4>
<pre>private final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html?is-external=true" title="class or interface in java.util.concurrent.atomic">AtomicLong</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.258">elements</a></pre>
<div class="block">Current number of cached elements</div>
</li>
</ul>
<a name="dataBlockElements">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dataBlockElements</h4>
<pre>private final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.261">dataBlockElements</a></pre>
<div class="block">Current number of cached data block elements</div>
</li>
</ul>
<a name="count">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>count</h4>
<pre>private final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html?is-external=true" title="class or interface in java.util.concurrent.atomic">AtomicLong</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.264">count</a></pre>
<div class="block">Cache access count (sequential ID)</div>
</li>
</ul>
<a name="hardCapacityLimitFactor">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hardCapacityLimitFactor</h4>
<pre>private final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.267">hardCapacityLimitFactor</a></pre>
<div class="block">hard capacity limit</div>
</li>
</ul>
<a name="stats">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stats</h4>
<pre>private final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheStats.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheStats</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.270">stats</a></pre>
<div class="block">Cache statistics</div>
</li>
</ul>
<a name="maxSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxSize</h4>
<pre>private&nbsp;long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.273">maxSize</a></pre>
<div class="block">Maximum allowable size of cache (block put if size > max, evict)</div>
</li>
</ul>
<a name="blockSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blockSize</h4>
<pre>private final&nbsp;long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.276">blockSize</a></pre>
<div class="block">Approximate block size</div>
</li>
</ul>
<a name="acceptableFactor">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acceptableFactor</h4>
<pre>private final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.279">acceptableFactor</a></pre>
<div class="block">Acceptable size of cache (no evictions if size < acceptable)</div>
</li>
</ul>
<a name="minFactor">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>minFactor</h4>
<pre>private final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.282">minFactor</a></pre>
<div class="block">Minimum threshold of cache (when evicting, evict until size < min)</div>
</li>
</ul>
<a name="singleFactor">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>singleFactor</h4>
<pre>private final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.285">singleFactor</a></pre>
<div class="block">Single access bucket size</div>
</li>
</ul>
<a name="multiFactor">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>multiFactor</h4>
<pre>private final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.288">multiFactor</a></pre>
<div class="block">Multiple access bucket size</div>
</li>
</ul>
<a name="memoryFactor">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>memoryFactor</h4>
<pre>private final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.291">memoryFactor</a></pre>
<div class="block">In-memory bucket size</div>
</li>
</ul>
<a name="overhead">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>overhead</h4>
<pre>private final&nbsp;long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.294">overhead</a></pre>
<div class="block">Overhead of the structure itself</div>
</li>
</ul>
<a name="forceInMemory">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forceInMemory</h4>
<pre>private&nbsp;boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.297">forceInMemory</a></pre>
<div class="block">Whether in-memory hfile's data block has higher priority when evicting</div>
</li>
</ul>
<a name="victimHandler">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>victimHandler</h4>
<pre>private transient&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.304">victimHandler</a></pre>
<div class="block">Where to send victims (blocks evicted/missing from the cache). This is used only when we use an
external cache as L2.
Note: See org.apache.hadoop.hbase.io.hfile.MemcachedBlockCache</div>
</li>
</ul>
<a name="cacheDataBlockPercent">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheDataBlockPercent</h4>
<pre>private volatile&nbsp;int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.307">cacheDataBlockPercent</a></pre>
<div class="block">Percent of cached data blocks</div>
</li>
</ul>
<a name="heavyEvictionCountLimit">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>heavyEvictionCountLimit</h4>
<pre>private final&nbsp;int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.310">heavyEvictionCountLimit</a></pre>
<div class="block">Limit of count eviction process when start to avoid to cache blocks</div>
</li>
</ul>
<a name="heavyEvictionMbSizeLimit">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>heavyEvictionMbSizeLimit</h4>
<pre>private final&nbsp;long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.313">heavyEvictionMbSizeLimit</a></pre>
<div class="block">Limit of volume eviction process when start to avoid to cache blocks</div>
</li>
</ul>
<a name="heavyEvictionOverheadCoefficient">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>heavyEvictionOverheadCoefficient</h4>
<pre>private final&nbsp;float <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.316">heavyEvictionOverheadCoefficient</a></pre>
<div class="block">Adjust auto-scaling via overhead of evition rate</div>
</li>
</ul>
<a name="CACHE_FIXED_OVERHEAD">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CACHE_FIXED_OVERHEAD</h4>
<pre>public static final&nbsp;long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1252">CACHE_FIXED_OVERHEAD</a></pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="LruAdaptiveBlockCache-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LruAdaptiveBlockCache</h4>
<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.328">LruAdaptiveBlockCache</a>(long&nbsp;maxSize,
long&nbsp;blockSize)</pre>
<div class="block">Default constructor. Specify maximum size and expected average block
size (approximation is fine).
<p>All other factors will be calculated based on defaults specified in
this class.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxSize</code> - maximum size of cache, in bytes</dd>
<dd><code>blockSize</code> - approximate size of each block, in bytes</dd>
</dl>
</li>
</ul>
<a name="LruAdaptiveBlockCache-long-long-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LruAdaptiveBlockCache</h4>
<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.335">LruAdaptiveBlockCache</a>(long&nbsp;maxSize,
long&nbsp;blockSize,
boolean&nbsp;evictionThread)</pre>
<div class="block">Constructor used for testing. Allows disabling of the eviction thread.</div>
</li>
</ul>
<a name="LruAdaptiveBlockCache-long-long-boolean-org.apache.hadoop.conf.Configuration-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LruAdaptiveBlockCache</h4>
<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.351">LruAdaptiveBlockCache</a>(long&nbsp;maxSize,
long&nbsp;blockSize,
boolean&nbsp;evictionThread,
org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
</li>
</ul>
<a name="LruAdaptiveBlockCache-long-long-org.apache.hadoop.conf.Configuration-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LruAdaptiveBlockCache</h4>
<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.374">LruAdaptiveBlockCache</a>(long&nbsp;maxSize,
long&nbsp;blockSize,
org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
</li>
</ul>
<a name="LruAdaptiveBlockCache-long-long-boolean-int-float-int-float-float-float-float-float-float-boolean-long-int-long-float-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>LruAdaptiveBlockCache</h4>
<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.399">LruAdaptiveBlockCache</a>(long&nbsp;maxSize,
long&nbsp;blockSize,
boolean&nbsp;evictionThread,
int&nbsp;mapInitialSize,
float&nbsp;mapLoadFactor,
int&nbsp;mapConcurrencyLevel,
float&nbsp;minFactor,
float&nbsp;acceptableFactor,
float&nbsp;singleFactor,
float&nbsp;multiFactor,
float&nbsp;memoryFactor,
float&nbsp;hardLimitFactor,
boolean&nbsp;forceInMemory,
long&nbsp;maxBlockSize,
int&nbsp;heavyEvictionCountLimit,
long&nbsp;heavyEvictionMbSizeLimit,
float&nbsp;heavyEvictionOverheadCoefficient)</pre>
<div class="block">Configurable constructor. Use this constructor if not using defaults.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxSize</code> - maximum size of this cache, in bytes</dd>
<dd><code>blockSize</code> - expected average size of blocks, in bytes</dd>
<dd><code>evictionThread</code> - whether to run evictions in a bg thread or not</dd>
<dd><code>mapInitialSize</code> - initial size of backing ConcurrentHashMap</dd>
<dd><code>mapLoadFactor</code> - initial load factor of backing ConcurrentHashMap</dd>
<dd><code>mapConcurrencyLevel</code> - initial concurrency factor for backing CHM</dd>
<dd><code>minFactor</code> - percentage of total size that eviction will evict until</dd>
<dd><code>acceptableFactor</code> - percentage of total size that triggers eviction</dd>
<dd><code>singleFactor</code> - percentage of total size for single-access blocks</dd>
<dd><code>multiFactor</code> - percentage of total size for multiple-access blocks</dd>
<dd><code>memoryFactor</code> - percentage of total size for in-memory blocks</dd>
<dd><code>hardLimitFactor</code> - hard capacity limit</dd>
<dd><code>forceInMemory</code> - in-memory hfile's data block has higher priority when evicting</dd>
<dd><code>maxBlockSize</code> - maximum block size for caching</dd>
<dd><code>heavyEvictionCountLimit</code> - when starts AdaptiveLRU algoritm work</dd>
<dd><code>heavyEvictionMbSizeLimit</code> - how many bytes desirable putting into BlockCache</dd>
<dd><code>heavyEvictionOverheadCoefficient</code> - how aggressive AdaptiveLRU will reduce GC</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setVictimCache-org.apache.hadoop.hbase.io.hfile.BlockCache-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setVictimCache</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.457">setVictimCache</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a>&nbsp;victimCache)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/FirstLevelBlockCache.html#setVictimCache-org.apache.hadoop.hbase.io.hfile.BlockCache-">FirstLevelBlockCache</a></code></span></div>
<div class="block">Specifies the secondary cache. An entry that is evicted from this cache due to a size
constraint will be inserted into the victim cache.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/FirstLevelBlockCache.html#setVictimCache-org.apache.hadoop.hbase.io.hfile.BlockCache-">setVictimCache</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/FirstLevelBlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">FirstLevelBlockCache</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>victimCache</code> - the second level cache</dd>
</dl>
</li>
</ul>
<a name="setMaxSize-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxSize</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.465">setMaxSize</a>(long&nbsp;maxSize)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/ResizableBlockCache.html#setMaxSize-long-">ResizableBlockCache</a></code></span></div>
<div class="block">Sets the max heap size that can be used by the BlockCache.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/ResizableBlockCache.html#setMaxSize-long-">setMaxSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/ResizableBlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">ResizableBlockCache</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxSize</code> - The max heap size.</dd>
</dl>
</li>
</ul>
<a name="getCacheDataBlockPercent--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCacheDataBlockPercent</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.472">getCacheDataBlockPercent</a>()</pre>
</li>
</ul>
<a name="asReferencedHeapBlock-org.apache.hadoop.hbase.io.hfile.Cacheable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asReferencedHeapBlock</h4>
<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.491">asReferencedHeapBlock</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;buf)</pre>
<div class="block">The block cached in LruAdaptiveBlockCache will always be an heap block: on the one side,
the heap access will be more faster then off-heap, the small index block or meta block
cached in CombinedBlockCache will benefit a lot. on other side, the LruAdaptiveBlockCache
size is always calculated based on the total heap size, if caching an off-heap block in
LruAdaptiveBlockCache, the heap size will be messed up. Here we will clone the block into an
heap block if it's an off-heap block, otherwise just use the original block. The key point is
maintain the refCnt of the block (HBASE-22127): <br>
1. if cache the cloned heap block, its refCnt is an totally new one, it's easy to handle; <br>
2. if cache the original heap block, we're sure that it won't be tracked in ByteBuffAllocator's
reservoir, if both RPC and LruAdaptiveBlockCache release the block, then it can be garbage
collected by JVM, so need a retain here.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buf</code> - the original block</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an block with an heap memory backend.</dd>
</dl>
</li>
</ul>
<a name="cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheBlock</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.516">cacheBlock</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;buf,
boolean&nbsp;inMemory)</pre>
<div class="block">Cache the block with the specified name and buffer.
<p>
It is assumed this will NOT be called on an already cached block. In rare cases (HBASE-8547)
this can happen, for which we compare the buffer contents.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-boolean-">cacheBlock</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - block's cache key</dd>
<dd><code>buf</code> - block buffer</dd>
<dd><code>inMemory</code> - if block is in-memory</dd>
</dl>
</li>
</ul>
<a name="assertCounterSanity-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assertCounterSanity</h4>
<pre>private static&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.587">assertCounterSanity</a>(long&nbsp;mapSize,
long&nbsp;counterVal)</pre>
<div class="block">Sanity-checking for parity between actual block cache content and metrics.
Intended only for use with TRACE level logging and -ea JVM.</div>
</li>
</ul>
<a name="cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheBlock</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.613">cacheBlock</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;buf)</pre>
<div class="block">Cache the block with the specified name and buffer.
<p>
TODO after HBASE-22005, we may cache an block which allocated from off-heap, but our LRU cache
sizing is based on heap size, so we should handle this in HBASE-22127. It will introduce an
switch whether make the LRU on-heap or not, if so we may need copy the memory to on-heap,
otherwise the caching size is based on off-heap.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-">cacheBlock</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - block's cache key</dd>
<dd><code>buf</code> - block buffer</dd>
</dl>
</li>
</ul>
<a name="updateSizeMetrics-org.apache.hadoop.hbase.io.hfile.LruCachedBlock-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateSizeMetrics</h4>
<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.622">updateSizeMetrics</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruCachedBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">LruCachedBlock</a>&nbsp;cb,
boolean&nbsp;evict)</pre>
<div class="block">Helper function that updates the local size counter and also updates any
per-cf or per-blocktype metrics it can discern from given
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruCachedBlock.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>LruCachedBlock</code></a></div>
</li>
</ul>
<a name="getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBlock</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.647">getBlock</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
boolean&nbsp;caching,
boolean&nbsp;repeat,
boolean&nbsp;updateCacheMetrics)</pre>
<div class="block">Get the buffer of the block with the specified name.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-">getBlock</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - block's cache key</dd>
<dd><code>caching</code> - true if the caller caches blocks on cache misses</dd>
<dd><code>repeat</code> - Whether this is a repeat lookup for the same block
(used to avoid double counting cache misses when doing double-check
locking)</dd>
<dd><code>updateCacheMetrics</code> - Whether to update cache metrics or not</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>buffer of specified cache key, or null if not in cache</dd>
</dl>
</li>
</ul>
<a name="containsBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsBlock</h4>
<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.690">containsBlock</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey)</pre>
<div class="block">Whether the cache contains block with specified cacheKey</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/FirstLevelBlockCache.html#containsBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">containsBlock</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/FirstLevelBlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">FirstLevelBlockCache</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - cache key for the block</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if contains the block</dd>
</dl>
</li>
</ul>
<a name="evictBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evictBlock</h4>
<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.695">evictBlock</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#evictBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">BlockCache</a></code></span></div>
<div class="block">Evict block from cache.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#evictBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">evictBlock</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - Block to evict</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if block existed and was evicted, false if not</dd>
</dl>
</li>
</ul>
<a name="evictBlocksByHfileName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evictBlocksByHfileName</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.711">evictBlocksByHfileName</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;hfileName)</pre>
<div class="block">Evicts all blocks for a specific HFile. This is an
expensive operation implemented as a linear-time search through all blocks
in the cache. Ideally this should be a search in a log-access-time map.
<p>
This is used for evict-on-close to remove all blocks of a specific HFile.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#evictBlocksByHfileName-java.lang.String-">evictBlocksByHfileName</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of blocks evicted</dd>
</dl>
</li>
</ul>
<a name="evictBlock-org.apache.hadoop.hbase.io.hfile.LruCachedBlock-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evictBlock</h4>
<pre>protected&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.728">evictBlock</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruCachedBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">LruCachedBlock</a>&nbsp;block,
boolean&nbsp;evictedByEvictionProcess)</pre>
<div class="block">Evict the block, and it will be cached by the victim handler if exists &amp;&amp;
block may be read again later</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>evictedByEvictionProcess</code> - true if the given block is evicted by
EvictionThread</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the heap size of evicted block</dd>
</dl>
</li>
</ul>
<a name="runEviction--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runEviction</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.760">runEviction</a>()</pre>
<div class="block">Multi-threaded call to run the eviction process.</div>
</li>
</ul>
<a name="isEvictionInProgress--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEvictionInProgress</h4>
<pre>boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.768">isEvictionInProgress</a>()</pre>
</li>
</ul>
<a name="getOverhead--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOverhead</h4>
<pre>long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.772">getOverhead</a>()</pre>
</li>
</ul>
<a name="evict--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evict</h4>
<pre>long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.784">evict</a>()</pre>
<div class="block">Eviction method.
Evict items in order of use, allowing delete items
which haven't been used for the longest amount of time.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>how many bytes were freed</dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.913">toString</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="getMaxSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxSize</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1015">getMaxSize</a>()</pre>
<div class="block">Get the maximum size of this cache.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getMaxSize--">getMaxSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>max size in bytes</dd>
</dl>
</li>
</ul>
<a name="getCurrentSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentSize</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1020">getCurrentSize</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getCurrentSize--">BlockCache</a></code></span></div>
<div class="block">Returns the occupied size of the block cache, in bytes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getCurrentSize--">getCurrentSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>occupied space in cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getCurrentDataSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentDataSize</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1025">getCurrentDataSize</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getCurrentDataSize--">BlockCache</a></code></span></div>
<div class="block">Returns the occupied size of data blocks, in bytes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getCurrentDataSize--">getCurrentDataSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>occupied space in cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getFreeSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFreeSize</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1030">getFreeSize</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getFreeSize--">BlockCache</a></code></span></div>
<div class="block">Returns the free size of the block cache, in bytes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getFreeSize--">getFreeSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>free space in cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="size--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1035">size</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#size--">BlockCache</a></code></span></div>
<div class="block">Returns the total size of the block cache, in bytes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#size--">size</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>size of cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getBlockCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBlockCount</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1040">getBlockCount</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getBlockCount--">BlockCache</a></code></span></div>
<div class="block">Returns the number of blocks currently cached in the block cache.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getBlockCount--">getBlockCount</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of blocks in the cache</dd>
</dl>
</li>
</ul>
<a name="getDataBlockCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDataBlockCount</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1045">getDataBlockCount</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getDataBlockCount--">BlockCache</a></code></span></div>
<div class="block">Returns the number of data blocks currently cached in the block cache.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getDataBlockCount--">getDataBlockCount</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of blocks in the cache</dd>
</dl>
</li>
</ul>
<a name="getEvictionThread--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEvictionThread</h4>
<pre><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.EvictionThread.html" title="class in org.apache.hadoop.hbase.io.hfile">LruAdaptiveBlockCache.EvictionThread</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1049">getEvictionThread</a>()</pre>
</li>
</ul>
<a name="logStats--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logStats</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1220">logStats</a>()</pre>
</li>
</ul>
<a name="getStats--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStats</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheStats.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheStats</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1248">getStats</a>()</pre>
<div class="block">Get counter statistics for this cache.
<p>Includes: total accesses, hits, misses, evicted blocks, and runs
of the eviction processes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getStats--">getStats</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Stats</dd>
</dl>
</li>
</ul>
<a name="heapSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>heapSize</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1256">heapSize</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/HeapSize.html#heapSize--">heapSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/HeapSize.html" title="interface in org.apache.hadoop.hbase.io">HeapSize</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Approximate 'exclusive deep size' of implementing object. Includes
count of payload and hosting object sizings.</dd>
</dl>
</li>
</ul>
<a name="calculateOverhead-long-long-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>calculateOverhead</h4>
<pre>private static&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1260">calculateOverhead</a>(long&nbsp;maxSize,
long&nbsp;blockSize,
int&nbsp;concurrency)</pre>
</li>
</ul>
<a name="iterator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CachedBlock.html" title="interface in org.apache.hadoop.hbase.io.hfile">CachedBlock</a>&gt;&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1268">iterator</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true#iterator--" title="class or interface in java.lang">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CachedBlock.html" title="interface in org.apache.hadoop.hbase.io.hfile">CachedBlock</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#iterator--">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Iterator over the blocks in the cache.</dd>
</dl>
</li>
</ul>
<a name="acceptableSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acceptableSize</h4>
<pre>long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1360">acceptableSize</a>()</pre>
</li>
</ul>
<a name="minSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>minSize</h4>
<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1363">minSize</a>()</pre>
</li>
</ul>
<a name="singleSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>singleSize</h4>
<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1366">singleSize</a>()</pre>
</li>
</ul>
<a name="multiSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>multiSize</h4>
<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1369">multiSize</a>()</pre>
</li>
</ul>
<a name="memorySize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>memorySize</h4>
<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1372">memorySize</a>()</pre>
</li>
</ul>
<a name="shutdown--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shutdown</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1377">shutdown</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#shutdown--">BlockCache</a></code></span></div>
<div class="block">Shutdown the cache.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#shutdown--">shutdown</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
</dl>
</li>
</ul>
<a name="clearCache--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clearCache</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1402">clearCache</a>()</pre>
<div class="block">Clears the cache. Used in tests.</div>
</li>
</ul>
<a name="getEncodingCountsForTest--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEncodingCountsForTest</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/io/encoding/DataBlockEncoding.html" title="enum in org.apache.hadoop.hbase.io.encoding">DataBlockEncoding</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&gt;&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1407">getEncodingCountsForTest</a>()</pre>
</li>
</ul>
<a name="getMapForTests--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMapForTests</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>,<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruCachedBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">LruCachedBlock</a>&gt;&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1417">getMapForTests</a>()</pre>
</li>
</ul>
<a name="getBlockCaches--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getBlockCaches</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a>[]&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html#line.1422">getBlockCaches</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getBlockCaches--">getBlockCaches</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The list of sub blockcaches that make up this one; returns null if no sub caches.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/LruAdaptiveBlockCache.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InvalidHFileException.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.BlockBucket.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html" target="_top">Frames</a></li>
<li><a href="LruAdaptiveBlockCache.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2007&#x2013;2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>