blob: a9c031d6386217ddaa70f0da6f8eb411fad97c99 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>HFileBlockIndex.BlockIndexReader (Apache HBase 4.0.0-alpha-1-SNAPSHOT API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.hadoop.hbase.io.hfile, class: HFileBlockIndex, class: BlockIndexReader">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/HFileBlockIndex.BlockIndexReader.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#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&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="sub-nav-list">
<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>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.hadoop.hbase.io.hfile</a></div>
<h1 title="Class HFileBlockIndex.BlockIndexReader" class="title">Class HFileBlockIndex.BlockIndexReader</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">org.apache.hadoop.hbase.io.hfile.HFileBlockIndex.BlockIndexReader</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="../HeapSize.html" title="interface in org.apache.hadoop.hbase.io">HeapSize</a></code></dd>
</dl>
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="HFileBlockIndex.ByteArrayKeyBlockIndexReader.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.ByteArrayKeyBlockIndexReader</a></code>, <code><a href="HFileBlockIndex.CellBasedKeyBlockIndexReader.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.CellBasedKeyBlockIndexReader</a></code></dd>
</dl>
<dl class="notes">
<dt>Enclosing class:</dt>
<dd><a href="HFileBlockIndex.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex</a></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">abstract static class </span><span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.html#line-567">HFileBlockIndex.BlockIndexReader</a></span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
implements <a href="../HeapSize.html" title="interface in org.apache.hadoop.hbase.io">HeapSize</a></span></div>
<div class="block">The reader will always hold the root level index in the memory. Index blocks at all other
levels will be cached in the LRU cache in practice, although this API does not enforce that.
<p>
All non-root (leaf and intermediate) index blocks contain what we call a "secondary index": an
array of offsets to the entries within the block. This allows us to do binary search for the
entry corresponding to the given key without having to deserialize the block.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected int[]</code></div>
<div class="col-second even-row-color"><code><a href="#blockDataSizes" class="member-name-link">blockDataSizes</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>protected long[]</code></div>
<div class="col-second odd-row-color"><code><a href="#blockOffsets" class="member-name-link">blockOffsets</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>protected int</code></div>
<div class="col-second even-row-color"><code><a href="#midKeyEntry" class="member-name-link">midKeyEntry</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>protected long</code></div>
<div class="col-second odd-row-color"><code><a href="#midLeafBlockOffset" class="member-name-link">midLeafBlockOffset</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>protected int</code></div>
<div class="col-second even-row-color"><code><a href="#midLeafBlockOnDiskSize" class="member-name-link">midLeafBlockOnDiskSize</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>protected int</code></div>
<div class="col-second odd-row-color"><code><a href="#rootCount" class="member-name-link">rootCount</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>protected int</code></div>
<div class="col-second even-row-color"><code><a href="#searchTreeLevel" class="member-name-link">searchTreeLevel</a></code></div>
<div class="col-last even-row-color">
<div class="block">The number of levels in the block index tree.</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">BlockIndexReader</a>()</code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>protected abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#add(byte%5B%5D,long,int)" class="member-name-link">add</a><wbr>(byte[]&nbsp;key,
long&nbsp;offset,
int&nbsp;dataSize)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>(package private) static int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#binarySearchNonRootIndex(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.nio.ByteBuff,org.apache.hadoop.hbase.CellComparator)" class="member-name-link">binarySearchNonRootIndex</a><wbr>(<a href="../../Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;key,
<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;nonRootIndex,
<a href="../../CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a>&nbsp;comparator)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Performs a binary search over a non-root level index block.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>protected abstract long</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#calculateHeapSizeForBlockKeys(long)" class="member-name-link">calculateHeapSizeForBlockKeys</a><wbr>(long&nbsp;heapSize)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#ensureNonEmpty()" class="member-name-link">ensureNonEmpty</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Verifies that the block index is non-empty and throws an <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link"><code>IllegalStateException</code></a>
otherwise.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>(package private) static byte[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getNonRootIndexedKey(org.apache.hadoop.hbase.nio.ByteBuff,int)" class="member-name-link">getNonRootIndexedKey</a><wbr>(<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;nonRootIndex,
int&nbsp;i)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">The indexed key at the ith position in the nonRootIndex.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRootBlockCount()" class="member-name-link">getRootBlockCount</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the number of root-level blocks in this block index</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRootBlockDataSize(int)" class="member-name-link">getRootBlockDataSize</a><wbr>(int&nbsp;i)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>long</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRootBlockOffset(int)" class="member-name-link">getRootBlockOffset</a><wbr>(int&nbsp;i)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>long</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#heapSize()" class="member-name-link">heapSize</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Return the approximate 'exclusive deep size' of implementing object.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>protected abstract void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#initialize(int)" class="member-name-link">initialize</a><wbr>(int&nbsp;numEntries)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isEmpty()" class="member-name-link">isEmpty</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns true if the block index is empty.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <a href="BlockWithScanInfo.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockWithScanInfo</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#loadDataBlockWithScanInfo(org.apache.hadoop.hbase.ExtendedCell,org.apache.hadoop.hbase.io.hfile.HFileBlock,boolean,boolean,boolean,org.apache.hadoop.hbase.io.encoding.DataBlockEncoding,org.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader)" class="member-name-link">loadDataBlockWithScanInfo</a><wbr>(<a href="../../ExtendedCell.html" title="interface in org.apache.hadoop.hbase">ExtendedCell</a>&nbsp;key,
<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;currentBlock,
boolean&nbsp;cacheBlocks,
boolean&nbsp;pread,
boolean&nbsp;isCompaction,
<a href="../encoding/DataBlockEncoding.html" title="enum class in org.apache.hadoop.hbase.io.encoding">DataBlockEncoding</a>&nbsp;expectedDataBlockEncoding,
<a href="HFile.CachingBlockReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.CachingBlockReader</a>&nbsp;cachingBlockReader)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Return the BlockWithScanInfo, a data structure which contains the Data HFileBlock with other
scan info such as the key that starts the next HFileBlock.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>(package private) static int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#locateNonRootIndexEntry(org.apache.hadoop.hbase.nio.ByteBuff,org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.CellComparator)" class="member-name-link">locateNonRootIndexEntry</a><wbr>(<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;nonRootBlock,
<a href="../../Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;key,
<a href="../../CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a>&nbsp;comparator)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Search for one key using the secondary index in a non-root block.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <a href="../../Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#midkey(org.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader)" class="member-name-link">midkey</a><wbr>(<a href="HFile.CachingBlockReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.CachingBlockReader</a>&nbsp;cachingBlockReader)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">An approximation to the <a href="HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a>'s mid-key.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readMultiLevelIndexRoot(org.apache.hadoop.hbase.io.hfile.HFileBlock,int)" class="member-name-link">readMultiLevelIndexRoot</a><wbr>(<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;blk,
int&nbsp;numEntries)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Read the root-level metadata of a multi-level block index.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readRootIndex(java.io.DataInput,int)" class="member-name-link">readRootIndex</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/DataInput.html" title="class or interface in java.io" class="external-link">DataInput</a>&nbsp;in,
int&nbsp;numEntries)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Read in the root-level index from the given input stream.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/DataInputStream.html" title="class or interface in java.io" class="external-link">DataInputStream</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#readRootIndex(org.apache.hadoop.hbase.io.hfile.HFileBlock,int)" class="member-name-link">readRootIndex</a><wbr>(<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;blk,
int&nbsp;numEntries)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Read in the root-level index from the given input stream.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#rootBlockContainingKey(byte%5B%5D,int,int)" class="member-name-link">rootBlockContainingKey</a><wbr>(byte[]&nbsp;key,
int&nbsp;offset,
int&nbsp;length)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Finds the root-level index block containing the given key.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#rootBlockContainingKey(byte%5B%5D,int,int,org.apache.hadoop.hbase.CellComparator)" class="member-name-link">rootBlockContainingKey</a><wbr>(byte[]&nbsp;key,
int&nbsp;offset,
int&nbsp;length,
<a href="../../CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a>&nbsp;comp)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Finds the root-level index block containing the given key.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#rootBlockContainingKey(org.apache.hadoop.hbase.Cell)" class="member-name-link">rootBlockContainingKey</a><wbr>(<a href="../../Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;key)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Finds the root-level index block containing the given key.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#seekToDataBlock(org.apache.hadoop.hbase.ExtendedCell,org.apache.hadoop.hbase.io.hfile.HFileBlock,boolean,boolean,boolean,org.apache.hadoop.hbase.io.encoding.DataBlockEncoding,org.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader)" class="member-name-link">seekToDataBlock</a><wbr>(<a href="../../ExtendedCell.html" title="interface in org.apache.hadoop.hbase">ExtendedCell</a>&nbsp;key,
<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;currentBlock,
boolean&nbsp;cacheBlocks,
boolean&nbsp;pread,
boolean&nbsp;isCompaction,
<a href="../encoding/DataBlockEncoding.html" title="enum class in org.apache.hadoop.hbase.io.encoding">DataBlockEncoding</a>&nbsp;expectedDataBlockEncoding,
<a href="HFile.CachingBlockReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.CachingBlockReader</a>&nbsp;cachingBlockReader)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Return the data block which contains this key.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="blockOffsets">
<h3>blockOffsets</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">long[]</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-569">blockOffsets</a></span></div>
</section>
</li>
<li>
<section class="detail" id="blockDataSizes">
<h3>blockDataSizes</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">int[]</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-570">blockDataSizes</a></span></div>
</section>
</li>
<li>
<section class="detail" id="rootCount">
<h3>rootCount</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-571">rootCount</a></span></div>
</section>
</li>
<li>
<section class="detail" id="midLeafBlockOffset">
<h3>midLeafBlockOffset</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-574">midLeafBlockOffset</a></span></div>
</section>
</li>
<li>
<section class="detail" id="midLeafBlockOnDiskSize">
<h3>midLeafBlockOnDiskSize</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-575">midLeafBlockOnDiskSize</a></span></div>
</section>
</li>
<li>
<section class="detail" id="midKeyEntry">
<h3>midKeyEntry</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-576">midKeyEntry</a></span></div>
</section>
</li>
<li>
<section class="detail" id="searchTreeLevel">
<h3>searchTreeLevel</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-582">searchTreeLevel</a></span></div>
<div class="block">The number of levels in the block index tree. One if there is only root level, two for root
and leaf levels, etc.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>BlockIndexReader</h3>
<div class="member-signature"><span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-567">BlockIndexReader</a></span>()</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="isEmpty()">
<h3>isEmpty</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-585">isEmpty</a></span>()</div>
<div class="block">Returns true if the block index is empty.</div>
</section>
</li>
<li>
<section class="detail" id="ensureNonEmpty()">
<h3>ensureNonEmpty</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-591">ensureNonEmpty</a></span>()</div>
<div class="block">Verifies that the block index is non-empty and throws an <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link"><code>IllegalStateException</code></a>
otherwise.</div>
</section>
</li>
<li>
<section class="detail" id="seekToDataBlock(org.apache.hadoop.hbase.ExtendedCell,org.apache.hadoop.hbase.io.hfile.HFileBlock,boolean,boolean,boolean,org.apache.hadoop.hbase.io.encoding.DataBlockEncoding,org.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader)">
<h3>seekToDataBlock</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-607">seekToDataBlock</a></span><wbr><span class="parameters">(<a href="../../ExtendedCell.html" title="interface in org.apache.hadoop.hbase">ExtendedCell</a>&nbsp;key,
<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;currentBlock,
boolean&nbsp;cacheBlocks,
boolean&nbsp;pread,
boolean&nbsp;isCompaction,
<a href="../encoding/DataBlockEncoding.html" title="enum class in org.apache.hadoop.hbase.io.encoding">DataBlockEncoding</a>&nbsp;expectedDataBlockEncoding,
<a href="HFile.CachingBlockReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.CachingBlockReader</a>&nbsp;cachingBlockReader)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Return the data block which contains this key. This function will only be called when the
HFile version is larger than 1.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>key</code> - the key we are looking for</dd>
<dd><code>currentBlock</code> - the current block, to avoid re-reading the same block</dd>
<dd><code>expectedDataBlockEncoding</code> - the data block encoding the caller is expecting the data
block to be in, or null to not perform this check and return
the block irrespective of the encoding</dd>
<dt>Returns:</dt>
<dd>reader a basic way to load blocks</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="loadDataBlockWithScanInfo(org.apache.hadoop.hbase.ExtendedCell,org.apache.hadoop.hbase.io.hfile.HFileBlock,boolean,boolean,boolean,org.apache.hadoop.hbase.io.encoding.DataBlockEncoding,org.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader)">
<h3>loadDataBlockWithScanInfo</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type"><a href="BlockWithScanInfo.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockWithScanInfo</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-632">loadDataBlockWithScanInfo</a></span><wbr><span class="parameters">(<a href="../../ExtendedCell.html" title="interface in org.apache.hadoop.hbase">ExtendedCell</a>&nbsp;key,
<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;currentBlock,
boolean&nbsp;cacheBlocks,
boolean&nbsp;pread,
boolean&nbsp;isCompaction,
<a href="../encoding/DataBlockEncoding.html" title="enum class in org.apache.hadoop.hbase.io.encoding">DataBlockEncoding</a>&nbsp;expectedDataBlockEncoding,
<a href="HFile.CachingBlockReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.CachingBlockReader</a>&nbsp;cachingBlockReader)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Return the BlockWithScanInfo, a data structure which contains the Data HFileBlock with other
scan info such as the key that starts the next HFileBlock. This function will only be called
when the HFile version is larger than 1.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>key</code> - the key we are looking for</dd>
<dd><code>currentBlock</code> - the current block, to avoid re-reading the same block</dd>
<dd><code>expectedDataBlockEncoding</code> - the data block encoding the caller is expecting the data
block to be in, or null to not perform this check and return
the block irrespective of the encoding.</dd>
<dt>Returns:</dt>
<dd>the BlockWithScanInfo which contains the DataBlock with other scan info such as
nextIndexedKey.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="midkey(org.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader)">
<h3>midkey</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type"><a href="../../Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-642">midkey</a></span><wbr><span class="parameters">(<a href="HFile.CachingBlockReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.CachingBlockReader</a>&nbsp;cachingBlockReader)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">An approximation to the <a href="HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a>'s mid-key. Operates on block boundaries, and does not
go inside blocks. In other words, returns the first key of the middle block of the file.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the first key of the middle block</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getRootBlockOffset(int)">
<h3>getRootBlockOffset</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-647">getRootBlockOffset</a></span><wbr><span class="parameters">(int&nbsp;i)</span></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>i</code> - from 0 to <a href="#getRootBlockCount()"><code>- 1</code></a></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getRootBlockDataSize(int)">
<h3>getRootBlockDataSize</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-656">getRootBlockDataSize</a></span><wbr><span class="parameters">(int&nbsp;i)</span></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>i</code> - zero-based index of a root-level block</dd>
<dt>Returns:</dt>
<dd>the on-disk size of the root-level block for version 2, or the uncompressed size for
version 1</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getRootBlockCount()">
<h3>getRootBlockCount</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-661">getRootBlockCount</a></span>()</div>
<div class="block">Returns the number of root-level blocks in this block index</div>
</section>
</li>
<li>
<section class="detail" id="rootBlockContainingKey(byte[],int,int,org.apache.hadoop.hbase.CellComparator)">
<h3>rootBlockContainingKey</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-674">rootBlockContainingKey</a></span><wbr><span class="parameters">(byte[]&nbsp;key,
int&nbsp;offset,
int&nbsp;length,
<a href="../../CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a>&nbsp;comp)</span></div>
<div class="block">Finds the root-level index block containing the given key. Key to find the comparator to be
used</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Offset of block containing <code>key</code> (between 0 and the number of blocks - 1)
or -1 if this file does not contain the request.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="rootBlockContainingKey(byte[],int,int)">
<h3>rootBlockContainingKey</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-686">rootBlockContainingKey</a></span><wbr><span class="parameters">(byte[]&nbsp;key,
int&nbsp;offset,
int&nbsp;length)</span></div>
<div class="block">Finds the root-level index block containing the given key. Key to find</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Offset of block containing <code>key</code> (between 0 and the number of blocks - 1)
or -1 if this file does not contain the request.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="rootBlockContainingKey(org.apache.hadoop.hbase.Cell)">
<h3>rootBlockContainingKey</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-693">rootBlockContainingKey</a></span><wbr><span class="parameters">(<a href="../../Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;key)</span></div>
<div class="block">Finds the root-level index block containing the given key. Key to find</div>
</section>
</li>
<li>
<section class="detail" id="getNonRootIndexedKey(org.apache.hadoop.hbase.nio.ByteBuff,int)">
<h3>getNonRootIndexedKey</h3>
<div class="member-signature"><span class="modifiers">static</span>&nbsp;<span class="return-type">byte[]</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-700">getNonRootIndexedKey</a></span><wbr><span class="parameters">(<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;nonRootIndex,
int&nbsp;i)</span></div>
<div class="block">The indexed key at the ith position in the nonRootIndex. The position starts at 0.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>i</code> - the ith position</dd>
<dt>Returns:</dt>
<dd>The indexed key at the ith position in the nonRootIndex.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="binarySearchNonRootIndex(org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.nio.ByteBuff,org.apache.hadoop.hbase.CellComparator)">
<h3>binarySearchNonRootIndex</h3>
<div class="member-signature"><span class="modifiers">static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-735">binarySearchNonRootIndex</a></span><wbr><span class="parameters">(<a href="../../Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;key,
<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;nonRootIndex,
<a href="../../CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a>&nbsp;comparator)</span></div>
<div class="block">Performs a binary search over a non-root level index block. Utilizes the secondary index,
which records the offsets of (offset, onDiskSize, firstKey) tuples of all entries. the key we
are searching for offsets to individual entries in the blockIndex buffer the non-root index
block buffer, starting with the secondary index. The position is ignored.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the index i in [0, numEntries - 1] such that keys[i] &lt;= key &lt; keys[i + 1], if keys is
the array of all keys being searched, or -1 otherwise</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="locateNonRootIndexEntry(org.apache.hadoop.hbase.nio.ByteBuff,org.apache.hadoop.hbase.Cell,org.apache.hadoop.hbase.CellComparator)">
<h3>locateNonRootIndexEntry</h3>
<div class="member-signature"><span class="modifiers">static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-815">locateNonRootIndexEntry</a></span><wbr><span class="parameters">(<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;nonRootBlock,
<a href="../../Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;key,
<a href="../../CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a>&nbsp;comparator)</span></div>
<div class="block">Search for one key using the secondary index in a non-root block. In case of success,
positions the provided buffer at the entry of interest, where the file offset and the
on-disk-size can be read. a non-root block without header. Initial position does not matter.
the byte array containing the key</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the index position where the given key was found, otherwise return -1 in the case the
given key is before the first key.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="readRootIndex(java.io.DataInput,int)">
<h3>readRootIndex</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-841">readRootIndex</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/DataInput.html" title="class or interface in java.io" class="external-link">DataInput</a>&nbsp;in,
int&nbsp;numEntries)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Read in the root-level index from the given input stream. Must match what was written into
the root level by <a href="HFileBlockIndex.BlockIndexWriter.html#writeIndexBlocks(org.apache.hadoop.fs.FSDataOutputStream)"><code>HFileBlockIndex.BlockIndexWriter.writeIndexBlocks(FSDataOutputStream)</code></a> at the offset
that function returned.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>in</code> - the buffered input stream or wrapped byte input stream</dd>
<dd><code>numEntries</code> - the number of root-level index entries</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="initialize(int)">
<h3>initialize</h3>
<div class="member-signature"><span class="modifiers">protected abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-857">initialize</a></span><wbr><span class="parameters">(int&nbsp;numEntries)</span></div>
</section>
</li>
<li>
<section class="detail" id="add(byte[],long,int)">
<h3>add</h3>
<div class="member-signature"><span class="modifiers">protected abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-859">add</a></span><wbr><span class="parameters">(byte[]&nbsp;key,
long&nbsp;offset,
int&nbsp;dataSize)</span></div>
</section>
</li>
<li>
<section class="detail" id="readRootIndex(org.apache.hadoop.hbase.io.hfile.HFileBlock,int)">
<h3>readRootIndex</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/DataInputStream.html" title="class or interface in java.io" class="external-link">DataInputStream</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-869">readRootIndex</a></span><wbr><span class="parameters">(<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;blk,
int&nbsp;numEntries)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Read in the root-level index from the given input stream. Must match what was written into
the root level by <a href="HFileBlockIndex.BlockIndexWriter.html#writeIndexBlocks(org.apache.hadoop.fs.FSDataOutputStream)"><code>HFileBlockIndex.BlockIndexWriter.writeIndexBlocks(FSDataOutputStream)</code></a> at the offset
that function returned.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>blk</code> - the HFile block</dd>
<dd><code>numEntries</code> - the number of root-level index entries</dd>
<dt>Returns:</dt>
<dd>the buffered input stream or wrapped byte input stream</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="readMultiLevelIndexRoot(org.apache.hadoop.hbase.io.hfile.HFileBlock,int)">
<h3>readMultiLevelIndexRoot</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-882">readMultiLevelIndexRoot</a></span><wbr><span class="parameters">(<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;blk,
int&nbsp;numEntries)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Read the root-level metadata of a multi-level block index. Based on
<a href="#readRootIndex(java.io.DataInput,int)"><code>readRootIndex(DataInput, int)</code></a>, but also reads metadata necessary to compute the
mid-key in a multi-level index.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>blk</code> - the HFile block</dd>
<dd><code>numEntries</code> - the number of root-level index entries</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="heapSize()">
<h3>heapSize</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-896">heapSize</a></span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../HeapSize.html#heapSize()">HeapSize</a></code></span></div>
<div class="block">Return the approximate 'exclusive deep size' of implementing object. Includes count of payload
and hosting object sizings.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../HeapSize.html#heapSize()">heapSize</a></code>&nbsp;in interface&nbsp;<code><a href="../HeapSize.html" title="interface in org.apache.hadoop.hbase.io">HeapSize</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="calculateHeapSizeForBlockKeys(long)">
<h3>calculateHeapSizeForBlockKeys</h3>
<div class="member-signature"><span class="modifiers">protected abstract</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html#line-918">calculateHeapSizeForBlockKeys</a></span><wbr><span class="parameters">(long&nbsp;heapSize)</span></div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2007&#x2013;2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>