Package org.apache.hadoop.hbase
Class IntegrationTestMobCompaction
java.lang.Object
org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.IntegrationTestBase
org.apache.hadoop.hbase.IntegrationTestMobCompaction
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,org.apache.hadoop.util.Tool
An integration test to detect regressions in HBASE-22749. Test creates MOB-enabled table, and
runs in parallel, the following tasks: loads data, runs MOB compactions, runs MOB cleaning chore.
The failure injections into MOB compaction cycle is implemented via specific sub-class of
DefaultMobStoreCompactor - FaultyMobStoreCompactor. The probability of failure is controlled by
command-line argument 'failprob'.
- See Also:
-
- HBASE-22749
Sample usage:
hbase org.apache.hadoop.hbase.IntegrationTestMobCompaction -Dservers=10 -Drows=1000000 -Dfailprob=0.2
- HBASE-22749
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
(package private) static class
(package private) class
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.util.AbstractHBaseTool.OptionsOrderComparator
-
Field Summary
Modifier and TypeFieldDescriptionprivate static org.apache.hadoop.hbase.client.Admin
private static org.apache.hadoop.conf.Configuration
protected static final double
protected static final int
protected static final int
protected static final String
protected static double
protected static byte[]
protected static String
private static org.apache.hadoop.hbase.HColumnDescriptor
private static org.apache.hadoop.hbase.HTableDescriptor
protected static final org.slf4j.Logger
protected static long
protected static byte[]
protected static byte[]
protected static final String
protected static int
protected static final String
protected static long
private static boolean
private static org.apache.hadoop.hbase.client.Table
Fields inherited from class org.apache.hadoop.hbase.IntegrationTestBase
CHAOS_MONKEY_PROPS, monkey, MONKEY_LONG_OPT, monkeyProps, monkeyToUse, NO_CLUSTER_CLEANUP_LONG_OPT, noClusterCleanUp, util
Fields inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTool
cmdLineArgs, EXIT_FAILURE, EXIT_SUCCESS, LONG_HELP_OPTION, options, SHORT_HELP_OPTION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
private void
private void
Provides the name of the CFs that are protected from random Chaos monkey activity (alter)private long
getNumberOfMobFiles
(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, String family) org.apache.hadoop.hbase.TableName
Provides the name of the table that is protected from random Chaos monkey activityprivate static void
initConf
(org.apache.hadoop.conf.Configuration conf) static void
void
printStats
(long loaded) protected void
processOptions
(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd) int
Returns status of CLI executionprivate void
void
setUp()
void
void
void
tearDown()
void
Methods inherited from class org.apache.hadoop.hbase.IntegrationTestBase
cleanUp, cleanUpCluster, cleanUpMonkey, cleanUpMonkey, doWork, getConf, getDefaultMonkeyFactory, getTestingUtil, loadMonkeyProperties, processBaseOptions, startMonkey
Methods inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTool
addOption, addOptNoArg, addOptNoArg, addOptWithArg, addOptWithArg, addRequiredOption, addRequiredOptWithArg, addRequiredOptWithArg, doStaticMain, getOptionAsDouble, getOptionAsInt, getOptionAsInt, getOptionAsLong, getOptionAsLong, newParser, parseArgs, parseInt, parseLong, printUsage, printUsage, processOldArgs, run, setConf
-
Field Details
-
LOG
-
REGIONSERVER_COUNT_KEY
- See Also:
-
ROWS_COUNT_KEY
- See Also:
-
FAILURE_PROB_KEY
- See Also:
-
DEFAULT_REGIONSERVER_COUNT
- See Also:
-
DEFAULT_ROWS_COUNT
- See Also:
-
DEFAULT_FAILURE_PROB
- See Also:
-
regionServerCount
-
rowsToLoad
-
failureProb
-
famStr
-
fam
-
qualifier
-
mobLen
-
mobVal
-
conf
-
hdt
-
hcd
-
admin
-
table
-
run
-
-
Constructor Details
-
IntegrationTestMobCompaction
public IntegrationTestMobCompaction()
-
-
Method Details
-
setUp
- Overrides:
setUp
in classIntegrationTestBase
- Throws:
Exception
-
createTestTable
- Throws:
IOException
-
tearDown
- Throws:
IOException
-
setUpMonkey
- Overrides:
setUpMonkey
in classIntegrationTestBase
- Throws:
Exception
-
deleteTablesIfAny
- Throws:
IOException
-
setUpCluster
- Specified by:
setUpCluster
in classIntegrationTestBase
- Throws:
Exception
-
runTestFromCommandLine
Returns status of CLI execution- Specified by:
runTestFromCommandLine
in classIntegrationTestBase
- Throws:
Exception
-
getTablename
Description copied from class:IntegrationTestBase
Provides the name of the table that is protected from random Chaos monkey activity- Specified by:
getTablename
in classIntegrationTestBase
- Returns:
- table to not delete.
-
getColumnFamilies
Description copied from class:IntegrationTestBase
Provides the name of the CFs that are protected from random Chaos monkey activity (alter)- Specified by:
getColumnFamilies
in classIntegrationTestBase
- Returns:
- set of cf names to protect.
-
addOptions
- Overrides:
addOptions
in classIntegrationTestBase
-
processOptions
- Overrides:
processOptions
in classIntegrationTestBase
-
initConf
-
testMobCompaction
- Throws:
InterruptedException
IOException
-
getNumberOfMobFiles
private long getNumberOfMobFiles(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, String family) throws IOException - Throws:
IOException
-
printStats
-
scanTable
-
main
- Throws:
Exception
-