blob: 16ad3eb8c2e7a78d80470d449f8bffa65e7c9e98 [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>HFileBlock.FSReaderImpl (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.FSReaderImpl (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":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/HFileBlock.FSReaderImpl.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.FSReader.html" title="interface 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/HFileBlock.Header.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/HFileBlock.FSReaderImpl.html" target="_top">Frames</a></li>
<li><a href="HFileBlock.FSReaderImpl.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>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="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 HFileBlock.FSReaderImpl" class="title">Class HFileBlock.FSReaderImpl</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.HFileBlock.FSReaderImpl</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</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 class <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line.1378">HFileBlock.FSReaderImpl</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/HFileBlock.FSReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</a></pre>
<div class="block">Reads version 2 HFile blocks from the filesystem.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== 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 <a href="../../../../../../org/apache/hadoop/hbase/io/ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#allocator">allocator</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/io/encoding/HFileBlockDefaultDecodingContext.html" title="class in org.apache.hadoop.hbase.io.encoding">HFileBlockDefaultDecodingContext</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#defaultDecodingCtx">defaultDecodingCtx</a></span></code>
<div class="block">Default context used when BlockType != <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockType.html#ENCODED_DATA"><code>BlockType.ENCODED_DATA</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <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.FSReaderImpl.html#encodedBlockDecodingCtx">encodedBlockDecodingCtx</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#fileContext">fileContext</a></span></code>&nbsp;</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/HFileBlock.FSReaderImpl.html#fileSize">fileSize</a></span></code>
<div class="block">The size of the file we are reading from, or -1 if unknown.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#hdrSize">hdrSize</a></span></code>
<div class="block">The size of the header</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/fs/HFileSystem.html" title="class in org.apache.hadoop.hbase.fs">HFileSystem</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#hfs">hfs</a></span></code>
<div class="block">The filesystem used to access data</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <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/HFileBlock.FSReaderImpl.html#pathName">pathName</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/AtomicReference.html?is-external=true" title="class or interface in java.util.concurrent.atomic">AtomicReference</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.PrefetchedHeader.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock.PrefetchedHeader</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#prefetchedHeader">prefetchedHeader</a></span></code>
<div class="block">Cache of the NEXT header after this.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks">Lock</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#streamLock">streamLock</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/io/FSDataInputStreamWrapper.html" title="class in org.apache.hadoop.hbase.io">FSDataInputStreamWrapper</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#streamWrapper">streamWrapper</a></span></code>
<div class="block">The file system stream of the underlying <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> that
does or doesn't do checksum validations in the filesystem</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/HFileBlock.FSReaderImpl.html#FSReaderImpl-org.apache.hadoop.hbase.io.hfile.ReaderContext-org.apache.hadoop.hbase.io.hfile.HFileContext-org.apache.hadoop.hbase.io.ByteBuffAllocator-">FSReaderImpl</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/ReaderContext.html" title="class in org.apache.hadoop.hbase.io.hfile">ReaderContext</a>&nbsp;readerContext,
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a>&nbsp;fileContext,
<a href="../../../../../../org/apache/hadoop/hbase/io/ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a>&nbsp;allocator)</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>private <a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#allocate-int-boolean-">allocate</a></span>(int&nbsp;size,
boolean&nbsp;intoHeap)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<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.FSReaderImpl.html#blockRange-long-long-">blockRange</a></span>(long&nbsp;startOffset,
long&nbsp;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="i2" class="altColor">
<td class="colFirst"><code>private void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#cacheNextBlockHeader-long-org.apache.hadoop.hbase.nio.ByteBuff-int-int-">cacheNextBlockHeader</a></span>(long&nbsp;offset,
<a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;onDiskBlock,
int&nbsp;onDiskSizeWithHeader,
int&nbsp;headerLength)</code>
<div class="block">Save away the next blocks header in atomic reference.</div>
</td>
</tr>
<tr id="i3" 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/HFileBlock.FSReaderImpl.html#checkAndGetSizeAsInt-long-int-">checkAndGetSizeAsInt</a></span>(long&nbsp;onDiskSizeWithHeaderL,
int&nbsp;hdrSize)</code>&nbsp;</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/HFileBlock.FSReaderImpl.html#closeStreams--">closeStreams</a></span>()</code>
<div class="block">Closes the backing streams</div>
</td>
</tr>
<tr id="i5" 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.FSReaderImpl.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="i6" class="altColor">
<td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#getCachedHeader-long-">getCachedHeader</a></span>(long&nbsp;offset)</code>
<div class="block">Check atomic reference cache for this block's header.</div>
</td>
</tr>
<tr id="i7" 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.FSReaderImpl.html#getDefaultBlockDecodingContext--">getDefaultBlockDecodingContext</a></span>()</code>
<div class="block">Get the default decoder for blocks from this file.</div>
</td>
</tr>
<tr id="i8" 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/HFileBlock.FSReaderImpl.html#getNextBlockOnDiskSize-boolean-org.apache.hadoop.hbase.nio.ByteBuff-int-">getNextBlockOnDiskSize</a></span>(boolean&nbsp;readNextHeader,
<a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;onDiskBlock,
int&nbsp;onDiskSizeWithHeader)</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#readAtOffset-org.apache.hadoop.fs.FSDataInputStream-org.apache.hadoop.hbase.nio.ByteBuff-int-boolean-long-boolean-">readAtOffset</a></span>(org.apache.hadoop.fs.FSDataInputStream&nbsp;istream,
<a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;dest,
int&nbsp;size,
boolean&nbsp;peekIntoNextBlock,
long&nbsp;fileOffset,
boolean&nbsp;pread)</code>
<div class="block">Does a positional read or a seek and read into the given byte buffer.</div>
</td>
</tr>
<tr id="i10" 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.FSReaderImpl.html#readBlockData-long-long-boolean-boolean-boolean-">readBlockData</a></span>(long&nbsp;offset,
long&nbsp;onDiskSizeWithHeaderL,
boolean&nbsp;pread,
boolean&nbsp;updateMetrics,
boolean&nbsp;intoHeap)</code>
<div class="block">Reads a version 2 block (version 1 blocks not supported and not expected).</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>protected <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.FSReaderImpl.html#readBlockDataInternal-org.apache.hadoop.fs.FSDataInputStream-long-long-boolean-boolean-boolean-boolean-">readBlockDataInternal</a></span>(org.apache.hadoop.fs.FSDataInputStream&nbsp;is,
long&nbsp;offset,
long&nbsp;onDiskSizeWithHeaderL,
boolean&nbsp;pread,
boolean&nbsp;verifyChecksum,
boolean&nbsp;updateMetrics,
boolean&nbsp;intoHeap)</code>
<div class="block">Reads a version 2 block.</div>
</td>
</tr>
<tr id="i12" 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.FSReaderImpl.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>&nbsp;encoder)</code>&nbsp;</td>
</tr>
<tr id="i13" 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.FSReaderImpl.html#setIncludesMemStoreTS-boolean-">setIncludesMemStoreTS</a></span>(boolean&nbsp;includesMemstoreTS)</code>&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<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/HFileBlock.FSReaderImpl.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i15" 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.FSReaderImpl.html#unbufferStream--">unbufferStream</a></span>()</code>
<div class="block">To close the stream's socket.</div>
</td>
</tr>
<tr id="i16" 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/HFileBlock.FSReaderImpl.html#validateChecksum-long-org.apache.hadoop.hbase.nio.ByteBuff-int-">validateChecksum</a></span>(long&nbsp;offset,
<a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;data,
int&nbsp;hdrSize)</code>
<div class="block">Generates the checksum for the header as well as the data and then validates it.</div>
</td>
</tr>
<tr id="i17" 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/HFileBlock.FSReaderImpl.html#verifyOnDiskSizeMatchesHeader-int-org.apache.hadoop.hbase.nio.ByteBuff-long-boolean-">verifyOnDiskSizeMatchesHeader</a></span>(int&nbsp;passedIn,
<a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;headerBuf,
long&nbsp;offset,
boolean&nbsp;verifyChecksum)</code>
<div class="block">Verify the passed in onDiskSizeWithHeader aligns with what is in the header else something
is not right.</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>
</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="streamWrapper">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>streamWrapper</h4>
<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/FSDataInputStreamWrapper.html" title="class in org.apache.hadoop.hbase.io">FSDataInputStreamWrapper</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1381">streamWrapper</a></pre>
<div class="block">The file system stream of the underlying <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> that
does or doesn't do checksum validations in the filesystem</div>
</li>
</ul>
<a name="encodedBlockDecodingCtx">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodedBlockDecodingCtx</h4>
<pre>private&nbsp;<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.FSReaderImpl.html#line.1383">encodedBlockDecodingCtx</a></pre>
</li>
</ul>
<a name="defaultDecodingCtx">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>defaultDecodingCtx</h4>
<pre>private final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/encoding/HFileBlockDefaultDecodingContext.html" title="class in org.apache.hadoop.hbase.io.encoding">HFileBlockDefaultDecodingContext</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1386">defaultDecodingCtx</a></pre>
<div class="block">Default context used when BlockType != <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockType.html#ENCODED_DATA"><code>BlockType.ENCODED_DATA</code></a>.</div>
</li>
</ul>
<a name="prefetchedHeader">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prefetchedHeader</h4>
<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html?is-external=true" title="class or interface in java.util.concurrent.atomic">AtomicReference</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.PrefetchedHeader.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock.PrefetchedHeader</a>&gt; <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1394">prefetchedHeader</a></pre>
<div class="block">Cache of the NEXT header after this. Check it is indeed next blocks header
before using it. TODO: Review. This overread into next block to fetch
next blocks header seems unnecessary given we usually get the block size
from the hfile index. Review!</div>
</li>
</ul>
<a name="fileSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fileSize</h4>
<pre>private&nbsp;long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1398">fileSize</a></pre>
<div class="block">The size of the file we are reading from, or -1 if unknown.</div>
</li>
</ul>
<a name="hdrSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hdrSize</h4>
<pre>protected final&nbsp;int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1401">hdrSize</a></pre>
<div class="block">The size of the header</div>
</li>
</ul>
<a name="hfs">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hfs</h4>
<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/fs/HFileSystem.html" title="class in org.apache.hadoop.hbase.fs">HFileSystem</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1404">hfs</a></pre>
<div class="block">The filesystem used to access data</div>
</li>
</ul>
<a name="fileContext">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fileContext</h4>
<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1406">fileContext</a></pre>
</li>
</ul>
<a name="pathName">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pathName</h4>
<pre>private&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/HFileBlock.FSReaderImpl.html#line.1408">pathName</a></pre>
</li>
</ul>
<a name="allocator">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allocator</h4>
<pre>private final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1410">allocator</a></pre>
</li>
</ul>
<a name="streamLock">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>streamLock</h4>
<pre>private final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks">Lock</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1412">streamLock</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="FSReaderImpl-org.apache.hadoop.hbase.io.hfile.ReaderContext-org.apache.hadoop.hbase.io.hfile.HFileContext-org.apache.hadoop.hbase.io.ByteBuffAllocator-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>FSReaderImpl</h4>
<pre><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1414">FSReaderImpl</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/ReaderContext.html" title="class in org.apache.hadoop.hbase.io.hfile">ReaderContext</a>&nbsp;readerContext,
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a>&nbsp;fileContext,
<a href="../../../../../../org/apache/hadoop/hbase/io/ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a>&nbsp;allocator)
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>
<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>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="blockRange-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blockRange</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.BlockIterator.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.BlockIterator</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1433">blockRange</a>(long&nbsp;startOffset,
long&nbsp;endOffset)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#blockRange-long-long-">HFileBlock.FSReader</a></code></span></div>
<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 &lt;=
startOffset &lt; 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="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#blockRange-long-long-">blockRange</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</a></code></dd>
<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="readAtOffset-org.apache.hadoop.fs.FSDataInputStream-org.apache.hadoop.hbase.nio.ByteBuff-int-boolean-long-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readAtOffset</h4>
<pre>protected&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1495">readAtOffset</a>(org.apache.hadoop.fs.FSDataInputStream&nbsp;istream,
<a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;dest,
int&nbsp;size,
boolean&nbsp;peekIntoNextBlock,
long&nbsp;fileOffset,
boolean&nbsp;pread)
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">Does a positional read or a seek and read into the given byte buffer. We need take care that
we will call the <a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html#release--"><code>ByteBuff.release()</code></a> for every exit to deallocate the ByteBuffers,
otherwise the memory leak may happen.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dest</code> - destination buffer</dd>
<dd><code>size</code> - size of read</dd>
<dd><code>peekIntoNextBlock</code> - whether to read the next block's on-disk size</dd>
<dd><code>fileOffset</code> - position in the stream to read at</dd>
<dd><code>pread</code> - whether we should do a positional read</dd>
<dd><code>istream</code> - The input source of data</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true to indicate the destination buffer include the next block header, otherwise only
include the current block data without the next block header.</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> - if any IO error happen.</dd>
</dl>
</li>
</ul>
<a name="readBlockData-long-long-boolean-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBlockData</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1540">readBlockData</a>(long&nbsp;offset,
long&nbsp;onDiskSizeWithHeaderL,
boolean&nbsp;pread,
boolean&nbsp;updateMetrics,
boolean&nbsp;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 a version 2 block (version 1 blocks not supported and not expected). Tries to do as
little memory allocation as possible, using the provided on-disk size.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#readBlockData-long-long-boolean-boolean-boolean-">readBlockData</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offset</code> - the offset in the stream to read at</dd>
<dd><code>onDiskSizeWithHeaderL</code> - the on-disk size of the block, including the header, or -1 if
unknown; i.e. when iterating over blocks reading in the file metadata info.</dd>
<dd><code>pread</code> - whether to use a positional read</dd>
<dd><code>updateMetrics</code> - whether to update the metrics</dd>
<dd><code>intoHeap</code> - allocate ByteBuff of block from heap or off-heap.</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>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#readBlockData-long-long-boolean-boolean-boolean-"><code>for more details about the
useHeap.</code></a></dd>
</dl>
</li>
</ul>
<a name="checkAndGetSizeAsInt-long-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkAndGetSizeAsInt</h4>
<pre>private static&nbsp;int&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1607">checkAndGetSizeAsInt</a>(long&nbsp;onDiskSizeWithHeaderL,
int&nbsp;hdrSize)
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>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Check <code>onDiskSizeWithHeaderL</code> size is healthy and then return it as an int</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="verifyOnDiskSizeMatchesHeader-int-org.apache.hadoop.hbase.nio.ByteBuff-long-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>verifyOnDiskSizeMatchesHeader</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1622">verifyOnDiskSizeMatchesHeader</a>(int&nbsp;passedIn,
<a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;headerBuf,
long&nbsp;offset,
boolean&nbsp;verifyChecksum)
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">Verify the passed in onDiskSizeWithHeader aligns with what is in the header else something
is not right.</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="getCachedHeader-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCachedHeader</h4>
<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1643">getCachedHeader</a>(long&nbsp;offset)</pre>
<div class="block">Check atomic reference cache for this block's header. Cache only good if next
read coming through is next in sequence in the block. We read next block's
header on the tail of reading the previous block to save a seek. Otherwise,
we have to do a seek to read the header before we can pull in the block OR
we have to backup the stream because we over-read (the next block's header).</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The cached block header or null if not found.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.PrefetchedHeader.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFileBlock.PrefetchedHeader</code></a>,
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#cacheNextBlockHeader-long-org.apache.hadoop.hbase.nio.ByteBuff-int-int-"><code>cacheNextBlockHeader(long, ByteBuff, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="cacheNextBlockHeader-long-org.apache.hadoop.hbase.nio.ByteBuff-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheNextBlockHeader</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1653">cacheNextBlockHeader</a>(long&nbsp;offset,
<a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;onDiskBlock,
int&nbsp;onDiskSizeWithHeader,
int&nbsp;headerLength)</pre>
<div class="block">Save away the next blocks header in atomic reference.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#getCachedHeader-long-"><code>getCachedHeader(long)</code></a>,
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.PrefetchedHeader.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFileBlock.PrefetchedHeader</code></a></dd>
</dl>
</li>
</ul>
<a name="getNextBlockOnDiskSize-boolean-org.apache.hadoop.hbase.nio.ByteBuff-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNextBlockOnDiskSize</h4>
<pre>private&nbsp;int&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1661">getNextBlockOnDiskSize</a>(boolean&nbsp;readNextHeader,
<a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;onDiskBlock,
int&nbsp;onDiskSizeWithHeader)</pre>
</li>
</ul>
<a name="allocate-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allocate</h4>
<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1672">allocate</a>(int&nbsp;size,
boolean&nbsp;intoHeap)</pre>
</li>
</ul>
<a name="readBlockDataInternal-org.apache.hadoop.fs.FSDataInputStream-long-long-boolean-boolean-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBlockDataInternal</h4>
<pre>protected&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1691">readBlockDataInternal</a>(org.apache.hadoop.fs.FSDataInputStream&nbsp;is,
long&nbsp;offset,
long&nbsp;onDiskSizeWithHeaderL,
boolean&nbsp;pread,
boolean&nbsp;verifyChecksum,
boolean&nbsp;updateMetrics,
boolean&nbsp;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 a version 2 block.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offset</code> - the offset in the stream to read at.</dd>
<dd><code>onDiskSizeWithHeaderL</code> - the on-disk size of the block, including the header and
checksums if present or -1 if unknown (as a long). Can be -1 if we are doing raw
iteration of blocks as when loading up file metadata; i.e. the first read of a new
file. Usually non-null gotten from the file index.</dd>
<dd><code>pread</code> - whether to use a positional read</dd>
<dd><code>verifyChecksum</code> - Whether to use HBase checksums. If HBase checksum is switched off, then
use HDFS checksum. Can also flip on/off reading same file if we hit a troublesome
patch in an hfile.</dd>
<dd><code>updateMetrics</code> - whether need to update the metrics.</dd>
<dd><code>intoHeap</code> - allocate the ByteBuff of block from heap or off-heap.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the HFileBlock or null if there is a HBase checksum mismatch</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="setIncludesMemStoreTS-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIncludesMemStoreTS</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1786">setIncludesMemStoreTS</a>(boolean&nbsp;includesMemstoreTS)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#setIncludesMemStoreTS-boolean-">setIncludesMemStoreTS</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</a></code></dd>
</dl>
</li>
</ul>
<a name="setDataBlockEncoder-org.apache.hadoop.hbase.io.hfile.HFileDataBlockEncoder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDataBlockEncoder</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1792">setDataBlockEncoder</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileDataBlockEncoder.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileDataBlockEncoder</a>&nbsp;encoder)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#setDataBlockEncoder-org.apache.hadoop.hbase.io.hfile.HFileDataBlockEncoder-">setDataBlockEncoder</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</a></code></dd>
</dl>
</li>
</ul>
<a name="getBlockDecodingContext--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBlockDecodingContext</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/encoding/HFileBlockDecodingContext.html" title="interface in org.apache.hadoop.hbase.io.encoding">HFileBlockDecodingContext</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1797">getBlockDecodingContext</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#getBlockDecodingContext--">HFileBlock.FSReader</a></code></span></div>
<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>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#getBlockDecodingContext--">getBlockDecodingContext</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</a></code></dd>
</dl>
</li>
</ul>
<a name="getDefaultBlockDecodingContext--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultBlockDecodingContext</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/io/encoding/HFileBlockDecodingContext.html" title="interface in org.apache.hadoop.hbase.io.encoding">HFileBlockDecodingContext</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1802">getDefaultBlockDecodingContext</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#getDefaultBlockDecodingContext--">HFileBlock.FSReader</a></code></span></div>
<div class="block">Get the default decoder for blocks from this file.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#getDefaultBlockDecodingContext--">getDefaultBlockDecodingContext</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</a></code></dd>
</dl>
</li>
</ul>
<a name="validateChecksum-long-org.apache.hadoop.hbase.nio.ByteBuff-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>validateChecksum</h4>
<pre>private&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1811">validateChecksum</a>(long&nbsp;offset,
<a href="../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;data,
int&nbsp;hdrSize)</pre>
<div class="block">Generates the checksum for the header as well as the data and then validates it.
If the block doesn't uses checksum, returns false.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if checksum matches, else false.</dd>
</dl>
</li>
</ul>
<a name="closeStreams--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeStreams</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1824">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"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#closeStreams--">HFileBlock.FSReader</a></code></span></div>
<div class="block">Closes the backing streams</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#closeStreams--">closeStreams</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</a></code></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="unbufferStream--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unbufferStream</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReaderImpl.html#line.1829">unbufferStream</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#unbufferStream--">HFileBlock.FSReader</a></code></span></div>
<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>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html#unbufferStream--">unbufferStream</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.FSReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</a></code></dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockListLast">
<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/HFileBlock.FSReaderImpl.html#line.1842">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>
</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.FSReaderImpl.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.FSReader.html" title="interface 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/HFileBlock.Header.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/HFileBlock.FSReaderImpl.html" target="_top">Frames</a></li>
<li><a href="HFileBlock.FSReaderImpl.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>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="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>