blob: 8c89236999d5c40e2e151601436ab5c7d0787400 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>HBaseCommonTestingUtil (Apache HBase 4.0.0-alpha-1-SNAPSHOT Test 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, class: HBaseCommonTestingUtil">
<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/HBaseCommonTestingUtil.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li><a href="#nested-class-summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.hadoop.hbase</a></div>
<h1 title="Class HBaseCommonTestingUtil" class="title">Class HBaseCommonTestingUtil</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.HBaseCommonTestingUtil</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="HBaseZKTestingUtil.html" title="class in org.apache.hadoop.hbase">HBaseZKTestingUtil</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="annotations">@LimitedPrivate("Phoenix")
@Evolving
</span><span class="modifiers">public class </span><span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-43">HBaseCommonTestingUtil</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">Common helpers for testing HBase that do not depend on specific server/etc. things.</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>(package private) static class&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="HBaseCommonTestingUtil.PortAllocator.html" class="type-name-link" title="class in org.apache.hadoop.hbase">HBaseCommonTestingUtil.PortAllocator</a></code></div>
<div class="col-last even-row-color">&nbsp;</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>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="#BASE_TEST_DIRECTORY_KEY" class="member-name-link">BASE_TEST_DIRECTORY_KEY</a></code></div>
<div class="col-last even-row-color">
<div class="block">System property key to get base test directory value</div>
</div>
<div class="col-first odd-row-color"><code>static final <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>&lt;<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>[]&gt;</code></div>
<div class="col-second odd-row-color"><code><a href="#BOOLEAN_PARAMETERIZED" class="member-name-link">BOOLEAN_PARAMETERIZED</a></code></div>
<div class="col-last odd-row-color">
<div class="block">This is for unit tests parameterized with a two booleans.</div>
</div>
<div class="col-first even-row-color"><code>static final org.apache.hadoop.hbase.io.compress.Compression.Algorithm[]</code></div>
<div class="col-second even-row-color"><code><a href="#COMPRESSION_ALGORITHMS" class="member-name-link">COMPRESSION_ALGORITHMS</a></code></div>
<div class="col-last even-row-color">
<div class="block">Compression algorithms to use in testing</div>
</div>
<div class="col-first odd-row-color"><code>static final <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>&lt;<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>[]&gt;</code></div>
<div class="col-second odd-row-color"><code><a href="#COMPRESSION_ALGORITHMS_PARAMETERIZED" class="member-name-link">COMPRESSION_ALGORITHMS_PARAMETERIZED</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Compression algorithms to use in parameterized JUnit 4 tests</div>
</div>
<div class="col-first even-row-color"><code>protected final org.apache.hadoop.conf.Configuration</code></div>
<div class="col-second even-row-color"><code><a href="#conf" class="member-name-link">conf</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>private <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/File.html" title="class or interface in java.io" class="external-link">File</a></code></div>
<div class="col-second odd-row-color"><code><a href="#dataTestDir" class="member-name-link">dataTestDir</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Directory where we put the data for this instance of HBaseTestingUtility</div>
</div>
<div class="col-first even-row-color"><code>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="#DEFAULT_BASE_TEST_DIRECTORY" class="member-name-link">DEFAULT_BASE_TEST_DIRECTORY</a></code></div>
<div class="col-last even-row-color">
<div class="block">Default base directory for test output.</div>
</div>
<div class="col-first odd-row-color"><code>protected static final org.slf4j.Logger</code></div>
<div class="col-second odd-row-color"><code><a href="#LOG" class="member-name-link">LOG</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>private static final <a href="HBaseCommonTestingUtil.PortAllocator.html" title="class in org.apache.hadoop.hbase">HBaseCommonTestingUtil.PortAllocator</a></code></div>
<div class="col-second even-row-color"><code><a href="#portAllocator" class="member-name-link">portAllocator</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">HBaseCommonTestingUtil</a>()</code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.hadoop.conf.Configuration)" class="member-name-link">HBaseCommonTestingUtil</a><wbr>(org.apache.hadoop.conf.Configuration&nbsp;conf)</code></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel" 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-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#cleanupTestDir()" class="member-name-link">cleanupTestDir</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns true if we removed the test dirs</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#cleanupTestDir(java.lang.String)" class="member-name-link">cleanupTestDir</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;subdir)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns true if we removed the test dir</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#createSubDir(java.lang.String,org.apache.hadoop.fs.Path,java.lang.String)" class="member-name-link">createSubDir</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;propertyName,
org.apache.hadoop.fs.Path&nbsp;parent,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;subDirName)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#deleteDir(java.io.File)" class="member-name-link">deleteDir</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/File.html" title="class or interface in java.io" class="external-link">File</a>&nbsp;dir)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns true if we deleted it.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#deleteOnExit()" class="member-name-link">deleteOnExit</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns true if we should delete testing dirs on exit.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private org.apache.hadoop.fs.Path</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getBaseTestDir()" class="member-name-link">getBaseTestDir</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns Where to write test data on local filesystem; usually
<a href="#DEFAULT_BASE_TEST_DIRECTORY"><code>DEFAULT_BASE_TEST_DIRECTORY</code></a> Should not be used by the unit tests, hence its's private.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>org.apache.hadoop.conf.Configuration</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getConfiguration()" class="member-name-link">getConfiguration</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns this classes's instance of <code>Configuration</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>org.apache.hadoop.fs.Path</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDataTestDir()" class="member-name-link">getDataTestDir</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns Where to write test data on local filesystem, specific to the test.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>org.apache.hadoop.fs.Path</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDataTestDir(java.lang.String)" class="member-name-link">getDataTestDir</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the path to a subdirectory or file named {code subdirName} under
<a href="#getDataTestDir()"><code>getDataTestDir()</code></a>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>org.apache.hadoop.fs.Path</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRandomDir()" class="member-name-link">getRandomDir</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a dir with a random (uuid) name under the test dir</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getRandomUUID()" class="member-name-link">getRandomUUID</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#randomFreePort()" class="member-name-link">randomFreePort</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected org.apache.hadoop.fs.Path</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setupDataTestDir()" class="member-name-link">setupDataTestDir</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets up a directory for a test to use.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>&lt;E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a>&gt;<br>long</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#waitFor(long,long,boolean,org.apache.hadoop.hbase.Waiter.Predicate)" class="member-name-link">waitFor</a><wbr>(long&nbsp;timeout,
long&nbsp;interval,
boolean&nbsp;failIfTimeout,
<a href="Waiter.Predicate.html" title="interface in org.apache.hadoop.hbase">Waiter.Predicate</a>&lt;E&gt;&nbsp;predicate)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Wrapper method for <a href="Waiter.html#waitFor(org.apache.hadoop.conf.Configuration,long,long,boolean,org.apache.hadoop.hbase.Waiter.Predicate)"><code>Waiter.waitFor(Configuration, long, long, boolean, Predicate)</code></a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>&lt;E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a>&gt;<br>long</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#waitFor(long,long,org.apache.hadoop.hbase.Waiter.Predicate)" class="member-name-link">waitFor</a><wbr>(long&nbsp;timeout,
long&nbsp;interval,
<a href="Waiter.Predicate.html" title="interface in org.apache.hadoop.hbase">Waiter.Predicate</a>&lt;E&gt;&nbsp;predicate)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Wrapper method for <a href="Waiter.html#waitFor(org.apache.hadoop.conf.Configuration,long,long,org.apache.hadoop.hbase.Waiter.Predicate)"><code>Waiter.waitFor(Configuration, long, long, Predicate)</code></a>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>&lt;E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a>&gt;<br>long</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#waitFor(long,org.apache.hadoop.hbase.Waiter.Predicate)" class="member-name-link">waitFor</a><wbr>(long&nbsp;timeout,
<a href="Waiter.Predicate.html" title="interface in org.apache.hadoop.hbase">Waiter.Predicate</a>&lt;E&gt;&nbsp;predicate)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Wrapper method for <a href="Waiter.html#waitFor(org.apache.hadoop.conf.Configuration,long,org.apache.hadoop.hbase.Waiter.Predicate)"><code>Waiter.waitFor(Configuration, long, Predicate)</code></a>.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#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">protected static final</span>&nbsp;<span class="return-type">org.slf4j.Logger</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-46">LOG</a></span></div>
</section>
</li>
<li>
<section class="detail" id="COMPRESSION_ALGORITHMS_PARAMETERIZED">
<h3>COMPRESSION_ALGORITHMS_PARAMETERIZED</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<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>&lt;<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>[]&gt;</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-51">COMPRESSION_ALGORITHMS_PARAMETERIZED</a></span></div>
<div class="block">Compression algorithms to use in parameterized JUnit 4 tests</div>
</section>
</li>
<li>
<section class="detail" id="BOOLEAN_PARAMETERIZED">
<h3>BOOLEAN_PARAMETERIZED</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<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>&lt;<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>[]&gt;</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-57">BOOLEAN_PARAMETERIZED</a></span></div>
<div class="block">This is for unit tests parameterized with a two booleans.</div>
</section>
</li>
<li>
<section class="detail" id="COMPRESSION_ALGORITHMS">
<h3>COMPRESSION_ALGORITHMS</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">org.apache.hadoop.hbase.io.compress.Compression.Algorithm[]</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-63">COMPRESSION_ALGORITHMS</a></span></div>
<div class="block">Compression algorithms to use in testing</div>
</section>
</li>
<li>
<section class="detail" id="conf">
<h3>conf</h3>
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type">org.apache.hadoop.conf.Configuration</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-66">conf</a></span></div>
</section>
</li>
<li>
<section class="detail" id="BASE_TEST_DIRECTORY_KEY">
<h3>BASE_TEST_DIRECTORY_KEY</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-87">BASE_TEST_DIRECTORY_KEY</a></span></div>
<div class="block">System property key to get base test directory value</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../constant-values.html#org.apache.hadoop.hbase.HBaseCommonTestingUtil.BASE_TEST_DIRECTORY_KEY">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="DEFAULT_BASE_TEST_DIRECTORY">
<h3>DEFAULT_BASE_TEST_DIRECTORY</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-92">DEFAULT_BASE_TEST_DIRECTORY</a></span></div>
<div class="block">Default base directory for test output.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../constant-values.html#org.apache.hadoop.hbase.HBaseCommonTestingUtil.DEFAULT_BASE_TEST_DIRECTORY">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="dataTestDir">
<h3>dataTestDir</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/File.html" title="class or interface in java.io" class="external-link">File</a></span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-97">dataTestDir</a></span></div>
<div class="block">Directory where we put the data for this instance of HBaseTestingUtility</div>
</section>
</li>
<li>
<section class="detail" id="portAllocator">
<h3>portAllocator</h3>
<div class="member-signature"><span class="modifiers">private static final</span>&nbsp;<span class="return-type"><a href="HBaseCommonTestingUtil.PortAllocator.html" title="class in org.apache.hadoop.hbase">HBaseCommonTestingUtil.PortAllocator</a></span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-258">portAllocator</a></span></div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>HBaseCommonTestingUtil</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-68">HBaseCommonTestingUtil</a></span>()</div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.apache.hadoop.conf.Configuration)">
<h3>HBaseCommonTestingUtil</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-72">HBaseCommonTestingUtil</a></span><wbr><span class="parameters">(org.apache.hadoop.conf.Configuration&nbsp;conf)</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="getConfiguration()">
<h3>getConfiguration</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">org.apache.hadoop.conf.Configuration</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-80">getConfiguration</a></span>()</div>
<div class="block">Returns this classes's instance of <code>Configuration</code>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Instance of Configuration.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDataTestDir()">
<h3>getDataTestDir</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">org.apache.hadoop.fs.Path</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-103">getDataTestDir</a></span>()</div>
<div class="block">Returns Where to write test data on local filesystem, specific to the test. Useful for tests
that do not use a cluster. Creates it if it does not exist already.</div>
</section>
</li>
<li>
<section class="detail" id="getDataTestDir(java.lang.String)">
<h3>getDataTestDir</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">org.apache.hadoop.fs.Path</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-115">getDataTestDir</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</span></div>
<div class="block">Returns the path to a subdirectory or file named {code subdirName} under
<a href="#getDataTestDir()"><code>getDataTestDir()</code></a>. Does *NOT* create the directory or file if it does not exist.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - the name of a subdirectory or file in the test data directory</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setupDataTestDir()">
<h3>setupDataTestDir</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">org.apache.hadoop.fs.Path</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-123">setupDataTestDir</a></span>()</div>
<div class="block">Sets up a directory for a test to use.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>New directory path, if created.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getRandomDir()">
<h3>getRandomDir</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">org.apache.hadoop.fs.Path</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-146">getRandomDir</a></span>()</div>
<div class="block">Returns a dir with a random (uuid) name under the test dir</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#getBaseTestDir()"><code>getBaseTestDir()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getRandomUUID()">
<h3>getRandomUUID</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a></span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-150">getRandomUUID</a></span>()</div>
</section>
</li>
<li>
<section class="detail" id="createSubDir(java.lang.String,org.apache.hadoop.fs.Path,java.lang.String)">
<h3>createSubDir</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-154">createSubDir</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;propertyName,
org.apache.hadoop.fs.Path&nbsp;parent,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;subDirName)</span></div>
</section>
</li>
<li>
<section class="detail" id="deleteOnExit()">
<h3>deleteOnExit</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-168">deleteOnExit</a></span>()</div>
<div class="block">Returns true if we should delete testing dirs on exit.</div>
</section>
</li>
<li>
<section class="detail" id="cleanupTestDir()">
<h3>cleanupTestDir</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-177">cleanupTestDir</a></span>()</div>
<div class="block">Returns true if we removed the test dirs</div>
</section>
</li>
<li>
<section class="detail" id="cleanupTestDir(java.lang.String)">
<h3>cleanupTestDir</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-189">cleanupTestDir</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;subdir)</span></div>
<div class="block">Returns true if we removed the test dir</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>subdir</code> - Test subdir name.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getBaseTestDir()">
<h3>getBaseTestDir</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">org.apache.hadoop.fs.Path</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-202">getBaseTestDir</a></span>()</div>
<div class="block">Returns Where to write test data on local filesystem; usually
<a href="#DEFAULT_BASE_TEST_DIRECTORY"><code>DEFAULT_BASE_TEST_DIRECTORY</code></a> Should not be used by the unit tests, hence its's private.
Unit test will use a subdirectory of this directory.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#setupDataTestDir()"><code>setupDataTestDir()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="deleteDir(java.io.File)">
<h3>deleteDir</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-212">deleteDir</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/File.html" title="class or interface in java.io" class="external-link">File</a>&nbsp;dir)</span></div>
<div class="block">Returns true if we deleted it.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>dir</code> - Directory to delete</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="waitFor(long,org.apache.hadoop.hbase.Waiter.Predicate)">
<h3>waitFor</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="type-parameters">&lt;E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a>&gt;</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-238">waitFor</a></span><wbr><span class="parameters">(long&nbsp;timeout,
<a href="Waiter.Predicate.html" title="interface in org.apache.hadoop.hbase">Waiter.Predicate</a>&lt;E&gt;&nbsp;predicate)</span>
throws <span class="exceptions">E</span></div>
<div class="block">Wrapper method for <a href="Waiter.html#waitFor(org.apache.hadoop.conf.Configuration,long,org.apache.hadoop.hbase.Waiter.Predicate)"><code>Waiter.waitFor(Configuration, long, Predicate)</code></a>.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code>E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="waitFor(long,long,org.apache.hadoop.hbase.Waiter.Predicate)">
<h3>waitFor</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="type-parameters">&lt;E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a>&gt;</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-245">waitFor</a></span><wbr><span class="parameters">(long&nbsp;timeout,
long&nbsp;interval,
<a href="Waiter.Predicate.html" title="interface in org.apache.hadoop.hbase">Waiter.Predicate</a>&lt;E&gt;&nbsp;predicate)</span>
throws <span class="exceptions">E</span></div>
<div class="block">Wrapper method for <a href="Waiter.html#waitFor(org.apache.hadoop.conf.Configuration,long,long,org.apache.hadoop.hbase.Waiter.Predicate)"><code>Waiter.waitFor(Configuration, long, long, Predicate)</code></a>.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code>E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="waitFor(long,long,boolean,org.apache.hadoop.hbase.Waiter.Predicate)">
<h3>waitFor</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="type-parameters">&lt;E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a>&gt;</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-253">waitFor</a></span><wbr><span class="parameters">(long&nbsp;timeout,
long&nbsp;interval,
boolean&nbsp;failIfTimeout,
<a href="Waiter.Predicate.html" title="interface in org.apache.hadoop.hbase">Waiter.Predicate</a>&lt;E&gt;&nbsp;predicate)</span>
throws <span class="exceptions">E</span></div>
<div class="block">Wrapper method for <a href="Waiter.html#waitFor(org.apache.hadoop.conf.Configuration,long,long,boolean,org.apache.hadoop.hbase.Waiter.Predicate)"><code>Waiter.waitFor(Configuration, long, long, boolean, Predicate)</code></a>.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code>E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="randomFreePort()">
<h3>randomFreePort</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/HBaseCommonTestingUtil.html#line-260">randomFreePort</a></span>()</div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2007&#x2013;2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>