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
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static class(package private) classNested classes/interfaces inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.util.AbstractHBaseTool.OptionsOrderComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static org.apache.hadoop.hbase.client.Adminprivate static org.apache.hadoop.conf.Configurationprotected static final doubleprotected static final intprotected static final intprotected static final Stringprotected static doubleprotected static byte[]protected static Stringprivate static org.apache.hadoop.hbase.HColumnDescriptorprivate static org.apache.hadoop.hbase.HTableDescriptorprotected static final org.slf4j.Loggerprotected static longprotected static byte[]protected static byte[]protected static final Stringprotected static intprotected static final Stringprotected static longprivate static booleanprivate static org.apache.hadoop.hbase.client.TableFields inherited from class org.apache.hadoop.hbase.IntegrationTestBase
CHAOS_MONKEY_PROPS, monkey, MONKEY_LONG_OPT, monkeyProps, monkeyToUse, NO_CLUSTER_CLEANUP_LONG_OPT, noClusterCleanUp, utilFields inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTool
cmdLineArgs, EXIT_FAILURE, EXIT_SUCCESS, LONG_HELP_OPTION, options, SHORT_HELP_OPTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprivate voidprivate voidProvides the name of the CFs that are protected from random Chaos monkey activity (alter)private longgetNumberOfMobFiles(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, String family) org.apache.hadoop.hbase.TableNameProvides the name of the table that is protected from random Chaos monkey activityprivate static voidinitConf(org.apache.hadoop.conf.Configuration conf) static voidvoidprintStats(long loaded) protected voidprocessOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd) intReturns status of CLI executionprivate voidvoidsetUp()voidvoidvoidtearDown()voidMethods inherited from class org.apache.hadoop.hbase.IntegrationTestBase
cleanUp, cleanUpCluster, cleanUpMonkey, cleanUpMonkey, doWork, getConf, getDefaultMonkeyFactory, getTestingUtil, loadMonkeyProperties, processBaseOptions, startMonkeyMethods 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:
setUpin classIntegrationTestBase- Throws:
Exception
-
createTestTable
- Throws:
IOException
-
tearDown
- Throws:
IOException
-
setUpMonkey
- Overrides:
setUpMonkeyin classIntegrationTestBase- Throws:
Exception
-
deleteTablesIfAny
- Throws:
IOException
-
setUpCluster
- Specified by:
setUpClusterin classIntegrationTestBase- Throws:
Exception
-
runTestFromCommandLine
Returns status of CLI execution- Specified by:
runTestFromCommandLinein classIntegrationTestBase- Throws:
Exception
-
getTablename
Description copied from class:IntegrationTestBaseProvides the name of the table that is protected from random Chaos monkey activity- Specified by:
getTablenamein classIntegrationTestBase- Returns:
- table to not delete.
-
getColumnFamilies
Description copied from class:IntegrationTestBaseProvides the name of the CFs that are protected from random Chaos monkey activity (alter)- Specified by:
getColumnFamiliesin classIntegrationTestBase- Returns:
- set of cf names to protect.
-
addOptions
- Overrides:
addOptionsin classIntegrationTestBase
-
processOptions
- Overrides:
processOptionsin classIntegrationTestBase
-
initConf
-
testMobCompaction
- Throws:
InterruptedExceptionIOException
-
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
-