| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>HFileBlockIndex.BlockIndexWriter (Apache HBase 3.0.0-SNAPSHOT API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="HFileBlockIndex.BlockIndexWriter (Apache HBase 3.0.0-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/HFileBlockIndex.BlockIndexWriter.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.ByteArrayKeyBlockIndexReader.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html" target="_top">Frames</a></li> |
| <li><a href="HFileBlockIndex.BlockIndexWriter.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.hadoop.hbase.io.hfile</div> |
| <h2 title="Class HFileBlockIndex.BlockIndexWriter" class="title">Class HFileBlockIndex.BlockIndexWriter</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.hadoop.hbase.io.hfile.HFileBlockIndex.BlockIndexWriter</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html" title="interface in org.apache.hadoop.hbase.io.hfile">InlineBlockWriter</a></dd> |
| </dl> |
| <dl> |
| <dt>Enclosing class:</dt> |
| <dd><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public static class <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.html#line.941">HFileBlockIndex.BlockIndexWriter</a> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> |
| implements <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html" title="interface in org.apache.hadoop.hbase.io.hfile">InlineBlockWriter</a></pre> |
| <div class="block">Writes the block index into the output stream. Generate the tree from |
| bottom up. The leaf level is written to disk as a sequence of inline |
| blocks, if it is larger than a certain number of bytes. If the leaf level |
| is not large enough, we write all entries to the root level instead. |
| |
| After all leaf blocks have been written, we end up with an index |
| referencing the resulting leaf index blocks. If that index is larger than |
| the allowed root index size, the writer will break it up into |
| reasonable-size intermediate-level index block chunks write those chunks |
| out, and create another index referencing those chunks. This will be |
| repeated until the remaining index is small enough to become the root |
| index. However, in most practical cases we will only have leaf-level |
| blocks and the root index, or just the root index.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.Writer.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock.Writer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#blockWriter">blockWriter</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheConfig.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheConfig</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#cacheConf">cacheConf</a></span></code> |
| <div class="block">CacheConfig, or null if cache-on-write is disabled</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexChunk.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.BlockIndexChunk</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#curInlineChunk">curInlineChunk</a></span></code> |
| <div class="block">Current leaf-level chunk.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#firstKey">firstKey</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#maxChunkSize">maxChunkSize</a></span></code> |
| <div class="block">The maximum size guideline of all multi-level index blocks.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#minIndexNumEntries">minIndexNumEntries</a></span></code> |
| <div class="block">The maximum level of multi-level index blocks</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#nameForCaching">nameForCaching</a></span></code> |
| <div class="block">Name to use for computing cache keys</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#numLevels">numLevels</a></span></code> |
| <div class="block">The number of block index levels.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexChunk.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.BlockIndexChunk</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#rootChunk">rootChunk</a></span></code> |
| <div class="block">While the index is being written, this represents the current block |
| index referencing all leaf blocks, with one exception.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#singleLevelOnly">singleLevelOnly</a></span></code> |
| <div class="block">Whether we require this block index to always be single-level.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#totalBlockOnDiskSize">totalBlockOnDiskSize</a></span></code> |
| <div class="block">Total compressed size of all index blocks.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#totalBlockUncompressedSize">totalBlockUncompressedSize</a></span></code> |
| <div class="block">Total uncompressed size of all index blocks.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#totalNumEntries">totalNumEntries</a></span></code> |
| <div class="block">The total number of leaf-level entries, i.e.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#BlockIndexWriter--">BlockIndexWriter</a></span>()</code> |
| <div class="block">Creates a single-level block index writer</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#BlockIndexWriter-org.apache.hadoop.hbase.io.hfile.HFileBlock.Writer-org.apache.hadoop.hbase.io.hfile.CacheConfig-java.lang.String-">BlockIndexWriter</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.Writer.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock.Writer</a> blockWriter, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheConfig.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheConfig</a> cacheConf, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> nameForCaching)</code> |
| <div class="block">Creates a multi-level block index writer.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#addEntry-byte:A-long-int-">addEntry</a></span>(byte[] firstKey, |
| long blockOffset, |
| int blockDataSize)</code> |
| <div class="block">Add one index entry to the current leaf-level block.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#blockWritten-long-int-int-">blockWritten</a></span>(long offset, |
| int onDiskSize, |
| int uncompressedSize)</code> |
| <div class="block">Called after an inline block has been written so that we can add an |
| entry referring to that block to the parent-level index.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#ensureSingleLevel--">ensureSingleLevel</a></span>()</code> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>private void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#expectNumLevels-int-">expectNumLevels</a></span>(int expectedNumLevels)</code> </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#getCacheOnWrite--">getCacheOnWrite</a></span>()</code> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockType.html" title="enum in org.apache.hadoop.hbase.io.hfile">BlockType</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#getInlineBlockType--">getInlineBlockType</a></span>()</code> |
| <div class="block">The type of blocks this block writer produces.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#getNumLevels--">getNumLevels</a></span>()</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#getNumRootEntries--">getNumRootEntries</a></span>()</code> </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#getTotalUncompressedSize--">getTotalUncompressedSize</a></span>()</code> |
| <div class="block">The total uncompressed size of the root index block, intermediate-level |
| index blocks, and leaf-level index blocks.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#setMaxChunkSize-int-">setMaxChunkSize</a></span>(int maxChunkSize)</code> </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#setMinIndexNumEntries-int-">setMinIndexNumEntries</a></span>(int minIndexNumEntries)</code> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#shouldWriteBlock-boolean-">shouldWriteBlock</a></span>(boolean closing)</code> |
| <div class="block">Whether there is an inline block ready to be written.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#writeIndexBlocks-org.apache.hadoop.fs.FSDataOutputStream-">writeIndexBlocks</a></span>(org.apache.hadoop.fs.FSDataOutputStream out)</code> |
| <div class="block">Writes the root level and intermediate levels of the block index into |
| the output stream, generating the tree from bottom up.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#writeInlineBlock-java.io.DataOutput-">writeInlineBlock</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a> out)</code> |
| <div class="block">Write out the current inline index block.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>private void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#writeIntermediateBlock-org.apache.hadoop.fs.FSDataOutputStream-org.apache.hadoop.hbase.io.hfile.HFileBlockIndex.BlockIndexChunk-org.apache.hadoop.hbase.io.hfile.HFileBlockIndex.BlockIndexChunk-">writeIntermediateBlock</a></span>(org.apache.hadoop.fs.FSDataOutputStream out, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexChunk.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.BlockIndexChunk</a> parent, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexChunk.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.BlockIndexChunk</a> curChunk)</code> </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexChunk.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.BlockIndexChunk</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#writeIntermediateLevel-org.apache.hadoop.fs.FSDataOutputStream-org.apache.hadoop.hbase.io.hfile.HFileBlockIndex.BlockIndexChunk-">writeIntermediateLevel</a></span>(org.apache.hadoop.fs.FSDataOutputStream out, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexChunk.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.BlockIndexChunk</a> currentLevel)</code> |
| <div class="block">Split the current level of the block index into intermediate index |
| blocks of permitted size and write those blocks to disk.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#writeSingleLevelIndex-java.io.DataOutput-java.lang.String-">writeSingleLevelIndex</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a> out, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> description)</code> |
| <div class="block">Writes the block index data as a single level only.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="rootChunk"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rootChunk</h4> |
| <pre>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexChunk.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.BlockIndexChunk</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.951">rootChunk</a></pre> |
| <div class="block">While the index is being written, this represents the current block |
| index referencing all leaf blocks, with one exception. If the file is |
| being closed and there are not enough blocks to complete even a single |
| leaf block, no leaf blocks get written and this contains the entire |
| block index. After all levels of the index were written by |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#writeIndexBlocks-org.apache.hadoop.fs.FSDataOutputStream-"><code>writeIndexBlocks(FSDataOutputStream)</code></a>, this contains the final |
| root-level index.</div> |
| </li> |
| </ul> |
| <a name="curInlineChunk"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>curInlineChunk</h4> |
| <pre>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexChunk.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.BlockIndexChunk</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.957">curInlineChunk</a></pre> |
| <div class="block">Current leaf-level chunk. New entries referencing data blocks get added |
| to this chunk until it grows large enough to be written to disk.</div> |
| </li> |
| </ul> |
| <a name="numLevels"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>numLevels</h4> |
| <pre>private int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.968">numLevels</a></pre> |
| <div class="block">The number of block index levels. This is one if there is only root |
| level (even empty), two if there a leaf level and root level, and is |
| higher if there are intermediate levels. This is only final after |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#writeIndexBlocks-org.apache.hadoop.fs.FSDataOutputStream-"><code>writeIndexBlocks(FSDataOutputStream)</code></a> has been called. The |
| initial value accounts for the root level, and will be increased to two |
| as soon as we find out there is a leaf-level in |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#blockWritten-long-int-int-"><code>blockWritten(long, int, int)</code></a>.</div> |
| </li> |
| </ul> |
| <a name="blockWriter"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>blockWriter</h4> |
| <pre>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.Writer.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock.Writer</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.970">blockWriter</a></pre> |
| </li> |
| </ul> |
| <a name="firstKey"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>firstKey</h4> |
| <pre>private byte[] <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.971">firstKey</a></pre> |
| </li> |
| </ul> |
| <a name="totalNumEntries"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>totalNumEntries</h4> |
| <pre>private long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.978">totalNumEntries</a></pre> |
| <div class="block">The total number of leaf-level entries, i.e. entries referenced by |
| leaf-level blocks. For the data block index this is equal to the number |
| of data blocks.</div> |
| </li> |
| </ul> |
| <a name="totalBlockOnDiskSize"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>totalBlockOnDiskSize</h4> |
| <pre>private long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.981">totalBlockOnDiskSize</a></pre> |
| <div class="block">Total compressed size of all index blocks.</div> |
| </li> |
| </ul> |
| <a name="totalBlockUncompressedSize"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>totalBlockUncompressedSize</h4> |
| <pre>private long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.984">totalBlockUncompressedSize</a></pre> |
| <div class="block">Total uncompressed size of all index blocks.</div> |
| </li> |
| </ul> |
| <a name="maxChunkSize"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>maxChunkSize</h4> |
| <pre>private int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.987">maxChunkSize</a></pre> |
| <div class="block">The maximum size guideline of all multi-level index blocks.</div> |
| </li> |
| </ul> |
| <a name="minIndexNumEntries"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>minIndexNumEntries</h4> |
| <pre>private int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.990">minIndexNumEntries</a></pre> |
| <div class="block">The maximum level of multi-level index blocks</div> |
| </li> |
| </ul> |
| <a name="singleLevelOnly"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>singleLevelOnly</h4> |
| <pre>private boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.993">singleLevelOnly</a></pre> |
| <div class="block">Whether we require this block index to always be single-level.</div> |
| </li> |
| </ul> |
| <a name="cacheConf"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cacheConf</h4> |
| <pre>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheConfig.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheConfig</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.996">cacheConf</a></pre> |
| <div class="block">CacheConfig, or null if cache-on-write is disabled</div> |
| </li> |
| </ul> |
| <a name="nameForCaching"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>nameForCaching</h4> |
| <pre>private <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.999">nameForCaching</a></pre> |
| <div class="block">Name to use for computing cache keys</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="BlockIndexWriter--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BlockIndexWriter</h4> |
| <pre>public <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1002">BlockIndexWriter</a>()</pre> |
| <div class="block">Creates a single-level block index writer</div> |
| </li> |
| </ul> |
| <a name="BlockIndexWriter-org.apache.hadoop.hbase.io.hfile.HFileBlock.Writer-org.apache.hadoop.hbase.io.hfile.CacheConfig-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>BlockIndexWriter</h4> |
| <pre>public <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1013">BlockIndexWriter</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlock.Writer.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlock.Writer</a> blockWriter, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheConfig.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheConfig</a> cacheConf, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> nameForCaching)</pre> |
| <div class="block">Creates a multi-level block index writer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>blockWriter</code> - the block writer to use to write index blocks</dd> |
| <dd><code>cacheConf</code> - used to determine when and how a block should be cached-on-write.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="setMaxChunkSize-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setMaxChunkSize</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1027">setMaxChunkSize</a>(int maxChunkSize)</pre> |
| </li> |
| </ul> |
| <a name="setMinIndexNumEntries-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setMinIndexNumEntries</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1034">setMinIndexNumEntries</a>(int minIndexNumEntries)</pre> |
| </li> |
| </ul> |
| <a name="writeIndexBlocks-org.apache.hadoop.fs.FSDataOutputStream-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeIndexBlocks</h4> |
| <pre>public long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1059">writeIndexBlocks</a>(org.apache.hadoop.fs.FSDataOutputStream out) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Writes the root level and intermediate levels of the block index into |
| the output stream, generating the tree from bottom up. Assumes that the |
| leaf level has been inline-written to the disk if there is enough data |
| for more than one leaf block. We iterate by breaking the current level |
| of the block index, starting with the index of all leaf-level blocks, |
| into chunks small enough to be written to disk, and generate its parent |
| level, until we end up with a level small enough to become the root |
| level. |
| |
| If the leaf level is not large enough, there is no inline block index |
| anymore, so we only write that level of block index to disk as the root |
| level.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - FSDataOutputStream</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>position at which we entered the root-level index.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writeSingleLevelIndex-java.io.DataOutput-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeSingleLevelIndex</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1128">writeSingleLevelIndex</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a> out, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> description) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Writes the block index data as a single level only. Does not do any |
| block framing.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - the buffered output stream to write the index to. Typically a |
| stream writing into an <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> block.</dd> |
| <dd><code>description</code> - a short description of the index being written. Used |
| in a log message.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writeIntermediateLevel-org.apache.hadoop.fs.FSDataOutputStream-org.apache.hadoop.hbase.io.hfile.HFileBlockIndex.BlockIndexChunk-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeIntermediateLevel</h4> |
| <pre>private <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexChunk.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.BlockIndexChunk</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1162">writeIntermediateLevel</a>(org.apache.hadoop.fs.FSDataOutputStream out, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexChunk.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.BlockIndexChunk</a> currentLevel) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Split the current level of the block index into intermediate index |
| blocks of permitted size and write those blocks to disk. Return the next |
| level of the block index referencing those intermediate-level blocks.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - </dd> |
| <dd><code>currentLevel</code> - the current level of the block index, such as the a |
| chunk referencing all leaf-level index blocks</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the parent level block index, which becomes the root index after |
| a few (usually zero) iterations</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writeIntermediateBlock-org.apache.hadoop.fs.FSDataOutputStream-org.apache.hadoop.hbase.io.hfile.HFileBlockIndex.BlockIndexChunk-org.apache.hadoop.hbase.io.hfile.HFileBlockIndex.BlockIndexChunk-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeIntermediateBlock</h4> |
| <pre>private void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1189">writeIntermediateBlock</a>(org.apache.hadoop.fs.FSDataOutputStream out, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexChunk.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.BlockIndexChunk</a> parent, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexChunk.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileBlockIndex.BlockIndexChunk</a> curChunk) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNumRootEntries--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNumRootEntries</h4> |
| <pre>public final int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1228">getNumRootEntries</a>()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>how many block index entries there are in the root level</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNumLevels--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNumLevels</h4> |
| <pre>public int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1235">getNumLevels</a>()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the number of levels in this block index.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="expectNumLevels-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>expectNumLevels</h4> |
| <pre>private void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1239">expectNumLevels</a>(int expectedNumLevels)</pre> |
| </li> |
| </ul> |
| <a name="shouldWriteBlock-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>shouldWriteBlock</h4> |
| <pre>public boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1252">shouldWriteBlock</a>(boolean closing)</pre> |
| <div class="block">Whether there is an inline block ready to be written. In general, we |
| write an leaf-level index block as an inline block as soon as its size |
| as serialized in the non-root format reaches a certain threshold.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html#shouldWriteBlock-boolean-">shouldWriteBlock</a></code> in interface <code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html" title="interface in org.apache.hadoop.hbase.io.hfile">InlineBlockWriter</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>closing</code> - whether the file is being closed, in which case we need to write |
| out all available data and not wait to accumulate another block</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writeInlineBlock-java.io.DataOutput-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeInlineBlock</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1291">writeInlineBlock</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a> out) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Write out the current inline index block. Inline blocks are non-root |
| blocks, so the non-root index format is used.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html#writeInlineBlock-java.io.DataOutput-">writeInlineBlock</a></code> in interface <code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html" title="interface in org.apache.hadoop.hbase.io.hfile">InlineBlockWriter</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - </dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="blockWritten-long-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>blockWritten</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1312">blockWritten</a>(long offset, |
| int onDiskSize, |
| int uncompressedSize)</pre> |
| <div class="block">Called after an inline block has been written so that we can add an |
| entry referring to that block to the parent-level index.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html#blockWritten-long-int-int-">blockWritten</a></code> in interface <code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html" title="interface in org.apache.hadoop.hbase.io.hfile">InlineBlockWriter</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>offset</code> - the offset of the block in the stream</dd> |
| <dd><code>onDiskSize</code> - the on-disk size of the block</dd> |
| <dd><code>uncompressedSize</code> - the uncompressed size of the block</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getInlineBlockType--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInlineBlockType</h4> |
| <pre>public <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockType.html" title="enum in org.apache.hadoop.hbase.io.hfile">BlockType</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1339">getInlineBlockType</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html#getInlineBlockType--">InlineBlockWriter</a></code></span></div> |
| <div class="block">The type of blocks this block writer produces.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html#getInlineBlockType--">getInlineBlockType</a></code> in interface <code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html" title="interface in org.apache.hadoop.hbase.io.hfile">InlineBlockWriter</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addEntry-byte:A-long-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addEntry</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1353">addEntry</a>(byte[] firstKey, |
| long blockOffset, |
| int blockDataSize)</pre> |
| <div class="block">Add one index entry to the current leaf-level block. When the leaf-level |
| block gets large enough, it will be flushed to disk as an inline block.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>firstKey</code> - the first key of the data block</dd> |
| <dd><code>blockOffset</code> - the offset of the data block</dd> |
| <dd><code>blockDataSize</code> - the on-disk size of the data block (<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> |
| format version 2), or the uncompressed size of the data block ( |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> format version 1).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ensureSingleLevel--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ensureSingleLevel</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1361">ensureSingleLevel</a>() |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if we happened to write a multi-level index.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCacheOnWrite--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCacheOnWrite</h4> |
| <pre>public boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1375">getCacheOnWrite</a>()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html#getCacheOnWrite--">getCacheOnWrite</a></code> in interface <code><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InlineBlockWriter.html" title="interface in org.apache.hadoop.hbase.io.hfile">InlineBlockWriter</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if we are using cache-on-write. This is configured by the |
| caller of the constructor by either passing a valid block cache |
| or null.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getTotalUncompressedSize--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getTotalUncompressedSize</h4> |
| <pre>public long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html#line.1385">getTotalUncompressedSize</a>()</pre> |
| <div class="block">The total uncompressed size of the root index block, intermediate-level |
| index blocks, and leaf-level index blocks.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the total uncompressed size of all index blocks</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/HFileBlockIndex.BlockIndexWriter.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexReader.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.ByteArrayKeyBlockIndexReader.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.BlockIndexWriter.html" target="_top">Frames</a></li> |
| <li><a href="HFileBlockIndex.BlockIndexWriter.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2007–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |