@InterfaceAudience.Public public class HBaseCommonTestingUtility extends Object
HBaseCommonTestingUtility
Modifier and Type | Field and Description |
---|---|
static String |
BASE_TEST_DIRECTORY_KEY
System property key to get base test directory value
|
static List<Object[]> |
BOOLEAN_PARAMETERIZED
This is for unit tests parameterized with a two booleans.
|
static Compression.Algorithm[] |
COMPRESSION_ALGORITHMS
Compression algorithms to use in testing
|
static List<Object[]> |
COMPRESSION_ALGORITHMS_PARAMETERIZED
Compression algorithms to use in parameterized JUnit 4 tests
|
protected org.apache.hadoop.conf.Configuration |
conf |
static String |
DEFAULT_BASE_TEST_DIRECTORY
Default base directory for test output.
|
protected static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
HBaseCommonTestingUtility() |
HBaseCommonTestingUtility(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
boolean |
cleanupTestDir() |
protected void |
createSubDir(String propertyName,
org.apache.hadoop.fs.Path parent,
String subDirName) |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Returns this classes's instance of
Configuration . |
org.apache.hadoop.fs.Path |
getDataTestDir() |
org.apache.hadoop.fs.Path |
getDataTestDir(String name) |
org.apache.hadoop.fs.Path |
getRandomDir() |
static UUID |
getRandomUUID() |
static int |
randomFreePort() |
protected org.apache.hadoop.fs.Path |
setupDataTestDir()
Sets up a directory for a test to use.
|
<E extends Exception> |
waitFor(long timeout,
long interval,
boolean failIfTimeout,
Waiter.Predicate<E> predicate)
Wrapper method for
Waiter.waitFor(Configuration, long, long, boolean, Predicate) . |
<E extends Exception> |
waitFor(long timeout,
long interval,
Waiter.Predicate<E> predicate)
Wrapper method for
Waiter.waitFor(Configuration, long, long, Predicate) . |
<E extends Exception> |
waitFor(long timeout,
Waiter.Predicate<E> predicate)
Wrapper method for
Waiter.waitFor(Configuration, long, Predicate) . |
protected static final org.slf4j.Logger LOG
public static final List<Object[]> COMPRESSION_ALGORITHMS_PARAMETERIZED
public static final List<Object[]> BOOLEAN_PARAMETERIZED
public static final Compression.Algorithm[] COMPRESSION_ALGORITHMS
protected final org.apache.hadoop.conf.Configuration conf
public static final String BASE_TEST_DIRECTORY_KEY
public static final String DEFAULT_BASE_TEST_DIRECTORY
public HBaseCommonTestingUtility()
public HBaseCommonTestingUtility(org.apache.hadoop.conf.Configuration conf)
public org.apache.hadoop.conf.Configuration getConfiguration()
Configuration
.public org.apache.hadoop.fs.Path getDataTestDir()
public org.apache.hadoop.fs.Path getDataTestDir(String name)
name
- the name of a subdirectory or file in the test data directorygetDataTestDir()
. Does *NOT* create the directory or file if it does not exist.protected org.apache.hadoop.fs.Path setupDataTestDir()
public org.apache.hadoop.fs.Path getRandomDir()
getBaseTestDir()
public static UUID getRandomUUID()
protected void createSubDir(String propertyName, org.apache.hadoop.fs.Path parent, String subDirName)
public boolean cleanupTestDir()
public <E extends Exception> long waitFor(long timeout, Waiter.Predicate<E> predicate) throws E extends Exception
Waiter.waitFor(Configuration, long, Predicate)
.E extends Exception
public <E extends Exception> long waitFor(long timeout, long interval, Waiter.Predicate<E> predicate) throws E extends Exception
Waiter.waitFor(Configuration, long, long, Predicate)
.E extends Exception
public <E extends Exception> long waitFor(long timeout, long interval, boolean failIfTimeout, Waiter.Predicate<E> predicate) throws E extends Exception
Waiter.waitFor(Configuration, long, long, boolean, Predicate)
.E extends Exception
public static int randomFreePort()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.