| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>HFileArchiver (Apache HBase 4.0.0-alpha-1-SNAPSHOT API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.hadoop.hbase.backup, class: HFileArchiver"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-3.6.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| var pathtoroot = "../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/HFileArchiver.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <ul class="sub-nav-list"> |
| <li>Summary: </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="sub-nav-list"> |
| <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> |
| <div class="nav-list-search"><label for="search-input">SEARCH:</label> |
| <input type="text" id="search-input" value="search" disabled="disabled"> |
| <input type="reset" id="reset-button" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.hadoop.hbase.backup</a></div> |
| <h1 title="Class HFileArchiver" class="title">Class HFileArchiver</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a> |
| <div class="inheritance">org.apache.hadoop.hbase.backup.HFileArchiver</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <hr> |
| <div class="type-signature"><span class="annotations">@Private |
| </span><span class="modifiers">public class </span><span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-62">HFileArchiver</a></span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div> |
| <div class="block">Utility class to handle the removal of HFiles (or the respective <a href="../regionserver/HStoreFile.html" title="class in org.apache.hadoop.hbase.regionserver"><code>StoreFiles</code></a>) |
| for a HRegion from the <code>FileSystem</code>. The hfiles will be archived or deleted, depending on |
| the state of the system.</div> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <li> |
| <section class="nested-class-summary" id="nested-class-summary"> |
| <h2>Nested Class Summary</h2> |
| <div class="caption"><span>Nested Classes</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Class</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>private static class </code></div> |
| <div class="col-second even-row-color"><code><a href="HFileArchiver.File.html" class="type-name-link" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.File</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Wrapper to handle file operations uniformly</div> |
| </div> |
| <div class="col-first odd-row-color"><code>private static class </code></div> |
| <div class="col-second odd-row-color"><code><a href="HFileArchiver.FileablePath.html" class="type-name-link" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.FileablePath</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">A <a href="HFileArchiver.File.html" title="class in org.apache.hadoop.hbase.backup"><code>HFileArchiver.File</code></a> that wraps a simple <code>Path</code> on a <code>FileSystem</code>.</div> |
| </div> |
| <div class="col-first even-row-color"><code>private static class </code></div> |
| <div class="col-second even-row-color"><code><a href="HFileArchiver.FileableStoreFile.html" class="type-name-link" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.FileableStoreFile</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block"><a href="HFileArchiver.File.html" title="class in org.apache.hadoop.hbase.backup"><code>HFileArchiver.File</code></a> adapter for a <a href="../regionserver/HStoreFile.html" title="class in org.apache.hadoop.hbase.regionserver"><code>HStoreFile</code></a> living on a <code>FileSystem</code> .</div> |
| </div> |
| <div class="col-first odd-row-color"><code>private static class </code></div> |
| <div class="col-second odd-row-color"><code><a href="HFileArchiver.FileConverter.html" class="type-name-link" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.FileConverter</a><<a href="HFileArchiver.FileConverter.html" title="type parameter in HFileArchiver.FileConverter">T</a>></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Adapt a type to match the <a href="HFileArchiver.File.html" title="class in org.apache.hadoop.hbase.backup"><code>HFileArchiver.File</code></a> interface, which is used internally for handling |
| archival/removal of files</div> |
| </div> |
| <div class="col-first even-row-color"><code>private static class </code></div> |
| <div class="col-second even-row-color"><code><a href="HFileArchiver.FileStatusConverter.html" class="type-name-link" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.FileStatusConverter</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Convert a FileStatus to something we can manage in the archiving</div> |
| </div> |
| <div class="col-first odd-row-color"><code>private static class </code></div> |
| <div class="col-second odd-row-color"><code><a href="HFileArchiver.StoreToFile.html" class="type-name-link" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.StoreToFile</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Convert the <a href="../regionserver/HStoreFile.html" title="class in org.apache.hadoop.hbase.regionserver"><code>HStoreFile</code></a> into something we can manage in the archive methods</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <li> |
| <section class="field-summary" id="field-summary"> |
| <h2>Field Summary</h2> |
| <div class="caption"><span>Fields</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Field</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>private static <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/ThreadPoolExecutor.html" title="class or interface in java.util.concurrent" class="external-link">ThreadPoolExecutor</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#archiveExecutor" class="member-name-link">archiveExecutor</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>private static final int</code></div> |
| <div class="col-second odd-row-color"><code><a href="#DEFAULT_RETRIES_NUMBER" class="member-name-link">DEFAULT_RETRIES_NUMBER</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Number of retries in case of fs operation failure</div> |
| </div> |
| <div class="col-first even-row-color"><code>private static final <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/Function.html" title="class or interface in java.util.function" class="external-link">Function</a><<a href="HFileArchiver.File.html" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.File</a>,<wbr>org.apache.hadoop.fs.Path></code></div> |
| <div class="col-second even-row-color"><code><a href="#FUNC_FILE_TO_PATH" class="member-name-link">FUNC_FILE_TO_PATH</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>private static final org.slf4j.Logger</code></div> |
| <div class="col-second odd-row-color"><code><a href="#LOG" class="member-name-link">LOG</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| <div class="col-first even-row-color"><code>private static final <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#SEPARATOR" class="member-name-link">SEPARATOR</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| </div> |
| </section> |
| </li> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier</div> |
| <div class="table-header col-second">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>private </code></div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">HFileArchiver</a>()</code></div> |
| <div class="col-last even-row-color"> </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0"> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>private static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#archive(org.apache.hadoop.fs.FileSystem,org.apache.hadoop.hbase.client.RegionInfo,byte%5B%5D,java.util.Collection,org.apache.hadoop.fs.Path)" class="member-name-link">archive</a><wbr>(org.apache.hadoop.fs.FileSystem fs, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> regionInfo, |
| byte[] family, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="../regionserver/HStoreFile.html" title="class in org.apache.hadoop.hbase.regionserver">HStoreFile</a>> compactedFiles, |
| org.apache.hadoop.fs.Path storeArchiveDir)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#archiveFamily(org.apache.hadoop.fs.FileSystem,org.apache.hadoop.conf.Configuration,org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.fs.Path,byte%5B%5D)" class="member-name-link">archiveFamily</a><wbr>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.conf.Configuration conf, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> parent, |
| org.apache.hadoop.fs.Path tableDir, |
| byte[] family)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Remove from the specified region the store files of the specified column family, either by |
| archiving them or outright deletion</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#archiveFamilyByFamilyDir(org.apache.hadoop.fs.FileSystem,org.apache.hadoop.conf.Configuration,org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.fs.Path,byte%5B%5D)" class="member-name-link">archiveFamilyByFamilyDir</a><wbr>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.conf.Configuration conf, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> parent, |
| org.apache.hadoop.fs.Path familyDir, |
| byte[] family)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Removes from the specified region the store files of the specified column family, either by |
| archiving them or outright deletion</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#archiveRecoveredEdits(org.apache.hadoop.conf.Configuration,org.apache.hadoop.fs.FileSystem,org.apache.hadoop.hbase.client.RegionInfo,byte%5B%5D,java.util.Collection)" class="member-name-link">archiveRecoveredEdits</a><wbr>(org.apache.hadoop.conf.Configuration conf, |
| org.apache.hadoop.fs.FileSystem fs, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> regionInfo, |
| byte[] family, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="../regionserver/HStoreFile.html" title="class in org.apache.hadoop.hbase.regionserver">HStoreFile</a>> replayedEdits)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Archive recovered edits using existing logic for archiving store files.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#archiveRegion(org.apache.hadoop.conf.Configuration,org.apache.hadoop.fs.FileSystem,org.apache.hadoop.hbase.client.RegionInfo)" class="member-name-link">archiveRegion</a><wbr>(org.apache.hadoop.conf.Configuration conf, |
| org.apache.hadoop.fs.FileSystem fs, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> info)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Cleans up all the files for a HRegion by archiving the HFiles to the archive directory</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#archiveRegion(org.apache.hadoop.fs.FileSystem,org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path)" class="member-name-link">archiveRegion</a><wbr>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path rootdir, |
| org.apache.hadoop.fs.Path tableDir, |
| org.apache.hadoop.fs.Path regionDir)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Remove an entire region from the table directory via archiving the region's hfiles.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#archiveRegions(org.apache.hadoop.conf.Configuration,org.apache.hadoop.fs.FileSystem,org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path,java.util.List)" class="member-name-link">archiveRegions</a><wbr>(org.apache.hadoop.conf.Configuration conf, |
| org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path rootDir, |
| org.apache.hadoop.fs.Path tableDir, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><org.apache.hadoop.fs.Path> regionDirList)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Archive the specified regions in parallel.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#archiveStoreFile(org.apache.hadoop.conf.Configuration,org.apache.hadoop.fs.FileSystem,org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.fs.Path,byte%5B%5D,org.apache.hadoop.fs.Path)" class="member-name-link">archiveStoreFile</a><wbr>(org.apache.hadoop.conf.Configuration conf, |
| org.apache.hadoop.fs.FileSystem fs, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> regionInfo, |
| org.apache.hadoop.fs.Path tableDir, |
| byte[] family, |
| org.apache.hadoop.fs.Path storeFile)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Archive the store file</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#archiveStoreFiles(org.apache.hadoop.conf.Configuration,org.apache.hadoop.fs.FileSystem,org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.fs.Path,byte%5B%5D,java.util.Collection)" class="member-name-link">archiveStoreFiles</a><wbr>(org.apache.hadoop.conf.Configuration conf, |
| org.apache.hadoop.fs.FileSystem fs, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> regionInfo, |
| org.apache.hadoop.fs.Path tableDir, |
| byte[] family, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="../regionserver/HStoreFile.html" title="class in org.apache.hadoop.hbase.regionserver">HStoreFile</a>> compactedFiles)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Remove the store files, either by archiving them or outright deletion</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>private static boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#deleteRegionWithoutArchiving(org.apache.hadoop.fs.FileSystem,org.apache.hadoop.fs.Path)" class="member-name-link">deleteRegionWithoutArchiving</a><wbr>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path regionDir)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Without regard for backup, delete a region.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>private static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#deleteStoreFilesWithoutArchiving(java.util.Collection)" class="member-name-link">deleteStoreFilesWithoutArchiving</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="../regionserver/HStoreFile.html" title="class in org.apache.hadoop.hbase.regionserver">HStoreFile</a>> compactedFiles)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Just do a simple delete of the given store files</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#exists(org.apache.hadoop.conf.Configuration,org.apache.hadoop.fs.FileSystem,org.apache.hadoop.hbase.client.RegionInfo)" class="member-name-link">exists</a><wbr>(org.apache.hadoop.conf.Configuration conf, |
| org.apache.hadoop.fs.FileSystem fs, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> info)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns True if the Region exits in the filesystem.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>private static <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/ThreadPoolExecutor.html" title="class or interface in java.util.concurrent" class="external-link">ThreadPoolExecutor</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getArchiveExecutor(org.apache.hadoop.conf.Configuration)" class="member-name-link">getArchiveExecutor</a><wbr>(org.apache.hadoop.conf.Configuration conf)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>private static <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/ThreadFactory.html" title="class or interface in java.util.concurrent" class="external-link">ThreadFactory</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getThreadFactory()" class="member-name-link">getThreadFactory</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>private static <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="HFileArchiver.File.html" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.File</a>></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#resolveAndArchive(org.apache.hadoop.fs.FileSystem,org.apache.hadoop.fs.Path,java.util.Collection,long)" class="member-name-link">resolveAndArchive</a><wbr>(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path baseArchiveDir, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="HFileArchiver.File.html" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.File</a>> toArchive, |
| long start)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Resolve any conflict with an existing archive file via timestamp-append renaming of the |
| existing file and then archive the passed in files.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>private static boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#resolveAndArchiveFile(org.apache.hadoop.fs.Path,org.apache.hadoop.hbase.backup.HFileArchiver.File,java.lang.String)" class="member-name-link">resolveAndArchiveFile</a><wbr>(org.apache.hadoop.fs.Path archiveDir, |
| <a href="HFileArchiver.File.html" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.File</a> currentFile, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> archiveStartTime)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Attempt to archive the passed in file to the archive directory.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <li> |
| <section class="field-details" id="field-detail"> |
| <h2>Field Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="LOG"> |
| <h3>LOG</h3> |
| <div class="member-signature"><span class="modifiers">private static final</span> <span class="return-type">org.slf4j.Logger</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-64">LOG</a></span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="SEPARATOR"> |
| <h3>SEPARATOR</h3> |
| <div class="member-signature"><span class="modifiers">private static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-65">SEPARATOR</a></span></div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.backup.HFileArchiver.SEPARATOR">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="DEFAULT_RETRIES_NUMBER"> |
| <h3>DEFAULT_RETRIES_NUMBER</h3> |
| <div class="member-signature"><span class="modifiers">private static final</span> <span class="return-type">int</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-68">DEFAULT_RETRIES_NUMBER</a></span></div> |
| <div class="block">Number of retries in case of fs operation failure</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.backup.HFileArchiver.DEFAULT_RETRIES_NUMBER">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="FUNC_FILE_TO_PATH"> |
| <h3>FUNC_FILE_TO_PATH</h3> |
| <div class="member-signature"><span class="modifiers">private static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/Function.html" title="class or interface in java.util.function" class="external-link">Function</a><<a href="HFileArchiver.File.html" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.File</a>,<wbr>org.apache.hadoop.fs.Path></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-70">FUNC_FILE_TO_PATH</a></span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="archiveExecutor"> |
| <h3>archiveExecutor</h3> |
| <div class="member-signature"><span class="modifiers">private static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/ThreadPoolExecutor.html" title="class or interface in java.util.concurrent" class="external-link">ThreadPoolExecutor</a></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-77">archiveExecutor</a></span></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>HFileArchiver</h3> |
| <div class="member-signature"><span class="modifiers">private</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-79">HFileArchiver</a></span>()</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="exists(org.apache.hadoop.conf.Configuration,org.apache.hadoop.fs.FileSystem,org.apache.hadoop.hbase.client.RegionInfo)"> |
| <h3>exists</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-84">exists</a></span><wbr><span class="parameters">(org.apache.hadoop.conf.Configuration conf, |
| org.apache.hadoop.fs.FileSystem fs, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> info)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Returns True if the Region exits in the filesystem.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="archiveRegion(org.apache.hadoop.conf.Configuration,org.apache.hadoop.fs.FileSystem,org.apache.hadoop.hbase.client.RegionInfo)"> |
| <h3>archiveRegion</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-97">archiveRegion</a></span><wbr><span class="parameters">(org.apache.hadoop.conf.Configuration conf, |
| org.apache.hadoop.fs.FileSystem fs, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> info)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Cleans up all the files for a HRegion by archiving the HFiles to the archive directory</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>conf</code> - the configuration to use</dd> |
| <dd><code>fs</code> - the file system object</dd> |
| <dd><code>info</code> - RegionInfo for region to be deleted</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="archiveRegion(org.apache.hadoop.fs.FileSystem,org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path)"> |
| <h3>archiveRegion</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-116">archiveRegion</a></span><wbr><span class="parameters">(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path rootdir, |
| org.apache.hadoop.fs.Path tableDir, |
| org.apache.hadoop.fs.Path regionDir)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Remove an entire region from the table directory via archiving the region's hfiles.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>fs</code> - <code>FileSystem</code> from which to remove the region</dd> |
| <dd><code>rootdir</code> - <code>Path</code> to the root directory where hbase files are stored (for building |
| the archive path)</dd> |
| <dd><code>tableDir</code> - <code>Path</code> to where the table is being stored (for building the archive |
| path)</dd> |
| <dd><code>regionDir</code> - <code>Path</code> to where a region is being stored (for building the archive path)</dd> |
| <dt>Returns:</dt> |
| <dd><tt>true</tt> if the region was successfully deleted. <tt>false</tt> if the filesystem |
| operations could not complete.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if the request cannot be completed</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="archiveRegions(org.apache.hadoop.conf.Configuration,org.apache.hadoop.fs.FileSystem,org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path,java.util.List)"> |
| <h3>archiveRegions</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-184">archiveRegions</a></span><wbr><span class="parameters">(org.apache.hadoop.conf.Configuration conf, |
| org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path rootDir, |
| org.apache.hadoop.fs.Path tableDir, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><org.apache.hadoop.fs.Path> regionDirList)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Archive the specified regions in parallel.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>conf</code> - the configuration to use</dd> |
| <dd><code>fs</code> - <code>FileSystem</code> from which to remove the region</dd> |
| <dd><code>rootDir</code> - <code>Path</code> to the root directory where hbase files are stored (for |
| building the archive path)</dd> |
| <dd><code>tableDir</code> - <code>Path</code> to where the table is being stored (for building the archive |
| path)</dd> |
| <dd><code>regionDirList</code> - <code>Path</code> to where regions are being stored (for building the archive |
| path)</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if the request cannot be completed</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getArchiveExecutor(org.apache.hadoop.conf.Configuration)"> |
| <h3>getArchiveExecutor</h3> |
| <div class="member-signature"><span class="modifiers">private static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/ThreadPoolExecutor.html" title="class or interface in java.util.concurrent" class="external-link">ThreadPoolExecutor</a></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-205">getArchiveExecutor</a></span><wbr><span class="parameters">(org.apache.hadoop.conf.Configuration conf)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getThreadFactory()"> |
| <h3>getThreadFactory</h3> |
| <div class="member-signature"><span class="modifiers">private static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/ThreadFactory.html" title="class or interface in java.util.concurrent" class="external-link">ThreadFactory</a></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-221">getThreadFactory</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="archiveFamily(org.apache.hadoop.fs.FileSystem,org.apache.hadoop.conf.Configuration,org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.fs.Path,byte[])"> |
| <h3>archiveFamily</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-245">archiveFamily</a></span><wbr><span class="parameters">(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.conf.Configuration conf, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> parent, |
| org.apache.hadoop.fs.Path tableDir, |
| byte[] family)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Remove from the specified region the store files of the specified column family, either by |
| archiving them or outright deletion</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>fs</code> - the filesystem where the store files live</dd> |
| <dd><code>conf</code> - <code>Configuration</code> to examine to determine the archive directory</dd> |
| <dd><code>parent</code> - Parent region hosting the store files</dd> |
| <dd><code>tableDir</code> - <code>Path</code> to where the table is being stored (for building the archive path)</dd> |
| <dd><code>family</code> - the family hosting the store files</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if the files could not be correctly disposed.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="archiveFamilyByFamilyDir(org.apache.hadoop.fs.FileSystem,org.apache.hadoop.conf.Configuration,org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.fs.Path,byte[])"> |
| <h3>archiveFamilyByFamilyDir</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-261">archiveFamilyByFamilyDir</a></span><wbr><span class="parameters">(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.conf.Configuration conf, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> parent, |
| org.apache.hadoop.fs.Path familyDir, |
| byte[] family)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Removes from the specified region the store files of the specified column family, either by |
| archiving them or outright deletion</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>fs</code> - the filesystem where the store files live</dd> |
| <dd><code>conf</code> - <code>Configuration</code> to examine to determine the archive directory</dd> |
| <dd><code>parent</code> - Parent region hosting the store files</dd> |
| <dd><code>familyDir</code> - <code>Path</code> to where the family is being stored</dd> |
| <dd><code>family</code> - the family hosting the store files</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if the files could not be correctly disposed.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="archiveStoreFiles(org.apache.hadoop.conf.Configuration,org.apache.hadoop.fs.FileSystem,org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.fs.Path,byte[],java.util.Collection)"> |
| <h3>archiveStoreFiles</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-296">archiveStoreFiles</a></span><wbr><span class="parameters">(org.apache.hadoop.conf.Configuration conf, |
| org.apache.hadoop.fs.FileSystem fs, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> regionInfo, |
| org.apache.hadoop.fs.Path tableDir, |
| byte[] family, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="../regionserver/HStoreFile.html" title="class in org.apache.hadoop.hbase.regionserver">HStoreFile</a>> compactedFiles)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Remove the store files, either by archiving them or outright deletion</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>conf</code> - <code>Configuration</code> to examine to determine the archive directory</dd> |
| <dd><code>fs</code> - the filesystem where the store files live</dd> |
| <dd><code>regionInfo</code> - <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client"><code>RegionInfo</code></a> of the region hosting the store files</dd> |
| <dd><code>family</code> - the family hosting the store files</dd> |
| <dd><code>compactedFiles</code> - files to be disposed of. No further reading of these files should be |
| attempted; otherwise likely to cause an <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link"><code>IOException</code></a></dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if the files could not be correctly disposed.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="archiveRecoveredEdits(org.apache.hadoop.conf.Configuration,org.apache.hadoop.fs.FileSystem,org.apache.hadoop.hbase.client.RegionInfo,byte[],java.util.Collection)"> |
| <h3>archiveRecoveredEdits</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-316">archiveRecoveredEdits</a></span><wbr><span class="parameters">(org.apache.hadoop.conf.Configuration conf, |
| org.apache.hadoop.fs.FileSystem fs, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> regionInfo, |
| byte[] family, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="../regionserver/HStoreFile.html" title="class in org.apache.hadoop.hbase.regionserver">HStoreFile</a>> replayedEdits)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Archive recovered edits using existing logic for archiving store files. This is currently only |
| relevant when <b>hbase.region.archive.recovered.edits</b> is true, as recovered edits shouldn't |
| be kept after replay. In theory, we could use very same method available for archiving store |
| files, but supporting WAL dir and store files on different FileSystems added the need for extra |
| validation of the passed FileSystem instance and the path where the archiving edits should be |
| placed.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>conf</code> - <code>Configuration</code> to determine the archive directory.</dd> |
| <dd><code>fs</code> - the filesystem used for storing WAL files.</dd> |
| <dd><code>regionInfo</code> - <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client"><code>RegionInfo</code></a> a pseudo region representation for the archiving logic.</dd> |
| <dd><code>family</code> - a pseudo familiy representation for the archiving logic.</dd> |
| <dd><code>replayedEdits</code> - the recovered edits to be archived.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if files can't be achived due to some internal error.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="archive(org.apache.hadoop.fs.FileSystem,org.apache.hadoop.hbase.client.RegionInfo,byte[],java.util.Collection,org.apache.hadoop.fs.Path)"> |
| <h3>archive</h3> |
| <div class="member-signature"><span class="modifiers">private static</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-333">archive</a></span><wbr><span class="parameters">(org.apache.hadoop.fs.FileSystem fs, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> regionInfo, |
| byte[] family, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="../regionserver/HStoreFile.html" title="class in org.apache.hadoop.hbase.regionserver">HStoreFile</a>> compactedFiles, |
| org.apache.hadoop.fs.Path storeArchiveDir)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="archiveStoreFile(org.apache.hadoop.conf.Configuration,org.apache.hadoop.fs.FileSystem,org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.fs.Path,byte[],org.apache.hadoop.fs.Path)"> |
| <h3>archiveStoreFile</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-391">archiveStoreFile</a></span><wbr><span class="parameters">(org.apache.hadoop.conf.Configuration conf, |
| org.apache.hadoop.fs.FileSystem fs, |
| <a href="../client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a> regionInfo, |
| org.apache.hadoop.fs.Path tableDir, |
| byte[] family, |
| org.apache.hadoop.fs.Path storeFile)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Archive the store file</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>fs</code> - the filesystem where the store files live</dd> |
| <dd><code>regionInfo</code> - region hosting the store files</dd> |
| <dd><code>conf</code> - <code>Configuration</code> to examine to determine the archive directory</dd> |
| <dd><code>tableDir</code> - <code>Path</code> to where the table is being stored (for building the archive |
| path)</dd> |
| <dd><code>family</code> - the family hosting the store files</dd> |
| <dd><code>storeFile</code> - file to be archived</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if the files could not be correctly disposed.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="resolveAndArchive(org.apache.hadoop.fs.FileSystem,org.apache.hadoop.fs.Path,java.util.Collection,long)"> |
| <h3>resolveAndArchive</h3> |
| <div class="member-signature"><span class="modifiers">private static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="HFileArchiver.File.html" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.File</a>></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-422">resolveAndArchive</a></span><wbr><span class="parameters">(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path baseArchiveDir, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="HFileArchiver.File.html" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.File</a>> toArchive, |
| long start)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Resolve any conflict with an existing archive file via timestamp-append renaming of the |
| existing file and then archive the passed in files.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>fs</code> - <code>FileSystem</code> on which to archive the files</dd> |
| <dd><code>baseArchiveDir</code> - base archive directory to store the files. If any of the files to archive |
| are directories, will append the name of the directory to the base |
| archive directory name, creating a parallel structure.</dd> |
| <dd><code>toArchive</code> - files/directories that need to be archvied</dd> |
| <dd><code>start</code> - time the archiving started - used for resolving archive conflicts.</dd> |
| <dt>Returns:</dt> |
| <dd>the list of failed to archive files.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if an unexpected file operation exception occurred</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="resolveAndArchiveFile(org.apache.hadoop.fs.Path,org.apache.hadoop.hbase.backup.HFileArchiver.File,java.lang.String)"> |
| <h3>resolveAndArchiveFile</h3> |
| <div class="member-signature"><span class="modifiers">private static</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-482">resolveAndArchiveFile</a></span><wbr><span class="parameters">(org.apache.hadoop.fs.Path archiveDir, |
| <a href="HFileArchiver.File.html" title="class in org.apache.hadoop.hbase.backup">HFileArchiver.File</a> currentFile, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> archiveStartTime)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Attempt to archive the passed in file to the archive directory. |
| <p> |
| If the same file already exists in the archive, it is moved to a timestamped directory under |
| the archive directory and the new file is put in its place.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>archiveDir</code> - <code>Path</code> to the directory that stores the archives of the hfiles</dd> |
| <dd><code>currentFile</code> - <code>Path</code> to the original HFile that will be archived</dd> |
| <dd><code>archiveStartTime</code> - time the archiving started, to resolve naming conflicts</dd> |
| <dt>Returns:</dt> |
| <dd><tt>true</tt> if the file is successfully archived. <tt>false</tt> if there was a |
| problem, but the operation still completed.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - on failure to complete <code>FileSystem</code> operations.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="deleteRegionWithoutArchiving(org.apache.hadoop.fs.FileSystem,org.apache.hadoop.fs.Path)"> |
| <h3>deleteRegionWithoutArchiving</h3> |
| <div class="member-signature"><span class="modifiers">private static</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-607">deleteRegionWithoutArchiving</a></span><wbr><span class="parameters">(org.apache.hadoop.fs.FileSystem fs, |
| org.apache.hadoop.fs.Path regionDir)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Without regard for backup, delete a region. Should be used with caution.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>regionDir</code> - <code>Path</code> to the region to be deleted.</dd> |
| <dd><code>fs</code> - FileSystem from which to delete the region</dd> |
| <dt>Returns:</dt> |
| <dd><tt>true</tt> on successful deletion, <tt>false</tt> otherwise</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - on filesystem operation failure</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="deleteStoreFilesWithoutArchiving(java.util.Collection)"> |
| <h3>deleteStoreFilesWithoutArchiving</h3> |
| <div class="member-signature"><span class="modifiers">private static</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/backup/HFileArchiver.html#line-626">deleteStoreFilesWithoutArchiving</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="../regionserver/HStoreFile.html" title="class in org.apache.hadoop.hbase.regionserver">HStoreFile</a>> compactedFiles)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Just do a simple delete of the given store files |
| <p> |
| A best effort is made to delete each of the files, rather than bailing on the first failure. |
| <p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>compactedFiles</code> - store files to delete from the file system.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if a file cannot be deleted. All files will be attempted to deleted before |
| throwing the exception, rather than failing at the first file.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2007–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |