| <!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>HFileBlock.FSReader (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="HFileBlock.FSReader (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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/HFileBlock.FSReader.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/HFileBlock.BlockWritable.html" title="interface in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html" target="_top">Frames</a></li> |
| <li><a href="HFileBlock.FSReader.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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="Interface HFileBlock.FSReader" class="title">Interface HFileBlock.FSReader</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReaderImpl</a></dd> |
| </dl> |
| <dl> |
| <dt>Enclosing class:</dt> |
| <dd><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>static interface <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line.1298">HFileBlock.FSReader</a></pre> |
| <div class="block">An HFile block reader with iteration ability.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== 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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </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><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.BlockIterator.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.BlockIterator</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#blockRange-long-long-">blockRange</a></span>(long startOffset, |
| long endOffset)</code> |
| <div class="block">Creates a block iterator over the given portion of the <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#closeStreams--">closeStreams</a></span>()</code> |
| <div class="block">Closes the backing streams</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/hadoop/hbase/io/encoding/HFileBlockDecodingContext.html" title="interface in org.apache.hadoop.hbase.io.encoding">HFileBlockDecodingContext</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#getBlockDecodingContext--">getBlockDecodingContext</a></span>()</code> |
| <div class="block">Get a decoder for <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockType.html#ENCODED_DATA"><code>BlockType.ENCODED_DATA</code></a> blocks from this file.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/hadoop/hbase/io/encoding/HFileBlockDecodingContext.html" title="interface in org.apache.hadoop.hbase.io.encoding">HFileBlockDecodingContext</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#getDefaultBlockDecodingContext--">getDefaultBlockDecodingContext</a></span>()</code> |
| <div class="block">Get the default decoder for blocks from this file.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#readBlockData-long-long-boolean-boolean-boolean-">readBlockData</a></span>(long offset, |
| long onDiskSize, |
| boolean pread, |
| boolean updateMetrics, |
| boolean intoHeap)</code> |
| <div class="block">Reads the block at the given offset in the file with the given on-disk size and uncompressed |
| size.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#setDataBlockEncoder-org.apache.hadoop.hbase.io.hfile.HFileDataBlockEncoder-">setDataBlockEncoder</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileDataBlockEncoder.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileDataBlockEncoder</a> encoder)</code> </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/HFileBlock.FSReader.html#setIncludesMemStoreTS-boolean-">setIncludesMemStoreTS</a></span>(boolean includesMemstoreTS)</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#unbufferStream--">unbufferStream</a></span>()</code> |
| <div class="block">To close the stream's socket.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="readBlockData-long-long-boolean-boolean-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readBlockData</h4> |
| <pre><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#line.1321">readBlockData</a>(long offset, |
| long onDiskSize, |
| boolean pread, |
| boolean updateMetrics, |
| boolean intoHeap) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Reads the block at the given offset in the file with the given on-disk size and uncompressed |
| size.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offset</code> - of the file to read</dd> |
| <dd><code>onDiskSize</code> - the on-disk size of the entire block, including all applicable headers, or |
| -1 if unknown</dd> |
| <dd><code>pread</code> - true to use pread, otherwise use the stream read.</dd> |
| <dd><code>updateMetrics</code> - update the metrics or not.</dd> |
| <dd><code>intoHeap</code> - allocate the block's ByteBuff by <a href="../../../../../../org/apache/hadoop/hbase/io/ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io"><code>ByteBuffAllocator</code></a> or JVM heap. For |
| LRUBlockCache, we must ensure that the block to cache is an heap one, because the |
| memory occupation is based on heap now, also for <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>CombinedBlockCache</code></a>, we use |
| the heap LRUBlockCache as L1 cache to cache small blocks such as IndexBlock or |
| MetaBlock for faster access. So introduce an flag here to decide whether allocate |
| from JVM heap or not so that we can avoid an extra off-heap to heap memory copy when |
| using LRUBlockCache. For most cases, we known what's the expected block type we'll |
| read, while for some special case (Example: HFileReaderImpl#readNextDataBlock()), we |
| cannot pre-decide what's the expected block type, then we can only allocate block's |
| ByteBuff from <a href="../../../../../../org/apache/hadoop/hbase/io/ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io"><code>ByteBuffAllocator</code></a> firstly, and then when caching it in |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruBlockCache.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>LruBlockCache</code></a> we'll check whether the ByteBuff is from heap or not, if not |
| then we'll clone it to an heap one and cache it.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly read block</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="blockRange-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>blockRange</h4> |
| <pre><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.BlockIterator.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.BlockIterator</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#line.1335">blockRange</a>(long startOffset, |
| long endOffset)</pre> |
| <div class="block">Creates a block iterator over the given portion of the <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a>. |
| The iterator returns blocks starting with offset such that offset <= |
| startOffset < endOffset. Returned blocks are always unpacked. |
| Used when no hfile index available; e.g. reading in the hfile index |
| blocks themselves on file open.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>startOffset</code> - the offset of the block to start iteration with</dd> |
| <dd><code>endOffset</code> - the offset to end iteration at (exclusive)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an iterator of blocks between the two given offsets</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="closeStreams--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>closeStreams</h4> |
| <pre>void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#line.1338">closeStreams</a>() |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Closes the backing streams</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getBlockDecodingContext--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getBlockDecodingContext</h4> |
| <pre><a href="../../../../../../org/apache/hadoop/hbase/io/encoding/HFileBlockDecodingContext.html" title="interface in org.apache.hadoop.hbase.io.encoding">HFileBlockDecodingContext</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#line.1341">getBlockDecodingContext</a>()</pre> |
| <div class="block">Get a decoder for <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockType.html#ENCODED_DATA"><code>BlockType.ENCODED_DATA</code></a> blocks from this file.</div> |
| </li> |
| </ul> |
| <a name="getDefaultBlockDecodingContext--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDefaultBlockDecodingContext</h4> |
| <pre><a href="../../../../../../org/apache/hadoop/hbase/io/encoding/HFileBlockDecodingContext.html" title="interface in org.apache.hadoop.hbase.io.encoding">HFileBlockDecodingContext</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#line.1344">getDefaultBlockDecodingContext</a>()</pre> |
| <div class="block">Get the default decoder for blocks from this file.</div> |
| </li> |
| </ul> |
| <a name="setIncludesMemStoreTS-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setIncludesMemStoreTS</h4> |
| <pre>void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#line.1346">setIncludesMemStoreTS</a>(boolean includesMemstoreTS)</pre> |
| </li> |
| </ul> |
| <a name="setDataBlockEncoder-org.apache.hadoop.hbase.io.hfile.HFileDataBlockEncoder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDataBlockEncoder</h4> |
| <pre>void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#line.1347">setDataBlockEncoder</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileDataBlockEncoder.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileDataBlockEncoder</a> encoder)</pre> |
| </li> |
| </ul> |
| <a name="unbufferStream--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>unbufferStream</h4> |
| <pre>void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#line.1353">unbufferStream</a>()</pre> |
| <div class="block">To close the stream's socket. Note: This can be concurrently called from multiple threads and |
| implementation should take care of thread safety.</div> |
| </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/HFileBlock.FSReader.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/HFileBlock.BlockWritable.html" title="interface in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html" target="_top">Frames</a></li> |
| <li><a href="HFileBlock.FSReader.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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 © 2007–2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |