Package org.apache.hadoop.hbase.test
Class IntegrationTestLoadAndVerify
java.lang.Object
org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.IntegrationTestBase
org.apache.hadoop.hbase.test.IntegrationTestLoadAndVerify
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable,- org.apache.hadoop.util.Tool
- Direct Known Subclasses:
- IntegrationTestWithCellVisibilityLoadAndVerify
A large test which loads a lot of data that has internal references, and verifies the data. In
 load step, 200 map tasks are launched, which in turn write loadmapper.num_to_write (default 100K)
 rows to an hbase table. Rows are written in blocks, for a total of 100 blocks. Each row in a
 block, contains loadmapper.backrefs (default 50) references to random rows in the prev block.
 Verify step is scans the table, and verifies that for every referenced row, the row is actually
 there (no data loss). Failed rows are output from reduce to be saved in the job output dir in
 hdfs and inspected later. This class can be run as a unit test, as an integration test, or from
 the command line Originally taken from Apache Bigtop.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprivate static enumstatic classstatic classstatic classstatic classTool to search missing rows in WALs and hfiles.Nested classes/interfaces inherited from class org.apache.hadoop.hbase.util.AbstractHBaseToolorg.apache.hadoop.hbase.util.AbstractHBaseTool.OptionsOrderComparator
- 
Field SummaryFieldsModifier and TypeFieldDescription(package private) static final Stringprivate Stringprivate static final org.slf4j.Loggerprivate static final intprivate static final intprivate static final Stringprivate static final intprivate static final Stringprivate static final intprivate static final Stringprivate static final longprivate static final Stringprivate static final int(package private) static final Stringprivate static final Stringprivate static final Stringprivate static final byte[]private static final Stringprivate static final byte[]private StringFields inherited from class org.apache.hadoop.hbase.IntegrationTestBaseCHAOS_MONKEY_PROPS, monkey, MONKEY_LONG_OPT, monkeyProps, monkeyToUse, NO_CLUSTER_CLEANUP_LONG_OPT, noClusterCleanUp, utilFields inherited from class org.apache.hadoop.hbase.util.AbstractHBaseToolcmdLineArgs, conf, EXIT_FAILURE, EXIT_SUCCESS, LONG_HELP_OPTION, options, SHORT_HELP_OPTION
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidprotected org.apache.hadoop.mapreduce.JobdoLoad(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.TableDescriptor tableDescriptor) private intprotected voiddoVerify(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.TableDescriptor tableDescriptor) Provides the name of the CFs that are protected from random Chaos monkey activity (alter)org.apache.hadoop.hbase.TableNameProvides the name of the table that is protected from random Chaos monkey activityorg.apache.hadoop.fs.PathgetTestDir(String testName, String subdir) static voidvoidprotected voidprocessOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd) private static SortedSet<byte[]>readFileToSearch(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.FileStatus keyFileStatus, SortedSet<byte[]> result) (package private) static SortedSet<byte[]>readKeysToSearch(org.apache.hadoop.conf.Configuration conf) intprivate static voidsetJobScannerConf(org.apache.hadoop.mapreduce.Job job) protected voidsetMapperClass(org.apache.hadoop.mapreduce.Job job) voidstatic longswapLong(long value) Converts a "long" value between endian systems.voidMethods inherited from class org.apache.hadoop.hbase.IntegrationTestBaseaddOptions, cleanUp, cleanUpMonkey, cleanUpMonkey, doWork, getConf, getDefaultMonkeyFactory, getTestingUtil, loadMonkeyProperties, processBaseOptions, setUp, setUpMonkey, startMonkeyMethods inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTooladdOption, addOptNoArg, addOptNoArg, addOptWithArg, addOptWithArg, addRequiredOption, addRequiredOptWithArg, addRequiredOptWithArg, doStaticMain, getOptionAsDouble, getOptionAsInt, getOptionAsInt, getOptionAsLong, getOptionAsLong, newParser, parseArgs, parseInt, parseLong, printUsage, processOldArgs, run, setConf
- 
Field Details- 
LOG
- 
TEST_NAME- See Also:
 
- 
TEST_FAMILY
- 
TEST_QUALIFIER
- 
NUM_TO_WRITE_KEY- See Also:
 
- 
NUM_TO_WRITE_DEFAULT- See Also:
 
- 
TABLE_NAME_KEY- See Also:
 
- 
TABLE_NAME_DEFAULT- See Also:
 
- 
NUM_BACKREFS_KEY- See Also:
 
- 
NUM_BACKREFS_DEFAULT- See Also:
 
- 
NUM_MAP_TASKS_KEY- See Also:
 
- 
NUM_REDUCE_TASKS_KEY- See Also:
 
- 
NUM_MAP_TASKS_DEFAULT- See Also:
 
- 
NUM_REDUCE_TASKS_DEFAULT- See Also:
 
- 
SCANNER_CACHING- See Also:
 
- 
MISSING_ROWS_TO_LOG- See Also:
 
- 
toRun
- 
keysDir
- 
FOUND_GROUP_KEY- See Also:
 
- 
SEARCHER_INPUTDIR_KEY- See Also:
 
 
- 
- 
Constructor Details- 
IntegrationTestLoadAndVerifypublic IntegrationTestLoadAndVerify()
 
- 
- 
Method Details- 
setUpCluster- Specified by:
- setUpClusterin class- IntegrationTestBase
- Throws:
- Exception
 
- 
cleanUpCluster- Overrides:
- cleanUpClusterin class- IntegrationTestBase
- Throws:
- Exception
 
- 
swapLongConverts a "long" value between endian systems. Borrowed from Apache Commons IO- Parameters:
- value- value to convert
- Returns:
- the converted value
 
- 
doLoadprotected org.apache.hadoop.mapreduce.Job doLoad(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.TableDescriptor tableDescriptor) throws Exception - Throws:
- Exception
 
- 
setMapperClass
- 
doVerifyprotected void doVerify(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.TableDescriptor tableDescriptor) throws Exception - Throws:
- Exception
 
- 
readKeysToSearchstatic SortedSet<byte[]> readKeysToSearch(org.apache.hadoop.conf.Configuration conf) throws IOException, InterruptedException - Throws:
- IOException
- InterruptedException
 
- 
readFileToSearchprivate static SortedSet<byte[]> readFileToSearch(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.FileStatus keyFileStatus, SortedSet<byte[]> result) throws IOException, InterruptedException - Throws:
- IOException
- InterruptedException
 
- 
doSearch- Throws:
- Exception
 
- 
setJobScannerConf
- 
getTestDir- Throws:
- IOException
 
- 
testLoadAndVerify- Throws:
- Exception
 
- 
printUsage- Overrides:
- printUsagein class- org.apache.hadoop.hbase.util.AbstractHBaseTool
 
- 
processOptions- Overrides:
- processOptionsin class- IntegrationTestBase
 
- 
runTestFromCommandLine- Specified by:
- runTestFromCommandLinein class- IntegrationTestBase
- Throws:
- Exception
 
- 
getTablenameDescription copied from class:IntegrationTestBaseProvides the name of the table that is protected from random Chaos monkey activity- Specified by:
- getTablenamein class- IntegrationTestBase
- Returns:
- table to not delete.
 
- 
getColumnFamiliesDescription copied from class:IntegrationTestBaseProvides the name of the CFs that are protected from random Chaos monkey activity (alter)- Specified by:
- getColumnFamiliesin class- IntegrationTestBase
- Returns:
- set of cf names to protect.
 
- 
main- Throws:
- Exception
 
 
-