| <!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>HFile (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="HFile (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/HFile.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/FixedFileTrailer.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/HFile.CachingBlockReader.html" title="interface 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/HFile.html" target="_top">Frames</a></li> |
| <li><a href="HFile.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><a href="#nested.class.summary">Nested</a> | </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 HFile" class="title">Class HFile</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.HFile</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>@InterfaceAudience.Private |
| public final class <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.122">HFile</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></pre> |
| <div class="block">File format for hbase. |
| A file of sorted key/value pairs. Both keys and values are byte arrays. |
| <p> |
| The memory footprint of a HFile includes the following (below is taken from the |
| <a |
| href=https://issues.apache.org/jira/browse/HADOOP-3315>TFile</a> documentation |
| but applies also to HFile): |
| <ul> |
| <li>Some constant overhead of reading or writing a compressed block. |
| <ul> |
| <li>Each compressed block requires one compression/decompression codec for |
| I/O. |
| <li>Temporary space to buffer the key. |
| <li>Temporary space to buffer the value. |
| </ul> |
| <li>HFile index, which is proportional to the total number of Data Blocks. |
| The total amount of memory needed to hold the index can be estimated as |
| (56+AvgKeySize)*NumBlocks. |
| </ul> |
| Suggestions on performance optimization. |
| <ul> |
| <li>Minimum block size. We recommend a setting of minimum block size between |
| 8KB to 1MB for general usage. Larger block size is preferred if files are |
| primarily for sequential access. However, it would lead to inefficient random |
| access (because there are more data to decompress). Smaller blocks are good |
| for random access, but require more memory to hold the block index, and may |
| be slower to create (because we must flush the compressor stream at the |
| conclusion of each data block, which leads to an FS I/O flush). Further, due |
| to the internal caching in Compression codec, the smallest possible block |
| size would be around 20KB-30KB. |
| <li>The current implementation does not offer true multi-threading for |
| reading. The implementation uses FSDataInputStream seek()+read(), which is |
| shown to be much faster than positioned-read call in single thread mode. |
| However, it also means that if multiple threads attempt to access the same |
| HFile (using multiple scanners) simultaneously, the actual I/O is carried out |
| sequentially even if they access different DFS blocks (Reexamine! pread seems |
| to be 10% faster than seek+read in my testing -- stack). |
| <li>Compression codec. Use "none" if the data is not very compressable (by |
| compressable, I mean a compression ratio at least 2:1). Generally, use "lzo" |
| as the starting point for experimenting. "gz" overs slightly better |
| compression ratio over "lzo" but requires 4x CPU to compress and 2x CPU to |
| decompress, comparing to "lzo". |
| </ul> |
| |
| For more on the background behind HFile, see <a |
| href=https://issues.apache.org/jira/browse/HBASE-61>HBASE-61</a>. |
| <p> |
| File is made of data blocks followed by meta data blocks (if any), a fileinfo |
| block, data block index, meta data block index, and a fixed size trailer |
| which records the offsets at which file changes content type. |
| <pre><data blocks><meta blocks><fileinfo>< |
| data index><meta index><trailer></pre> |
| Each block has a bit of magic at its start. Block are comprised of |
| key/values. In data blocks, they are both byte arrays. Metadata blocks are |
| a String key and a byte array value. An empty file looks like this: |
| <pre><fileinfo><trailer></pre>. That is, there are not data nor meta |
| blocks present. |
| <p> |
| TODO: Do scanners need to be able to take a start and end row? |
| TODO: Should BlockIndex know the name of its file? Should it have a Path |
| that points at its file say for the case where an index lives apart from |
| an HFile instance?</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Class and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.CachingBlockReader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.CachingBlockReader</a></span></code> |
| <div class="block">An abstraction used by the block index.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.Reader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.Reader</a></span></code> |
| <div class="block">An interface used by clients to open and iterate an <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.Writer.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.Writer</a></span></code> |
| <div class="block">API required to write an <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a></div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.WriterFactory.html" title="class in org.apache.hadoop.hbase.io.hfile">HFile.WriterFactory</a></span></code> |
| <div class="block">This variety of ways to construct writers is used throughout the code, and |
| we want to be able to swap writer implementations.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- =========== 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>static <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/HFile.html#BLOOM_FILTER_DATA_KEY">BLOOM_FILTER_DATA_KEY</a></span></code> |
| <div class="block">Meta data block name for bloom filter bits.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>(package private) static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#CHECKSUM_FAILURES">CHECKSUM_FAILURES</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#DATABLOCK_READ_COUNT">DATABLOCK_READ_COUNT</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#DEFAULT_BYTES_PER_CHECKSUM">DEFAULT_BYTES_PER_CHECKSUM</a></span></code> |
| <div class="block">The number of bytes per checksum.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <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/HFile.html#DEFAULT_COMPRESSION">DEFAULT_COMPRESSION</a></span></code> |
| <div class="block">Default compression name: none.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/hbase/io/compress/Compression.Algorithm.html" title="enum in org.apache.hadoop.hbase.io.compress">Compression.Algorithm</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#DEFAULT_COMPRESSION_ALGORITHM">DEFAULT_COMPRESSION_ALGORITHM</a></span></code> |
| <div class="block">Default compression: none.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <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/HFile.html#FORMAT_VERSION_KEY">FORMAT_VERSION_KEY</a></span></code> |
| <div class="block">The configuration key for HFile version to use for new files</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>(package private) static org.slf4j.Logger</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#LOG">LOG</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#MAX_FORMAT_VERSION">MAX_FORMAT_VERSION</a></span></code> |
| <div class="block">Maximum supported HFile format version</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#MAXIMUM_KEY_LENGTH">MAXIMUM_KEY_LENGTH</a></span></code> |
| <div class="block">Maximum length of key in HFile.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>(package private) static <a href="../../../../../../org/apache/hadoop/hbase/io/MetricsIO.html" title="class in org.apache.hadoop.hbase.io">MetricsIO</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#metrics">metrics</a></span></code> |
| <div class="block">Static instance for the metrics so that HFileReaders access the same instance</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#MIN_FORMAT_VERSION">MIN_FORMAT_VERSION</a></span></code> |
| <div class="block">Minimum supported HFile format version</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#MIN_FORMAT_VERSION_WITH_TAGS">MIN_FORMAT_VERSION_WITH_TAGS</a></span></code> |
| <div class="block">Minimum HFile format version with support for persisting cell tags</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#MIN_NUM_HFILE_PATH_LEVELS">MIN_NUM_HFILE_PATH_LEVELS</a></span></code> |
| <div class="block">We assume that HFile path ends with |
| ROOT_DIR/TABLE_NAME/REGION_NAME/CF_NAME/HFILE, so it has at least this |
| many levels of nesting.</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="colFirst" scope="col">Modifier</th> |
| <th class="colLast" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#HFile--">HFile</a></span>()</code> |
| <div class="block">Shutdown constructor.</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="t1" class="tableTab"><span><a href="javascript:show(1);">Static 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>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#checkFormatVersion-int-">checkFormatVersion</a></span>(int version)</code> |
| <div class="block">Checks the given <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, and throws an exception if |
| invalid.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#checkHFileVersion-org.apache.hadoop.conf.Configuration-">checkHFileVersion</a></span>(org.apache.hadoop.conf.Configuration c)</code> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.Reader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.Reader</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#createReader-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.hadoop.hbase.io.hfile.CacheConfig-boolean-org.apache.hadoop.conf.Configuration-">createReader</a></span>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path path, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheConfig.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheConfig</a> cacheConf, |
| boolean primaryReplicaReader, |
| org.apache.hadoop.conf.Configuration conf)</code> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.Reader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.Reader</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#createReader-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.hadoop.conf.Configuration-">createReader</a></span>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path path, |
| org.apache.hadoop.conf.Configuration conf)</code> |
| <div class="block">Creates reader with cache configuration disabled</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.Reader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.Reader</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#createReader-org.apache.hadoop.hbase.io.hfile.ReaderContext-org.apache.hadoop.hbase.io.hfile.HFileInfo-org.apache.hadoop.hbase.io.hfile.CacheConfig-org.apache.hadoop.conf.Configuration-">createReader</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/ReaderContext.html" title="class in org.apache.hadoop.hbase.io.hfile">ReaderContext</a> context, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileInfo.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileInfo</a> fileInfo, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheConfig.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheConfig</a> cacheConf, |
| org.apache.hadoop.conf.Configuration conf)</code> |
| <div class="block">Method returns the reader given the specified arguments.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#getAndResetChecksumFailuresCount--">getAndResetChecksumFailuresCount</a></span>()</code> |
| <div class="block">Number of checksum verification failures.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#getChecksumFailuresCount--">getChecksumFailuresCount</a></span>()</code> |
| <div class="block">Number of checksum verification failures.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#getFormatVersion-org.apache.hadoop.conf.Configuration-">getFormatVersion</a></span>(org.apache.hadoop.conf.Configuration conf)</code> </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><org.apache.hadoop.fs.Path></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#getStoreFiles-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">getStoreFiles</a></span>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path regionDir)</code> |
| <div class="block">Returns all HFiles belonging to the given region directory.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <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/HFile.html#getSupportedCompressionAlgorithms--">getSupportedCompressionAlgorithms</a></span>()</code> |
| <div class="block">Get names of supported compression algorithms.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.WriterFactory.html" title="class in org.apache.hadoop.hbase.io.hfile">HFile.WriterFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#getWriterFactory-org.apache.hadoop.conf.Configuration-org.apache.hadoop.hbase.io.hfile.CacheConfig-">getWriterFactory</a></span>(org.apache.hadoop.conf.Configuration conf, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheConfig.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheConfig</a> cacheConf)</code> |
| <div class="block">Returns the factory to be used to create <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> writers</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.WriterFactory.html" title="class in org.apache.hadoop.hbase.io.hfile">HFile.WriterFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#getWriterFactoryNoCache-org.apache.hadoop.conf.Configuration-">getWriterFactoryNoCache</a></span>(org.apache.hadoop.conf.Configuration conf)</code> |
| <div class="block">Returns the factory to be used to create <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> writers.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#isHFileFormat-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.FileStatus-">isHFileFormat</a></span>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.FileStatus fileStatus)</code> |
| <div class="block">Returns true if the specified file has a valid HFile Trailer.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#isHFileFormat-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">isHFileFormat</a></span>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path path)</code> |
| <div class="block">Returns true if the specified file has a valid HFile Trailer.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>(package private) static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#longToInt-long-">longToInt</a></span>(long l)</code> </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#main-java.lang.String:A-">main</a></span>(<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>[] args)</code> </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#updateReadLatency-long-boolean-">updateReadLatency</a></span>(long latencyMillis, |
| boolean pread)</code> </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html#updateWriteLatency-long-">updateWriteLatency</a></span>(long latencyMillis)</code> </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="LOG"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>LOG</h4> |
| <pre>static final org.slf4j.Logger <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.124">LOG</a></pre> |
| </li> |
| </ul> |
| <a name="MAXIMUM_KEY_LENGTH"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MAXIMUM_KEY_LENGTH</h4> |
| <pre>public static final int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.129">MAXIMUM_KEY_LENGTH</a></pre> |
| <div class="block">Maximum length of key in HFile.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFile.MAXIMUM_KEY_LENGTH">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="DEFAULT_COMPRESSION_ALGORITHM"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DEFAULT_COMPRESSION_ALGORITHM</h4> |
| <pre>public static final <a href="../../../../../../org/apache/hadoop/hbase/io/compress/Compression.Algorithm.html" title="enum in org.apache.hadoop.hbase.io.compress">Compression.Algorithm</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.134">DEFAULT_COMPRESSION_ALGORITHM</a></pre> |
| <div class="block">Default compression: none.</div> |
| </li> |
| </ul> |
| <a name="MIN_FORMAT_VERSION"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MIN_FORMAT_VERSION</h4> |
| <pre>public static final int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.138">MIN_FORMAT_VERSION</a></pre> |
| <div class="block">Minimum supported HFile format version</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFile.MIN_FORMAT_VERSION">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="MAX_FORMAT_VERSION"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MAX_FORMAT_VERSION</h4> |
| <pre>public static final int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.142">MAX_FORMAT_VERSION</a></pre> |
| <div class="block">Maximum supported HFile format version</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFile.MAX_FORMAT_VERSION">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="MIN_FORMAT_VERSION_WITH_TAGS"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MIN_FORMAT_VERSION_WITH_TAGS</h4> |
| <pre>public static final int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.147">MIN_FORMAT_VERSION_WITH_TAGS</a></pre> |
| <div class="block">Minimum HFile format version with support for persisting cell tags</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFile.MIN_FORMAT_VERSION_WITH_TAGS">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="DEFAULT_COMPRESSION"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DEFAULT_COMPRESSION</h4> |
| <pre>public static final <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/HFile.html#line.150">DEFAULT_COMPRESSION</a></pre> |
| <div class="block">Default compression name: none.</div> |
| </li> |
| </ul> |
| <a name="BLOOM_FILTER_DATA_KEY"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BLOOM_FILTER_DATA_KEY</h4> |
| <pre>public static final <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/HFile.html#line.154">BLOOM_FILTER_DATA_KEY</a></pre> |
| <div class="block">Meta data block name for bloom filter bits.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFile.BLOOM_FILTER_DATA_KEY">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="MIN_NUM_HFILE_PATH_LEVELS"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MIN_NUM_HFILE_PATH_LEVELS</h4> |
| <pre>public static final int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.162">MIN_NUM_HFILE_PATH_LEVELS</a></pre> |
| <div class="block">We assume that HFile path ends with |
| ROOT_DIR/TABLE_NAME/REGION_NAME/CF_NAME/HFILE, so it has at least this |
| many levels of nesting. This is needed for identifying table and CF name |
| from an HFile path.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFile.MIN_NUM_HFILE_PATH_LEVELS">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="DEFAULT_BYTES_PER_CHECKSUM"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DEFAULT_BYTES_PER_CHECKSUM</h4> |
| <pre>public static final int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.167">DEFAULT_BYTES_PER_CHECKSUM</a></pre> |
| <div class="block">The number of bytes per checksum.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFile.DEFAULT_BYTES_PER_CHECKSUM">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="CHECKSUM_FAILURES"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>CHECKSUM_FAILURES</h4> |
| <pre>static final <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.170">CHECKSUM_FAILURES</a></pre> |
| </li> |
| </ul> |
| <a name="DATABLOCK_READ_COUNT"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DATABLOCK_READ_COUNT</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.173">DATABLOCK_READ_COUNT</a></pre> |
| </li> |
| </ul> |
| <a name="metrics"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>metrics</h4> |
| <pre>static final <a href="../../../../../../org/apache/hadoop/hbase/io/MetricsIO.html" title="class in org.apache.hadoop.hbase.io">MetricsIO</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.176">metrics</a></pre> |
| <div class="block">Static instance for the metrics so that HFileReaders access the same instance</div> |
| </li> |
| </ul> |
| <a name="FORMAT_VERSION_KEY"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>FORMAT_VERSION_KEY</h4> |
| <pre>public static final <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/HFile.html#line.324">FORMAT_VERSION_KEY</a></pre> |
| <div class="block">The configuration key for HFile version to use for new files</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.HFile.FORMAT_VERSION_KEY">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="HFile--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>HFile</h4> |
| <pre>private <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.181">HFile</a>()</pre> |
| <div class="block">Shutdown constructor.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getAndResetChecksumFailuresCount--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAndResetChecksumFailuresCount</h4> |
| <pre>public static final long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.187">getAndResetChecksumFailuresCount</a>()</pre> |
| <div class="block">Number of checksum verification failures. It also |
| clears the counter.</div> |
| </li> |
| </ul> |
| <a name="getChecksumFailuresCount--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getChecksumFailuresCount</h4> |
| <pre>public static final long <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.195">getChecksumFailuresCount</a>()</pre> |
| <div class="block">Number of checksum verification failures. It also |
| clears the counter.</div> |
| </li> |
| </ul> |
| <a name="updateReadLatency-long-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>updateReadLatency</h4> |
| <pre>public static final void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.199">updateReadLatency</a>(long latencyMillis, |
| boolean pread)</pre> |
| </li> |
| </ul> |
| <a name="updateWriteLatency-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>updateWriteLatency</h4> |
| <pre>public static final void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.207">updateWriteLatency</a>(long latencyMillis)</pre> |
| </li> |
| </ul> |
| <a name="getFormatVersion-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFormatVersion</h4> |
| <pre>public static int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.326">getFormatVersion</a>(org.apache.hadoop.conf.Configuration conf)</pre> |
| </li> |
| </ul> |
| <a name="getWriterFactoryNoCache-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getWriterFactoryNoCache</h4> |
| <pre>public static final <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.WriterFactory.html" title="class in org.apache.hadoop.hbase.io.hfile">HFile.WriterFactory</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.337">getWriterFactoryNoCache</a>(org.apache.hadoop.conf.Configuration conf)</pre> |
| <div class="block">Returns the factory to be used to create <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> writers. |
| Disables block cache access for all writers created through the |
| returned factory.</div> |
| </li> |
| </ul> |
| <a name="getWriterFactory-org.apache.hadoop.conf.Configuration-org.apache.hadoop.hbase.io.hfile.CacheConfig-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getWriterFactory</h4> |
| <pre>public static final <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.WriterFactory.html" title="class in org.apache.hadoop.hbase.io.hfile">HFile.WriterFactory</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.345">getWriterFactory</a>(org.apache.hadoop.conf.Configuration conf, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheConfig.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheConfig</a> cacheConf)</pre> |
| <div class="block">Returns the factory to be used to create <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>HFile</code></a> writers</div> |
| </li> |
| </ul> |
| <a name="createReader-org.apache.hadoop.hbase.io.hfile.ReaderContext-org.apache.hadoop.hbase.io.hfile.HFileInfo-org.apache.hadoop.hbase.io.hfile.CacheConfig-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createReader</h4> |
| <pre>public static <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.Reader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.Reader</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.490">createReader</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/ReaderContext.html" title="class in org.apache.hadoop.hbase.io.hfile">ReaderContext</a> context, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFileInfo.html" title="class in org.apache.hadoop.hbase.io.hfile">HFileInfo</a> fileInfo, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheConfig.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheConfig</a> cacheConf, |
| org.apache.hadoop.conf.Configuration conf) |
| 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">Method returns the reader given the specified arguments. |
| TODO This is a bad abstraction. See HBASE-6635.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>context</code> - Reader context info</dd> |
| <dd><code>fileInfo</code> - HFile info</dd> |
| <dd><code>cacheConf</code> - Cache configuation values, cannot be null.</dd> |
| <dd><code>conf</code> - Configuration</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an appropriate instance of HFileReader</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If file is invalid, will throw CorruptHFileException flavored IOException</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createReader-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createReader</h4> |
| <pre>public static <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.Reader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.Reader</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.526">createReader</a>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path path, |
| org.apache.hadoop.conf.Configuration conf) |
| 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">Creates reader with cache configuration disabled</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fs</code> - filesystem</dd> |
| <dd><code>path</code> - Path to file to read</dd> |
| <dd><code>conf</code> - Configuration</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an active Reader instance</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> - Will throw a CorruptHFileException |
| (DoNotRetryIOException subtype) if hfile is corrupt/invalid.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createReader-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.hadoop.hbase.io.hfile.CacheConfig-boolean-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createReader</h4> |
| <pre>public static <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.Reader.html" title="interface in org.apache.hadoop.hbase.io.hfile">HFile.Reader</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.544">createReader</a>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path path, |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheConfig.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheConfig</a> cacheConf, |
| boolean primaryReplicaReader, |
| org.apache.hadoop.conf.Configuration conf) |
| 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="paramLabel">Parameters:</span></dt> |
| <dd><code>fs</code> - filesystem</dd> |
| <dd><code>path</code> - Path to file to read</dd> |
| <dd><code>cacheConf</code> - This must not be null. @see |
| <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CacheConfig.html#CacheConfig-org.apache.hadoop.conf.Configuration-"><code>CacheConfig.CacheConfig(Configuration)</code></a></dd> |
| <dd><code>primaryReplicaReader</code> - true if this is a reader for primary replica</dd> |
| <dd><code>conf</code> - Configuration</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an active Reader instance</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> - Will throw a CorruptHFileException (DoNotRetryIOException subtype) if hfile |
| is corrupt/invalid.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isHFileFormat-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isHFileFormat</h4> |
| <pre>public static boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.569">isHFileFormat</a>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path path) |
| 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">Returns true if the specified file has a valid HFile Trailer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fs</code> - filesystem</dd> |
| <dd><code>path</code> - Path to file to verify</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the file has a valid HFile Trailer, otherwise false</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if failed to read from the underlying stream</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isHFileFormat-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.FileStatus-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isHFileFormat</h4> |
| <pre>public static boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.580">isHFileFormat</a>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.FileStatus fileStatus) |
| 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">Returns true if the specified file has a valid HFile Trailer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fs</code> - filesystem</dd> |
| <dd><code>fileStatus</code> - the file to verify</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the file has a valid HFile Trailer, otherwise false</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if failed to read from the underlying stream</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSupportedCompressionAlgorithms--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSupportedCompressionAlgorithms</h4> |
| <pre>public static <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/HFile.html#line.606">getSupportedCompressionAlgorithms</a>()</pre> |
| <div class="block">Get names of supported compression algorithms. The names are acceptable by |
| HFile.Writer.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Array of strings, each represents a supported compression |
| algorithm. Currently, the following compression algorithms are |
| supported. |
| <ul> |
| <li>"none" - No compression. |
| <li>"gz" - GZIP compression. |
| </ul></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="longToInt-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>longToInt</h4> |
| <pre>static int <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.615">longToInt</a>(long l)</pre> |
| </li> |
| </ul> |
| <a name="getStoreFiles-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getStoreFiles</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><org.apache.hadoop.fs.Path> <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.630">getStoreFiles</a>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path regionDir) |
| 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">Returns all HFiles belonging to the given region directory. Could return an |
| empty list.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fs</code> - The file system reference.</dd> |
| <dd><code>regionDir</code> - The region directory to scan.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The list of files found.</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> - When scanning the files fails.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="checkFormatVersion-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkFormatVersion</h4> |
| <pre>public static void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.657">checkFormatVersion</a>(int version) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre> |
| <div class="block">Checks the given <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, and throws an exception if |
| invalid. Note that if the version number comes from an input file and has |
| not been verified, the caller needs to re-throw an <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><code>IOException</code></a> to |
| indicate that this is not a software error, but corrupted input.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>version</code> - an HFile version</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the version is invalid</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="checkHFileVersion-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkHFileVersion</h4> |
| <pre>public static void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.667">checkHFileVersion</a>(org.apache.hadoop.conf.Configuration c)</pre> |
| </li> |
| </ul> |
| <a name="main-java.lang.String:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>main</h4> |
| <pre>public static void <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/HFile.html#line.678">main</a>(<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>[] args) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/HFile.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/FixedFileTrailer.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/HFile.CachingBlockReader.html" title="interface 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/HFile.html" target="_top">Frames</a></li> |
| <li><a href="HFile.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><a href="#nested.class.summary">Nested</a> | </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–2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |