blob: fbf04470a2f0267724ef3e609df0cdcc0316a8cb [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>HFileBlock (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: HFileBlock">
<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/HFileBlock.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><a href="#nested-class-summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="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 HFileBlock" class="title">Class HFileBlock</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.HFileBlock</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>, <code><a href="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></code>, <code><a href="../../nio/HBaseReferenceCounted.html" title="interface in org.apache.hadoop.hbase.nio">HBaseReferenceCounted</a></code>, <code>org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted</code></dd>
</dl>
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="ExclusiveMemHFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">ExclusiveMemHFileBlock</a></code>, <code><a href="SharedMemHFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">SharedMemHFileBlock</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="annotations">@Private
</span><span class="modifiers">public class </span><span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-122">HFileBlock</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="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></span></div>
<div class="block">Cacheable Blocks of an <a href="HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> version 2 file. Version 2 was introduced in hbase-0.92.0.
<p>
Version 1 was the original file block. Version 2 was introduced when we changed the hbase file
format to support multi-level block indexes and compound bloom filters (HBASE-3857). Support for
Version 1 was removed in hbase-1.3.0.
<h3>HFileBlock: Version 2</h3> In version 2, a block is structured as follows:
<ul>
<li><b>Header:</b> See Writer#putHeader() for where header is written; header total size is
HFILEBLOCK_HEADER_SIZE
<ul>
<li>0. blockType: Magic record identifying the <a href="BlockType.html" title="enum class in org.apache.hadoop.hbase.io.hfile"><code>BlockType</code></a> (8 bytes): e.g.
<code>DATABLK*</code>
<li>1. onDiskSizeWithoutHeader: Compressed -- a.k.a 'on disk' -- block size, excluding header,
but including tailing checksum bytes (4 bytes)
<li>2. uncompressedSizeWithoutHeader: Uncompressed block size, excluding header, and excluding
checksum bytes (4 bytes)
<li>3. prevBlockOffset: The offset of the previous block of the same type (8 bytes). This is used
to navigate to the previous block without having to go to the block index
<li>4: For minorVersions &gt;=1, the ordinal describing checksum type (1 byte)
<li>5: For minorVersions &gt;=1, the number of data bytes/checksum chunk (4 bytes)
<li>6: onDiskDataSizeWithHeader: For minorVersions &gt;=1, the size of data 'on disk', including
header, excluding checksums (4 bytes)
</ul>
</li>
<li><b>Raw/Compressed/Encrypted/Encoded data:</b> The compression algorithm is the same for all
the blocks in an <a href="HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a>. If compression is NONE, this is just raw, serialized Cells.
<li><b>Tail:</b> For minorVersions &gt;=1, a series of 4 byte checksums, one each for the number
of bytes specified by bytesPerChecksum.
</ul>
<h3>Caching</h3> Caches cache whole blocks with trailing checksums if any. We then tag on some
metadata, the content of BLOCK_METADATA_SPACE which will be flag on if we are doing 'hbase'
checksums and then the offset into the file which is needed when we re-make a cache key when we
return the block to the cache as 'done'. See <a href="Cacheable.html#serialize(java.nio.ByteBuffer,boolean)"><code>Cacheable.serialize(ByteBuffer, boolean)</code></a> and
<a href="Cacheable.html#getDeserializer()"><code>Cacheable.getDeserializer()</code></a>.
<p>
TODO: Should we cache the checksums? Down in Writer#getBlockForCaching(CacheConfig) where we make
a block to cache-on-write, there is an attempt at turning off checksums. This is not the only
place we get blocks to cache. We also will cache the raw return from an hdfs read. In this case,
the checksums may be present. If the cache is backed by something that doesn't do ECC, say an
SSD, we might want to preserve checksums. For now this is open question.
<p>
TODO: Over in BucketCache, we save a block allocation by doing a custom serialization. Be sure to
change it if serialization changes in here. Could we add a method here that takes an IOEngine and
that then serializes to it rather than expose our internals over in BucketCache? IOEngine is in
the bucket subpackage. Pull it up? Then this class knows about bucketcache. Ugh.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<li>
<section class="nested-class-summary" id="nested-class-summary">
<h2>Nested Class Summary</h2>
<div class="caption"><span>Nested Classes</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">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static final class&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="HFileBlock.BlockDeserializer.html" class="type-name-link" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock.BlockDeserializer</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>(package private) static interface&nbsp;</code></div>
<div class="col-second odd-row-color"><code><a href="HFileBlock.BlockIterator.html" class="type-name-link" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.BlockIterator</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Iterator for reading <a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFileBlock</code></a>s in load-on-open-section, such as root data index
block, meta index block, file info block etc.</div>
</div>
<div class="col-first even-row-color"><code>(package private) static interface&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="HFileBlock.BlockWritable.html" class="type-name-link" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.BlockWritable</a></code></div>
<div class="col-last even-row-color">
<div class="block">Something that can be written into a block.</div>
</div>
<div class="col-first odd-row-color"><code>(package private) static interface&nbsp;</code></div>
<div class="col-second odd-row-color"><code><a href="HFileBlock.FSReader.html" class="type-name-link" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</a></code></div>
<div class="col-last odd-row-color">
<div class="block">An HFile block reader with iteration ability.</div>
</div>
<div class="col-first even-row-color"><code>(package private) static class&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="HFileBlock.FSReaderImpl.html" class="type-name-link" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReaderImpl</a></code></div>
<div class="col-last even-row-color">
<div class="block">Reads version 2 HFile blocks from the filesystem.</div>
</div>
<div class="col-first odd-row-color"><code>(package private) static class&nbsp;</code></div>
<div class="col-second odd-row-color"><code><a href="HFileBlock.Header.html" class="type-name-link" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock.Header</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>private static class&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="HFileBlock.PrefetchedHeader.html" class="type-name-link" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock.PrefetchedHeader</a></code></div>
<div class="col-last even-row-color">
<div class="block">Data-structure to use caching the header of the NEXT block.</div>
</div>
<div class="col-first odd-row-color"><code>(package private) static class&nbsp;</code></div>
<div class="col-second odd-row-color"><code><a href="HFileBlock.Writer.html" class="type-name-link" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock.Writer</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Unified version 2 <a href="HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> block writer.</div>
</div>
</div>
</section>
</li>
<!-- =========== 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>private <a href="../ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a></code></div>
<div class="col-second even-row-color"><code><a href="#allocator" class="member-name-link">allocator</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>static final <a href="CacheableDeserializer.html" title="interface in org.apache.hadoop.hbase.io.hfile">CacheableDeserializer</a>&lt;<a href="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&gt;</code></div>
<div class="col-second odd-row-color"><code><a href="#BLOCK_DESERIALIZER" class="member-name-link">BLOCK_DESERIALIZER</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Used deserializing blocks from Cache.</div>
</div>
<div class="col-first even-row-color"><code>static final int</code></div>
<div class="col-second even-row-color"><code><a href="#BLOCK_METADATA_SPACE" class="member-name-link">BLOCK_METADATA_SPACE</a></code></div>
<div class="col-last even-row-color">
<div class="block">Space for metadata on a block that gets stored along with the block when we cache it.</div>
</div>
<div class="col-first odd-row-color"><code>private <a href="BlockType.html" title="enum class in org.apache.hadoop.hbase.io.hfile">BlockType</a></code></div>
<div class="col-second odd-row-color"><code><a href="#blockType" class="member-name-link">blockType</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Type of block.</div>
</div>
<div class="col-first even-row-color"><code>private <a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a></code></div>
<div class="col-second even-row-color"><code><a href="#bufWithoutChecksum" class="member-name-link">bufWithoutChecksum</a></code></div>
<div class="col-last even-row-color">
<div class="block">The in-memory representation of the hfile block.</div>
</div>
<div class="col-first odd-row-color"><code>(package private) static final int</code></div>
<div class="col-second odd-row-color"><code><a href="#CHECKSUM_SIZE" class="member-name-link">CHECKSUM_SIZE</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Each checksum value is an integer that can be stored in 4 bytes.</div>
</div>
<div class="col-first even-row-color"><code>(package private) static final int</code></div>
<div class="col-second even-row-color"><code><a href="#CHECKSUM_VERIFICATION_NUM_IO_THRESHOLD" class="member-name-link">CHECKSUM_VERIFICATION_NUM_IO_THRESHOLD</a></code></div>
<div class="col-last even-row-color">
<div class="block">On a checksum failure, do these many succeeding read requests using hdfs checksums before
auto-reenabling hbase checksum verification.</div>
</div>
<div class="col-first odd-row-color"><code>private static final int</code></div>
<div class="col-second odd-row-color"><code><a href="#DESERIALIZER_IDENTIFIER" class="member-name-link">DESERIALIZER_IDENTIFIER</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>static final boolean</code></div>
<div class="col-second even-row-color"><code><a href="#DONT_FILL_HEADER" class="member-name-link">DONT_FILL_HEADER</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>(package private) static final byte[]</code></div>
<div class="col-second odd-row-color"><code><a href="#DUMMY_HEADER_NO_CHECKSUM" class="member-name-link">DUMMY_HEADER_NO_CHECKSUM</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>private final <a href="HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a></code></div>
<div class="col-second even-row-color"><code><a href="#fileContext" class="member-name-link">fileContext</a></code></div>
<div class="col-last even-row-color">
<div class="block">Meta data that holds meta information on the hfileblock.</div>
</div>
<div class="col-first odd-row-color"><code>static final boolean</code></div>
<div class="col-second odd-row-color"><code><a href="#FILL_HEADER" class="member-name-link">FILL_HEADER</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>static final long</code></div>
<div class="col-second even-row-color"><code><a href="#FIXED_OVERHEAD" class="member-name-link">FIXED_OVERHEAD</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>private static final org.slf4j.Logger</code></div>
<div class="col-second odd-row-color"><code><a href="#LOG" class="member-name-link">LOG</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>static final int</code></div>
<div class="col-second even-row-color"><code><a href="#MULTI_BYTE_BUFFER_HEAP_SIZE" class="member-name-link">MULTI_BYTE_BUFFER_HEAP_SIZE</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>private int</code></div>
<div class="col-second odd-row-color"><code><a href="#nextBlockOnDiskSize" class="member-name-link">nextBlockOnDiskSize</a></code></div>
<div class="col-last odd-row-color">
<div class="block">The on-disk size of the next block, including the header and checksums if present.</div>
</div>
<div class="col-first even-row-color"><code>private long</code></div>
<div class="col-second even-row-color"><code><a href="#offset" class="member-name-link">offset</a></code></div>
<div class="col-last even-row-color">
<div class="block">The offset of this block in the file.</div>
</div>
<div class="col-first odd-row-color"><code>private final int</code></div>
<div class="col-second odd-row-color"><code><a href="#onDiskDataSizeWithHeader" class="member-name-link">onDiskDataSizeWithHeader</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Size on disk of header + data.</div>
</div>
<div class="col-first even-row-color"><code>private int</code></div>
<div class="col-second even-row-color"><code><a href="#onDiskSizeWithoutHeader" class="member-name-link">onDiskSizeWithoutHeader</a></code></div>
<div class="col-last even-row-color">
<div class="block">Size on disk excluding header, including checksum.</div>
</div>
<div class="col-first odd-row-color"><code>private long</code></div>
<div class="col-second odd-row-color"><code><a href="#prevBlockOffset" class="member-name-link">prevBlockOffset</a></code></div>
<div class="col-last odd-row-color">
<div class="block">The offset of the previous block on disk.</div>
</div>
<div class="col-first even-row-color"><code>private final int</code></div>
<div class="col-second even-row-color"><code><a href="#totalChecksumBytes" class="member-name-link">totalChecksumBytes</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>private int</code></div>
<div class="col-second odd-row-color"><code><a href="#uncompressedSizeWithoutHeader" class="member-name-link">uncompressedSizeWithoutHeader</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Size of pure data.</div>
</div>
<div class="col-first even-row-color"><code>private static int</code></div>
<div class="col-second even-row-color"><code><a href="#UNSET" class="member-name-link">UNSET</a></code></div>
<div class="col-last even-row-color">&nbsp;</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(org.apache.hadoop.hbase.io.hfile.BlockType,int,int,long,org.apache.hadoop.hbase.nio.ByteBuff,boolean,long,int,int,org.apache.hadoop.hbase.io.hfile.HFileContext,org.apache.hadoop.hbase.io.ByteBuffAllocator)" class="member-name-link">HFileBlock</a><wbr>(<a href="BlockType.html" title="enum class in org.apache.hadoop.hbase.io.hfile">BlockType</a>&nbsp;blockType,
int&nbsp;onDiskSizeWithoutHeader,
int&nbsp;uncompressedSizeWithoutHeader,
long&nbsp;prevBlockOffset,
<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;buf,
boolean&nbsp;fillHeader,
long&nbsp;offset,
int&nbsp;nextBlockOnDiskSize,
int&nbsp;onDiskDataSizeWithHeader,
<a href="HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a>&nbsp;fileContext,
<a href="../ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a>&nbsp;allocator)</code></div>
<div class="col-last even-row-color">
<div class="block">Creates a new <a href="HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> block from the given fields.</div>
</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-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-tab4"><code>private <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addMetaData(java.nio.ByteBuffer,boolean)" class="member-name-link">addMetaData</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;destination,
boolean&nbsp;includeNextBlockMetadata)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds metadata at current position (position is moved forward).</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private <a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#allocateBufferForUnpacking()" class="member-name-link">allocateBufferForUnpacking</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Always allocates a new buffer of the correct size.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#computeTotalChecksumBytes()" class="member-name-link">computeTotalChecksumBytes</a>()</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-tab1 method-summary-table-tab4"><code>private static <a href="HFileBlockBuilder.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockBuilder</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createBuilder(org.apache.hadoop.hbase.io.hfile.HFileBlock,org.apache.hadoop.hbase.nio.ByteBuff)" class="member-name-link">createBuilder</a><wbr>(<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;blk,
<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;newBuff)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a new HFileBlockBuilder from the existing block and a new ByteBuff.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>(package private) static <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-tab1 method-summary-table-tab4"><code><a href="#createFromBuff(org.apache.hadoop.hbase.nio.ByteBuff,boolean,long,int,org.apache.hadoop.hbase.io.hfile.HFileContext,org.apache.hadoop.hbase.io.ByteBuffAllocator)" class="member-name-link">createFromBuff</a><wbr>(<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;buf,
boolean&nbsp;usesHBaseChecksum,
long&nbsp;offset,
int&nbsp;nextBlockOnDiskSize,
<a href="HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a>&nbsp;fileContext,
<a href="../ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a>&nbsp;allocator)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a block from an existing buffer starting with a header.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>(package private) static <a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#deepCloneOnHeap(org.apache.hadoop.hbase.io.hfile.HFileBlock)" class="member-name-link">deepCloneOnHeap</a><wbr>(<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;blk)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 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>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#equals(java.lang.Object)" class="member-name-link">equals</a><wbr>(<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>&nbsp;comparison)</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><a href="BlockType.html" title="enum class in org.apache.hadoop.hbase.io.hfile">BlockType</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getBlockType()" class="member-name-link">getBlockType</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 block type of this cached HFile block</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getBufferReadOnly()" class="member-name-link">getBufferReadOnly</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a read-only duplicate of the buffer this block stores internally ready to be read.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getBufferWithoutHeader()" class="member-name-link">getBufferWithoutHeader</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 a buffer that does not include the header and checksum.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getByteBuffAllocator()" class="member-name-link">getByteBuffAllocator</a>()</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>(package private) int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getBytesPerChecksum()" class="member-name-link">getBytesPerChecksum</a>()</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>(package private) <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="#getByteStream()" class="member-name-link">getByteStream</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a byte stream reading the data(excluding header and checksum) of this block</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) byte</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getChecksumType()" class="member-name-link">getChecksumType</a>()</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>(package private) <a href="../encoding/DataBlockEncoding.html" title="enum class in org.apache.hadoop.hbase.io.encoding">DataBlockEncoding</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDataBlockEncoding()" class="member-name-link">getDataBlockEncoding</a>()</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>(package private) short</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDataBlockEncodingId()" class="member-name-link">getDataBlockEncodingId</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 get data block encoding id that was used to encode this block</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="CacheableDeserializer.html" title="interface in org.apache.hadoop.hbase.io.hfile">CacheableDeserializer</a>&lt;<a href="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDeserializer()" class="member-name-link">getDeserializer</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns CacheableDeserializer instance which reconstructs original object from ByteBuffer.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) byte[]</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDummyHeaderForVersion()" class="member-name-link">getDummyHeaderForVersion</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Return the appropriate DUMMY_HEADER for the minor version</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>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="#getDummyHeaderForVersion(boolean)" class="member-name-link">getDummyHeaderForVersion</a><wbr>(boolean&nbsp;usesHBaseChecksum)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Return the appropriate DUMMY_HEADER for the minor version</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getHFileContext()" class="member-name-link">getHFileContext</a>()</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><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMetaData(java.nio.ByteBuffer)" class="member-name-link">getMetaData</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;bb)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">For use by bucketcache.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getNextBlockOnDiskSize()" class="member-name-link">getNextBlockOnDiskSize</a>()</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="#getOffset()" class="member-name-link">getOffset</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Cannot be <a href="#UNSET"><code>UNSET</code></a>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getOnDiskDataSizeWithHeader()" class="member-name-link">getOnDiskDataSizeWithHeader</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 size of data on disk + header.</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="#getOnDiskSizeWithHeader()" class="member-name-link">getOnDiskSizeWithHeader</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the on-disk size of header + data part + checksum.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>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="#getOnDiskSizeWithHeader(org.apache.hadoop.hbase.nio.ByteBuff,boolean)" class="member-name-link">getOnDiskSizeWithHeader</a><wbr>(<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;headerBuf,
boolean&nbsp;checksumSupport)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Parse total on disk size including header and checksum.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getOnDiskSizeWithoutHeader()" class="member-name-link">getOnDiskSizeWithoutHeader</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the on-disk size of the data part + checksum (header excluded).</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) long</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPrevBlockOffset()" class="member-name-link">getPrevBlockOffset</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 offset of the previous block of the same type in the file, or -1 if unknown</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="#getSerializedLength()" class="member-name-link">getSerializedLength</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the length of the ByteBuffer required to serialized the object.</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="#getUncompressedSizeWithoutHeader()" class="member-name-link">getUncompressedSizeWithoutHeader</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 uncompressed size of data part (header and checksum excluded).</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="#hashCode()" class="member-name-link">hashCode</a>()</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>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#headerSize()" class="member-name-link">headerSize</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 size of this block header.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>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="#headerSize(boolean)" class="member-name-link">headerSize</a><wbr>(boolean&nbsp;usesHBaseChecksum)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Maps a minor version to the size of the header.</div>
</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="#heapSize()" class="member-name-link">heapSize</a>()</code></div>
<div class="col-last odd-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 even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isSharedMem()" class="member-name-link">isSharedMem</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Will be override by <a href="SharedMemHFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>SharedMemHFileBlock</code></a> or <a href="ExclusiveMemHFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>ExclusiveMemHFileBlock</code></a>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isUnpacked()" class="member-name-link">isUnpacked</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Return true when this block's buffer has been unpacked, false otherwise.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#overwriteHeader()" class="member-name-link">overwriteHeader</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Rewinds <code>buf</code> and writes first 4 header fields.</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="#refCnt()" class="member-name-link">refCnt</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Reference count of this Cacheable.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#release()" class="member-name-link">release</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Call <a href="../../nio/ByteBuff.html#release()"><code>ByteBuff.release()</code></a> to decrease the reference count, if no other reference, it will
return back the <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link"><code>ByteBuffer</code></a> to <a href="../ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io"><code>ByteBuffAllocator</code></a></div>
</div>
<div class="col-first odd-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 odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#retain()" class="member-name-link">retain</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Increase its reference count, and only when no reference we can free the object's memory.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sanityCheck()" class="member-name-link">sanityCheck</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Checks if the block is internally consistent, i.e.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sanityCheckAssertion(long,long,java.lang.String)" class="member-name-link">sanityCheckAssertion</a><wbr>(long&nbsp;valueFromBuf,
long&nbsp;valueFromField,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fieldName)</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>private void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sanityCheckAssertion(org.apache.hadoop.hbase.io.hfile.BlockType,org.apache.hadoop.hbase.io.hfile.BlockType)" class="member-name-link">sanityCheckAssertion</a><wbr>(<a href="BlockType.html" title="enum class in org.apache.hadoop.hbase.io.hfile">BlockType</a>&nbsp;valueFromBuf,
<a href="BlockType.html" title="enum class in org.apache.hadoop.hbase.io.hfile">BlockType</a>&nbsp;valueFromField)</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>(package private) void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sanityCheckUncompressed()" class="member-name-link">sanityCheckUncompressed</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">An additional sanity-check in case no compression or encryption is being used.</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="#serialize(java.nio.ByteBuffer,boolean)" class="member-name-link">serialize</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;destination,
boolean&nbsp;includeNextBlockMetadata)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Serializes its data into destination.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>private static <a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#shallowClone(org.apache.hadoop.hbase.io.hfile.HFileBlock,org.apache.hadoop.hbase.nio.ByteBuff)" class="member-name-link">shallowClone</a><wbr>(<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;blk,
<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;newBuf)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 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><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</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-tab1 method-summary-table-tab4"><code>(package private) static <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toStringHeader(org.apache.hadoop.hbase.nio.ByteBuff)" class="member-name-link">toStringHeader</a><wbr>(<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;buf)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Convert the contents of the block header into a human readable string.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#totalChecksumBytes()" class="member-name-link">totalChecksumBytes</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 number of bytes required to store all the checksums for this block.</div>
</div>
<div class="col-first odd-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 odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#touch()" class="member-name-link">touch</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Calling this method in strategic locations where HFileBlocks are referenced may help diagnose
potential buffer leaks.</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="#touch(java.lang.Object)" class="member-name-link">touch</a><wbr>(<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>&nbsp;hint)</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>(package private) <a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#unpack(org.apache.hadoop.hbase.io.hfile.HFileContext,org.apache.hadoop.hbase.io.hfile.HFileBlock.FSReader)" class="member-name-link">unpack</a><wbr>(<a href="HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a>&nbsp;fileContext,
<a href="HFileBlock.FSReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</a>&nbsp;reader)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Retrieves the decompressed/decrypted view of this block.</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#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#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#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>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.hadoop.hbase.nio.HBaseReferenceCounted">Methods inherited from interface&nbsp;org.apache.hadoop.hbase.nio.<a href="../../nio/HBaseReferenceCounted.html" title="interface in org.apache.hadoop.hbase.nio">HBaseReferenceCounted</a></h3>
<code><a href="../../nio/HBaseReferenceCounted.html#release(int)">release</a>, <a href="../../nio/HBaseReferenceCounted.html#retain(int)">retain</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="LOG">
<h3>LOG</h3>
<div class="member-signature"><span class="modifiers">private static final</span>&nbsp;<span class="return-type">org.slf4j.Logger</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-124">LOG</a></span></div>
</section>
</li>
<li>
<section class="detail" id="FIXED_OVERHEAD">
<h3>FIXED_OVERHEAD</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-125">FIXED_OVERHEAD</a></span></div>
</section>
</li>
<li>
<section class="detail" id="blockType">
<h3>blockType</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type"><a href="BlockType.html" title="enum class in org.apache.hadoop.hbase.io.hfile">BlockType</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-150">blockType</a></span></div>
<div class="block">Type of block. Header field 0.</div>
</section>
</li>
<li>
<section class="detail" id="onDiskSizeWithoutHeader">
<h3>onDiskSizeWithoutHeader</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-156">onDiskSizeWithoutHeader</a></span></div>
<div class="block">Size on disk excluding header, including checksum. Header field 1.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="HFileBlock.Writer.html#putHeader(byte%5B%5D,int,int,int,int)"><code>HFileBlock.Writer.putHeader(byte[], int, int, int, int)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="uncompressedSizeWithoutHeader">
<h3>uncompressedSizeWithoutHeader</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-162">uncompressedSizeWithoutHeader</a></span></div>
<div class="block">Size of pure data. Does not include header or checksums. Header field 2.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="HFileBlock.Writer.html#putHeader(byte%5B%5D,int,int,int,int)"><code>HFileBlock.Writer.putHeader(byte[], int, int, int, int)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="prevBlockOffset">
<h3>prevBlockOffset</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-168">prevBlockOffset</a></span></div>
<div class="block">The offset of the previous block on disk. Header field 3.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="HFileBlock.Writer.html#putHeader(byte%5B%5D,int,int,int,int)"><code>HFileBlock.Writer.putHeader(byte[], int, int, int, int)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="onDiskDataSizeWithHeader">
<h3>onDiskDataSizeWithHeader</h3>
<div class="member-signature"><span class="modifiers">private final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-175">onDiskDataSizeWithHeader</a></span></div>
<div class="block">Size on disk of header + data. Excludes checksum. Header field 6, OR calculated from
<a href="#onDiskSizeWithoutHeader"><code>onDiskSizeWithoutHeader</code></a> when using HDFS checksum.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="HFileBlock.Writer.html#putHeader(byte%5B%5D,int,int,int,int)"><code>HFileBlock.Writer.putHeader(byte[], int, int, int, int)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="bufWithoutChecksum">
<h3>bufWithoutChecksum</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type"><a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-194">bufWithoutChecksum</a></span></div>
<div class="block">The in-memory representation of the hfile block. Can be on or offheap. Can be backed by a
single ByteBuffer or by many. Make no assumptions.
<p>
Be careful reading from this <code>buf</code>. Duplicate and work on the duplicate or if not,
be sure to reset position and limit else trouble down the road.
<p>
TODO: Make this read-only once made.
<p>
We are using the ByteBuff type. ByteBuffer is not extensible yet we need to be able to have a
ByteBuffer-like API across multiple ByteBuffers reading from a cache such as BucketCache. So,
we have this ByteBuff type. Unfortunately, it is spread all about HFileBlock. Would be good if
could be confined to cache-use only but hard-to-do.
<p>
NOTE: this byteBuff including HFileBlock header and data, but excluding checksum.</div>
</section>
</li>
<li>
<section class="detail" id="fileContext">
<h3>fileContext</h3>
<div class="member-signature"><span class="modifiers">private final</span>&nbsp;<span class="return-type"><a href="HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-199">fileContext</a></span></div>
<div class="block">Meta data that holds meta information on the hfileblock.</div>
</section>
</li>
<li>
<section class="detail" id="offset">
<h3>offset</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-205">offset</a></span></div>
<div class="block">The offset of this block in the file. Populated by the reader for convenience of access. This
offset is not part of the block header.</div>
</section>
</li>
<li>
<section class="detail" id="nextBlockOnDiskSize">
<h3>nextBlockOnDiskSize</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-215">nextBlockOnDiskSize</a></span></div>
<div class="block">The on-disk size of the next block, including the header and checksums if present. UNSET if
unknown. Blocks try to carry the size of the next block to read in this data member. Usually we
get block sizes from the hfile index but sometimes the index is not available: e.g. when we
read the indexes themselves (indexes are stored in blocks, we do not have an index for the
indexes). Saves seeks especially around file open when there is a flurry of reading in hfile
metadata.</div>
</section>
</li>
<li>
<section class="detail" id="allocator">
<h3>allocator</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type"><a href="../ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-217">allocator</a></span></div>
</section>
</li>
<li>
<section class="detail" id="CHECKSUM_VERIFICATION_NUM_IO_THRESHOLD">
<h3>CHECKSUM_VERIFICATION_NUM_IO_THRESHOLD</h3>
<div class="member-signature"><span class="modifiers">static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-223">CHECKSUM_VERIFICATION_NUM_IO_THRESHOLD</a></span></div>
<div class="block">On a checksum failure, do these many succeeding read requests using hdfs checksums before
auto-reenabling hbase checksum verification.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFileBlock.CHECKSUM_VERIFICATION_NUM_IO_THRESHOLD">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="UNSET">
<h3>UNSET</h3>
<div class="member-signature"><span class="modifiers">private static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-225">UNSET</a></span></div>
</section>
</li>
<li>
<section class="detail" id="FILL_HEADER">
<h3>FILL_HEADER</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-226">FILL_HEADER</a></span></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFileBlock.FILL_HEADER">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="DONT_FILL_HEADER">
<h3>DONT_FILL_HEADER</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-227">DONT_FILL_HEADER</a></span></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFileBlock.DONT_FILL_HEADER">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="MULTI_BYTE_BUFFER_HEAP_SIZE">
<h3>MULTI_BYTE_BUFFER_HEAP_SIZE</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-230">MULTI_BYTE_BUFFER_HEAP_SIZE</a></span></div>
</section>
</li>
<li>
<section class="detail" id="BLOCK_METADATA_SPACE">
<h3>BLOCK_METADATA_SPACE</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-244">BLOCK_METADATA_SPACE</a></span></div>
<div class="block">Space for metadata on a block that gets stored along with the block when we cache it. There are
a few bytes stuck on the end of the HFileBlock that we pull in from HDFS. 8 bytes are for the
offset of this block (long) in the file. Offset is important because is is used when we remake
the CacheKey when we return block to the cache when done. There is also a flag on whether
checksumming is being done by hbase or not. See class comment for note on uncertain state of
checksumming of blocks that come out of cache (should we or should we not?). Finally there are
4 bytes to hold the length of the next block which can save a seek on occasion if available.
(This EXTRA info came in with original commit of the bucketcache, HBASE-7404. It was formerly
known as EXTRA_SERIALIZATION_SPACE).</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFileBlock.BLOCK_METADATA_SPACE">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="CHECKSUM_SIZE">
<h3>CHECKSUM_SIZE</h3>
<div class="member-signature"><span class="modifiers">static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-250">CHECKSUM_SIZE</a></span></div>
<div class="block">Each checksum value is an integer that can be stored in 4 bytes.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFileBlock.CHECKSUM_SIZE">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="DUMMY_HEADER_NO_CHECKSUM">
<h3>DUMMY_HEADER_NO_CHECKSUM</h3>
<div class="member-signature"><span class="modifiers">static final</span>&nbsp;<span class="return-type">byte[]</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-252">DUMMY_HEADER_NO_CHECKSUM</a></span></div>
</section>
</li>
<li>
<section class="detail" id="BLOCK_DESERIALIZER">
<h3>BLOCK_DESERIALIZER</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="CacheableDeserializer.html" title="interface in org.apache.hadoop.hbase.io.hfile">CacheableDeserializer</a>&lt;<a href="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&gt;</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-267">BLOCK_DESERIALIZER</a></span></div>
<div class="block">Used deserializing blocks from Cache. <code>
++++++++++++++
+ HFileBlock +
++++++++++++++
+ Checksums + &lt;= Optional
++++++++++++++
+ Metadata! + &lt;= See note on BLOCK_METADATA_SPACE above.
++++++++++++++
</code></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#serialize(java.nio.ByteBuffer,boolean)"><code>serialize(ByteBuffer, boolean)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="DESERIALIZER_IDENTIFIER">
<h3>DESERIALIZER_IDENTIFIER</h3>
<div class="member-signature"><span class="modifiers">private static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-295">DESERIALIZER_IDENTIFIER</a></span></div>
</section>
</li>
<li>
<section class="detail" id="totalChecksumBytes">
<h3>totalChecksumBytes</h3>
<div class="member-signature"><span class="modifiers">private final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-301">totalChecksumBytes</a></span></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;(org.apache.hadoop.hbase.io.hfile.BlockType,int,int,long,org.apache.hadoop.hbase.nio.ByteBuff,boolean,long,int,int,org.apache.hadoop.hbase.io.hfile.HFileContext,org.apache.hadoop.hbase.io.ByteBuffAllocator)">
<h3>HFileBlock</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-326">HFileBlock</a></span><wbr><span class="parameters">(<a href="BlockType.html" title="enum class in org.apache.hadoop.hbase.io.hfile">BlockType</a>&nbsp;blockType,
int&nbsp;onDiskSizeWithoutHeader,
int&nbsp;uncompressedSizeWithoutHeader,
long&nbsp;prevBlockOffset,
<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;buf,
boolean&nbsp;fillHeader,
long&nbsp;offset,
int&nbsp;nextBlockOnDiskSize,
int&nbsp;onDiskDataSizeWithHeader,
<a href="HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a>&nbsp;fileContext,
<a href="../ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a>&nbsp;allocator)</span></div>
<div class="block">Creates a new <a href="HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> block from the given fields. This constructor is used only while
writing blocks and caching, and is sitting in a byte buffer and we want to stuff the block into
cache.
<p>
TODO: The caller presumes no checksumming
<p>
TODO: HFile block writer can also off-heap ?
</p>
required of this block instance since going into cache; checksum already verified on underlying
block data pulled in from filesystem. Is that correct? What if cache is SSD?</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>blockType</code> - the type of this block, see <a href="BlockType.html" title="enum class in org.apache.hadoop.hbase.io.hfile"><code>BlockType</code></a></dd>
<dd><code>onDiskSizeWithoutHeader</code> - see <a href="#onDiskSizeWithoutHeader"><code>onDiskSizeWithoutHeader</code></a></dd>
<dd><code>uncompressedSizeWithoutHeader</code> - see <a href="#uncompressedSizeWithoutHeader"><code>uncompressedSizeWithoutHeader</code></a></dd>
<dd><code>prevBlockOffset</code> - see <a href="#prevBlockOffset"><code>prevBlockOffset</code></a></dd>
<dd><code>buf</code> - block buffer with header
(<a href="../../HConstants.html#HFILEBLOCK_HEADER_SIZE"><code>HConstants.HFILEBLOCK_HEADER_SIZE</code></a> bytes)</dd>
<dd><code>fillHeader</code> - when true, write the first 4 header fields into passed
buffer.</dd>
<dd><code>offset</code> - the file offset the block was read from</dd>
<dd><code>onDiskDataSizeWithHeader</code> - see <a href="#onDiskDataSizeWithHeader"><code>onDiskDataSizeWithHeader</code></a></dd>
<dd><code>fileContext</code> - HFile meta data</dd>
</dl>
</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="createFromBuff(org.apache.hadoop.hbase.nio.ByteBuff,boolean,long,int,org.apache.hadoop.hbase.io.hfile.HFileContext,org.apache.hadoop.hbase.io.ByteBuffAllocator)">
<h3>createFromBuff</h3>
<div class="member-signature"><span class="modifiers">static</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/HFileBlock.html#line-353">createFromBuff</a></span><wbr><span class="parameters">(<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;buf,
boolean&nbsp;usesHBaseChecksum,
long&nbsp;offset,
int&nbsp;nextBlockOnDiskSize,
<a href="HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a>&nbsp;fileContext,
<a href="../ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a>&nbsp;allocator)</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">Creates a block from an existing buffer starting with a header. Rewinds and takes ownership of
the buffer. By definition of rewind, ignores the buffer position, but if you slice the buffer
beforehand, it will rewind to that point.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buf</code> - Has header, content, and trailing checksums if present.</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="getOnDiskSizeWithHeader(org.apache.hadoop.hbase.nio.ByteBuff,boolean)">
<h3>getOnDiskSizeWithHeader</h3>
<div class="member-signature"><span class="modifiers">private static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-399">getOnDiskSizeWithHeader</a></span><wbr><span class="parameters">(<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;headerBuf,
boolean&nbsp;checksumSupport)</span></div>
<div class="block">Parse total on disk size including header and checksum.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>headerBuf</code> - Header ByteBuffer. Presumed exact size of header.</dd>
<dd><code>checksumSupport</code> - true if checksum verification is in use.</dd>
<dt>Returns:</dt>
<dd>Size of the block with header included.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getNextBlockOnDiskSize()">
<h3>getNextBlockOnDiskSize</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-408">getNextBlockOnDiskSize</a></span>()</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the on-disk size of the next block (including the header size and any checksums if
present) read by peeking into the next block's header; use as a hint when doing a read
of the next block when scanning or running over a file.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getBlockType()">
<h3>getBlockType</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="BlockType.html" title="enum class in org.apache.hadoop.hbase.io.hfile">BlockType</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-412">getBlockType</a></span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="Cacheable.html#getBlockType()">Cacheable</a></code></span></div>
<div class="block">Returns the block type of this cached HFile block</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Cacheable.html#getBlockType()">getBlockType</a></code>&nbsp;in interface&nbsp;<code><a href="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="refCnt()">
<h3>refCnt</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/HFileBlock.html#line-417">refCnt</a></span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="Cacheable.html#refCnt()">Cacheable</a></code></span></div>
<div class="block">Reference count of this Cacheable.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Cacheable.html#refCnt()">refCnt</a></code>&nbsp;in interface&nbsp;<code><a href="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></code></dd>
<dt>Specified by:</dt>
<dd><code>refCnt</code>&nbsp;in interface&nbsp;<code>org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="retain()">
<h3>retain</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/HFileBlock.html#line-422">retain</a></span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="Cacheable.html#retain()">Cacheable</a></code></span></div>
<div class="block">Increase its reference count, and only when no reference we can free the object's memory.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Cacheable.html#retain()">retain</a></code>&nbsp;in interface&nbsp;<code><a href="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></code></dd>
<dt>Specified by:</dt>
<dd><code>retain</code>&nbsp;in interface&nbsp;<code>org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="release()">
<h3>release</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-432">release</a></span>()</div>
<div class="block">Call <a href="../../nio/ByteBuff.html#release()"><code>ByteBuff.release()</code></a> to decrease the reference count, if no other reference, it will
return back the <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link"><code>ByteBuffer</code></a> to <a href="../ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io"><code>ByteBuffAllocator</code></a></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Cacheable.html#release()">release</a></code>&nbsp;in interface&nbsp;<code><a href="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></code></dd>
<dt>Specified by:</dt>
<dd><code>release</code>&nbsp;in interface&nbsp;<code>org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="touch()">
<h3>touch</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/HFileBlock.html#line-442">touch</a></span>()</div>
<div class="block">Calling this method in strategic locations where HFileBlocks are referenced may help diagnose
potential buffer leaks. We pass the block itself as a default hint, but one can use
<a href="#touch(java.lang.Object)"><code>touch(Object)</code></a> to pass their own hint as well.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../../nio/HBaseReferenceCounted.html#touch()">touch</a></code>&nbsp;in interface&nbsp;<code><a href="../../nio/HBaseReferenceCounted.html" title="interface in org.apache.hadoop.hbase.nio">HBaseReferenceCounted</a></code></dd>
<dt>Specified by:</dt>
<dd><code>touch</code>&nbsp;in interface&nbsp;<code>org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="touch(java.lang.Object)">
<h3>touch</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/HFileBlock.html#line-447">touch</a></span><wbr><span class="parameters">(<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>&nbsp;hint)</span></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../../nio/HBaseReferenceCounted.html#touch(java.lang.Object)">touch</a></code>&nbsp;in interface&nbsp;<code><a href="../../nio/HBaseReferenceCounted.html" title="interface in org.apache.hadoop.hbase.nio">HBaseReferenceCounted</a></code></dd>
<dt>Specified by:</dt>
<dd><code>touch</code>&nbsp;in interface&nbsp;<code>org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDataBlockEncodingId()">
<h3>getDataBlockEncodingId</h3>
<div class="member-signature"><span class="return-type">short</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-454">getDataBlockEncodingId</a></span>()</div>
<div class="block">Returns get data block encoding id that was used to encode this block</div>
</section>
</li>
<li>
<section class="detail" id="getOnDiskSizeWithHeader()">
<h3>getOnDiskSizeWithHeader</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/HFileBlock.html#line-463">getOnDiskSizeWithHeader</a></span>()</div>
<div class="block">Returns the on-disk size of header + data part + checksum.</div>
</section>
</li>
<li>
<section class="detail" id="getOnDiskSizeWithoutHeader()">
<h3>getOnDiskSizeWithoutHeader</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-468">getOnDiskSizeWithoutHeader</a></span>()</div>
<div class="block">Returns the on-disk size of the data part + checksum (header excluded).</div>
</section>
</li>
<li>
<section class="detail" id="getUncompressedSizeWithoutHeader()">
<h3>getUncompressedSizeWithoutHeader</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/HFileBlock.html#line-473">getUncompressedSizeWithoutHeader</a></span>()</div>
<div class="block">Returns the uncompressed size of data part (header and checksum excluded).</div>
</section>
</li>
<li>
<section class="detail" id="getPrevBlockOffset()">
<h3>getPrevBlockOffset</h3>
<div class="member-signature"><span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-478">getPrevBlockOffset</a></span>()</div>
<div class="block">Returns the offset of the previous block of the same type in the file, or -1 if unknown</div>
</section>
</li>
<li>
<section class="detail" id="overwriteHeader()">
<h3>overwriteHeader</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-486">overwriteHeader</a></span>()</div>
<div class="block">Rewinds <code>buf</code> and writes first 4 header fields. <code>buf</code> position is modified as
side-effect.</div>
</section>
</li>
<li>
<section class="detail" id="getBufferWithoutHeader()">
<h3>getBufferWithoutHeader</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-503">getBufferWithoutHeader</a></span>()</div>
<div class="block">Returns a buffer that does not include the header and checksum.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the buffer with header skipped and checksum omitted.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getBufferReadOnly()">
<h3>getBufferReadOnly</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-518">getBufferReadOnly</a></span>()</div>
<div class="block">Returns a read-only duplicate of the buffer this block stores internally ready to be read.
Clients must not modify the buffer object though they may set position and limit on the
returned buffer since we pass back a duplicate. This method has to be public because it is used
in <a href="CompoundBloomFilter.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>CompoundBloomFilter</code></a> to avoid object creation on every Bloom filter lookup, but has
to be used with caution. Buffer holds header, block content, and any follow-on checksums if
present.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the buffer of this block for read-only operations,the buffer includes header,but not
checksum.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getByteBuffAllocator()">
<h3>getByteBuffAllocator</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-525">getByteBuffAllocator</a></span>()</div>
</section>
</li>
<li>
<section class="detail" id="sanityCheckAssertion(long,long,java.lang.String)">
<h3>sanityCheckAssertion</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-529">sanityCheckAssertion</a></span><wbr><span class="parameters">(long&nbsp;valueFromBuf,
long&nbsp;valueFromField,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fieldName)</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>
<dl class="notes">
<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="sanityCheckAssertion(org.apache.hadoop.hbase.io.hfile.BlockType,org.apache.hadoop.hbase.io.hfile.BlockType)">
<h3>sanityCheckAssertion</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-537">sanityCheckAssertion</a></span><wbr><span class="parameters">(<a href="BlockType.html" title="enum class in org.apache.hadoop.hbase.io.hfile">BlockType</a>&nbsp;valueFromBuf,
<a href="BlockType.html" title="enum class in org.apache.hadoop.hbase.io.hfile">BlockType</a>&nbsp;valueFromField)</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>
<dl class="notes">
<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="sanityCheck()">
<h3>sanityCheck</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-552">sanityCheck</a></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">Checks if the block is internally consistent, i.e. the first
<a href="../../HConstants.html#HFILEBLOCK_HEADER_SIZE"><code>HConstants.HFILEBLOCK_HEADER_SIZE</code></a> bytes of the buffer contain a valid header consistent
with the fields. Assumes a packed block structure. This function is primary for testing and
debugging, and is not thread-safe, because it alters the internal buffer pointer. Used by tests
only.</div>
<dl class="notes">
<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="toString()">
<h3>toString</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/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-588">toString</a></span>()</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="unpack(org.apache.hadoop.hbase.io.hfile.HFileContext,org.apache.hadoop.hbase.io.hfile.HFileBlock.FSReader)">
<h3>unpack</h3>
<div class="member-signature"><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/HFileBlock.html#line-629">unpack</a></span><wbr><span class="parameters">(<a href="HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a>&nbsp;fileContext,
<a href="HFileBlock.FSReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFileBlock.FSReader</a>&nbsp;reader)</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">Retrieves the decompressed/decrypted view of this block. An encoded block remains in its
encoded structure. Internal structures are shared between instances where applicable.</div>
<dl class="notes">
<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="allocateBufferForUnpacking()">
<h3>allocateBufferForUnpacking</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type"><a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-668">allocateBufferForUnpacking</a></span>()</div>
<div class="block">Always allocates a new buffer of the correct size. Copies header bytes from the existing
buffer. Does not change header fields. Reserve room to keep checksum bytes too.</div>
</section>
</li>
<li>
<section class="detail" id="isUnpacked()">
<h3>isUnpacked</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-688">isUnpacked</a></span>()</div>
<div class="block">Return true when this block's buffer has been unpacked, false otherwise. Note this is a
calculated heuristic, not tracked attribute of the block.</div>
</section>
</li>
<li>
<section class="detail" id="getOffset()">
<h3>getOffset</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/HFileBlock.html#line-700">getOffset</a></span>()</div>
<div class="block">Cannot be <a href="#UNSET"><code>UNSET</code></a>. Must be a legitimate value. Used re-making the <a href="BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>BlockCacheKey</code></a>
when block is returned to the cache.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the offset of this block in the file it was read from</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getByteStream()">
<h3>getByteStream</h3>
<div class="member-signature"><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/HFileBlock.html#line-708">getByteStream</a></span>()</div>
<div class="block">Returns a byte stream reading the data(excluding header and checksum) of this block</div>
</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/HFileBlock.html#line-714">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="isSharedMem()">
<h3>isSharedMem</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-729">isSharedMem</a></span>()</div>
<div class="block">Will be override by <a href="SharedMemHFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>SharedMemHFileBlock</code></a> or <a href="ExclusiveMemHFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>ExclusiveMemHFileBlock</code></a>. Return true
by default.</div>
</section>
</li>
<li>
<section class="detail" id="sanityCheckUncompressed()">
<h3>sanityCheckUncompressed</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-1916">sanityCheckUncompressed</a></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 additional sanity-check in case no compression or encryption is being used.</div>
<dl class="notes">
<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="getSerializedLength()">
<h3>getSerializedLength</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/HFileBlock.html#line-1925">getSerializedLength</a></span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="Cacheable.html#getSerializedLength()">Cacheable</a></code></span></div>
<div class="block">Returns the length of the ByteBuffer required to serialized the object. If the object cannot be
serialized, it should return 0.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Cacheable.html#getSerializedLength()">getSerializedLength</a></code>&nbsp;in interface&nbsp;<code><a href="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></code></dd>
<dt>Returns:</dt>
<dd>int length in bytes of the serialized form or 0 if the object cannot be cached.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="serialize(java.nio.ByteBuffer,boolean)">
<h3>serialize</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/HFileBlock.html#line-1935">serialize</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;destination,
boolean&nbsp;includeNextBlockMetadata)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="Cacheable.html#serialize(java.nio.ByteBuffer,boolean)">Cacheable</a></code></span></div>
<div class="block">Serializes its data into destination.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Cacheable.html#serialize(java.nio.ByteBuffer,boolean)">serialize</a></code>&nbsp;in interface&nbsp;<code><a href="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></code></dd>
<dt>Parameters:</dt>
<dd><code>destination</code> - Where to serialize to</dd>
<dd><code>includeNextBlockMetadata</code> - Whether to include nextBlockMetadata in the Cache block.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMetaData(java.nio.ByteBuffer)">
<h3>getMetaData</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/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-1949">getMetaData</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;bb)</span></div>
<div class="block">For use by bucketcache. This exposes internals.</div>
</section>
</li>
<li>
<section class="detail" id="addMetaData(java.nio.ByteBuffer,boolean)">
<h3>addMetaData</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-1959">addMetaData</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;destination,
boolean&nbsp;includeNextBlockMetadata)</span></div>
<div class="block">Adds metadata at current position (position is moved forward). Does not flip or reset.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The passed <code>destination</code> with metadata added.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDeserializer()">
<h3>getDeserializer</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="CacheableDeserializer.html" title="interface in org.apache.hadoop.hbase.io.hfile">CacheableDeserializer</a>&lt;<a href="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&gt;</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-1969">getDeserializer</a></span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="Cacheable.html#getDeserializer()">Cacheable</a></code></span></div>
<div class="block">Returns CacheableDeserializer instance which reconstructs original object from ByteBuffer.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Cacheable.html#getDeserializer()">getDeserializer</a></code>&nbsp;in interface&nbsp;<code><a href="Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></code></dd>
<dt>Returns:</dt>
<dd>CacheableDeserialzer instance.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="hashCode()">
<h3>hashCode</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/HFileBlock.html#line-1974">hashCode</a></span>()</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="equals(java.lang.Object)">
<h3>equals</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-1987">equals</a></span><wbr><span class="parameters">(<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>&nbsp;comparison)</span></div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDataBlockEncoding()">
<h3>getDataBlockEncoding</h3>
<div class="member-signature"><span class="return-type"><a href="../encoding/DataBlockEncoding.html" title="enum class in org.apache.hadoop.hbase.io.encoding">DataBlockEncoding</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-2029">getDataBlockEncoding</a></span>()</div>
</section>
</li>
<li>
<section class="detail" id="getChecksumType()">
<h3>getChecksumType</h3>
<div class="member-signature"><span class="return-type">byte</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-2036">getChecksumType</a></span>()</div>
</section>
</li>
<li>
<section class="detail" id="getBytesPerChecksum()">
<h3>getBytesPerChecksum</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-2040">getBytesPerChecksum</a></span>()</div>
</section>
</li>
<li>
<section class="detail" id="getOnDiskDataSizeWithHeader()">
<h3>getOnDiskDataSizeWithHeader</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-2045">getOnDiskDataSizeWithHeader</a></span>()</div>
<div class="block">Returns the size of data on disk + header. Excludes checksum.</div>
</section>
</li>
<li>
<section class="detail" id="totalChecksumBytes()">
<h3>totalChecksumBytes</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-2056">totalChecksumBytes</a></span>()</div>
<div class="block">Return the number of bytes required to store all the checksums for this block. Each checksum
value is a 4 byte integer. <br/>
NOTE: ByteBuff returned by <a href="#getBufferWithoutHeader()"><code>getBufferWithoutHeader()</code></a> and
<a href="#getBufferReadOnly()"><code>getBufferReadOnly()</code></a> or DataInputStream returned by
<a href="#getByteStream()"><code>getByteStream()</code></a> does not include checksum.</div>
</section>
</li>
<li>
<section class="detail" id="computeTotalChecksumBytes()">
<h3>computeTotalChecksumBytes</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-2060">computeTotalChecksumBytes</a></span>()</div>
</section>
</li>
<li>
<section class="detail" id="headerSize()">
<h3>headerSize</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/HFileBlock.html#line-2075">headerSize</a></span>()</div>
<div class="block">Returns the size of this block header.</div>
</section>
</li>
<li>
<section class="detail" id="headerSize(boolean)">
<h3>headerSize</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-2082">headerSize</a></span><wbr><span class="parameters">(boolean&nbsp;usesHBaseChecksum)</span></div>
<div class="block">Maps a minor version to the size of the header.</div>
</section>
</li>
<li>
<section class="detail" id="getDummyHeaderForVersion()">
<h3>getDummyHeaderForVersion</h3>
<div class="member-signature"><span class="return-type">byte[]</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-2092">getDummyHeaderForVersion</a></span>()</div>
<div class="block">Return the appropriate DUMMY_HEADER for the minor version</div>
</section>
</li>
<li>
<section class="detail" id="getDummyHeaderForVersion(boolean)">
<h3>getDummyHeaderForVersion</h3>
<div class="member-signature"><span class="modifiers">private static</span>&nbsp;<span class="return-type">byte[]</span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-2099">getDummyHeaderForVersion</a></span><wbr><span class="parameters">(boolean&nbsp;usesHBaseChecksum)</span></div>
<div class="block">Return the appropriate DUMMY_HEADER for the minor version</div>
</section>
</li>
<li>
<section class="detail" id="getHFileContext()">
<h3>getHFileContext</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="HFileContext.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileContext</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-2107">getHFileContext</a></span>()</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>This HFileBlocks fileContext which will a derivative of the fileContext for the file
from which this block's data was originally read.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toStringHeader(org.apache.hadoop.hbase.nio.ByteBuff)">
<h3>toStringHeader</h3>
<div class="member-signature"><span class="modifiers">static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-2115">toStringHeader</a></span><wbr><span class="parameters">(<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;buf)</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">Convert the contents of the block header into a human readable string. This is mostly helpful
for debugging. This assumes that the block has minor version > 0.</div>
<dl class="notes">
<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="createBuilder(org.apache.hadoop.hbase.io.hfile.HFileBlock,org.apache.hadoop.hbase.nio.ByteBuff)">
<h3>createBuilder</h3>
<div class="member-signature"><span class="modifiers">private static</span>&nbsp;<span class="return-type"><a href="HFileBlockBuilder.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockBuilder</a></span>&nbsp;<span class="element-name"><a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlock.html#line-2142">createBuilder</a></span><wbr><span class="parameters">(<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;blk,
<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;newBuff)</span></div>
<div class="block">Creates a new HFileBlockBuilder from the existing block and a new ByteBuff. The builder will be
loaded with all of the original fields from blk, except now using the newBuff and setting
isSharedMem based on the source of the passed in newBuff. An existing HFileBlock may have been
an <a href="ExclusiveMemHFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>ExclusiveMemHFileBlock</code></a>, but the new buffer might call for a
<a href="SharedMemHFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>SharedMemHFileBlock</code></a>. Or vice versa.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>blk</code> - the block to clone from</dd>
<dd><code>newBuff</code> - the new buffer to use</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="shallowClone(org.apache.hadoop.hbase.io.hfile.HFileBlock,org.apache.hadoop.hbase.nio.ByteBuff)">
<h3>shallowClone</h3>
<div class="member-signature"><span class="modifiers">private static</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/HFileBlock.html#line-2152">shallowClone</a></span><wbr><span class="parameters">(<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;blk,
<a href="../../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;newBuf)</span></div>
</section>
</li>
<li>
<section class="detail" id="deepCloneOnHeap(org.apache.hadoop.hbase.io.hfile.HFileBlock)">
<h3>deepCloneOnHeap</h3>
<div class="member-signature"><span class="modifiers">static</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/HFileBlock.html#line-2156">deepCloneOnHeap</a></span><wbr><span class="parameters">(<a href="HFileBlock.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock</a>&nbsp;blk)</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>