Class IntegrationTestBulkLoad
java.lang.Object
org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.IntegrationTestBase
org.apache.hadoop.hbase.mapreduce.IntegrationTestBulkLoad
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,org.apache.hadoop.util.Tool
- Direct Known Subclasses:
IntegrationTestFileBasedSFTBulkLoad
Test Bulk Load and MR on a distributed cluster. It starts an MR job that creates linked chains
The format of rows is like this: Row Key -> Long L:<< Chain Id >> -> Row Key of the next link in
the chain S:<< Chain Id >> -> The step in the chain that his link is. D:<< Chain Id >> -> Random
Data. All chains start on row 0. All rk's are > 0. After creating the linked lists they are
walked over using a TableMapper based Mapreduce Job. There are a few options exposed:
hbase.IntegrationTestBulkLoad.chainLength The number of rows that will be part of each and every
chain. hbase.IntegrationTestBulkLoad.numMaps The number of mappers that will be run. Each mapper
creates on linked list chain. hbase.IntegrationTestBulkLoad.numImportRounds How many jobs will be
run to create linked lists. hbase.IntegrationTestBulkLoad.tableName The name of the table.
hbase.IntegrationTestBulkLoad.replicaCount How many region replicas to configure for the table
under test.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Comparator used to order linkKeys so that they are passed to a reducer in order.static class
static class
static class
static class
Writable used as the value emitted from a pass over the hbase table.static class
Mapper to pass over the table.static class
Class that does the actual checking of the links.static class
Mapper that creates a linked list of KeyValues.static class
Writable class used as the key to group links in the linked list.static class
Comparator used to figure out if a linkKey should be grouped together.static class
Class to figure out what partition to send a link in the chain to.static 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 final byte[]
private static int
private static String
private boolean
private static final byte[]
private boolean
private static final org.slf4j.Logger
private static int
private static String
private static int
private static String
private static int
private static String
private static final String
private static final String
private static String
private static final byte[]
private static String
private static String
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, conf, EXIT_FAILURE, EXIT_SUCCESS, LONG_HELP_OPTION, options, SHORT_HELP_OPTION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Provides the name of the CFs that are protected from random Chaos monkey activity (alter)private byte[][]
getSplits
(int numRegions) org.apache.hadoop.hbase.TableName
Provides the name of the table that is protected from random Chaos monkey activitystatic org.apache.hadoop.hbase.TableName
getTableName
(org.apache.hadoop.conf.Configuration conf) private void
Modify tablegetTableName()
to carryIntegrationTestBulkLoad.SlowMeCoproScanOperations
.static void
protected void
processOptions
(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd) private void
runCheck()
After adding data to the table start a mr job toprivate void
private void
runLinkedListMRJob
(int iteration) void
runLoad()
int
void
private void
void
Methods inherited from class org.apache.hadoop.hbase.IntegrationTestBase
cleanUp, cleanUpCluster, cleanUpMonkey, cleanUpMonkey, doWork, getConf, getDefaultMonkeyFactory, getTestingUtil, loadMonkeyProperties, processBaseOptions, setUp, setUpMonkey, 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
-
CHAIN_FAM
-
SORT_FAM
-
DATA_FAM
-
CHAIN_LENGTH_KEY
-
CHAIN_LENGTH
-
NUM_MAPS_KEY
-
NUM_MAPS
-
NUM_IMPORT_ROUNDS_KEY
-
NUM_IMPORT_ROUNDS
-
ROUND_NUM_KEY
-
TABLE_NAME_KEY
-
TABLE_NAME
-
NUM_REPLICA_COUNT_KEY
-
NUM_REPLICA_COUNT_DEFAULT
-
OPT_LOAD
- See Also:
-
OPT_CHECK
- See Also:
-
load
-
check
-
-
Constructor Details
-
IntegrationTestBulkLoad
public IntegrationTestBulkLoad()
-
-
Method Details
-
installSlowingCoproc
Modify tablegetTableName()
to carryIntegrationTestBulkLoad.SlowMeCoproScanOperations
.- Throws:
IOException
InterruptedException
-
testBulkLoad
- Throws:
Exception
-
runLoad
- Throws:
Exception
-
getSplits
-
setupTable
- Throws:
IOException
InterruptedException
-
runLinkedListMRJob
- Throws:
Exception
-
runCheckWithRetry
-
runCheck
After adding data to the table start a mr job to -
setUpCluster
- Specified by:
setUpCluster
in classIntegrationTestBase
- Throws:
Exception
-
addOptions
- Overrides:
addOptions
in classIntegrationTestBase
-
processOptions
- Overrides:
processOptions
in classIntegrationTestBase
-
runTestFromCommandLine
- 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.
-
getTableName
public static org.apache.hadoop.hbase.TableName getTableName(org.apache.hadoop.conf.Configuration conf) -
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.
-
main
- Throws:
Exception
-