Class TestImportTSVWithVisibilityLabels
java.lang.Object
org.apache.hadoop.hbase.mapreduce.TestImportTSVWithVisibilityLabels
- All Implemented Interfaces:
 org.apache.hadoop.conf.Configurable
public class TestImportTSVWithVisibilityLabels
extends Object
implements org.apache.hadoop.conf.Configurable
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static org.apache.hadoop.conf.Configurationprivate static final Stringprotected static final StringDelete the tmp directory after running doMROnTableTest.private final Stringprotected static final StringForce use of combiner in doMROnTableTest.private static final org.slf4j.Loggerorg.junit.rules.TestNameprotected static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static org.apache.hadoop.hbase.security.Userprivate static final Stringprotected static HBaseTestingUtil - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprivate static voidprotected static org.apache.hadoop.util.TooldoMROnTableTest(HBaseTestingUtil util, String family, String data, String[] args, int valueMultiplier) protected static org.apache.hadoop.util.TooldoMROnTableTest(HBaseTestingUtil util, String family, String data, String[] args, int valueMultiplier, int expectedKVCount) Run an ImportTsv job and perform basic validation on the results.org.apache.hadoop.conf.ConfigurationgetConf()private static intgetKVCountFromHfile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p) Method returns the total KVs in given hfileprivate voidissueDeleteAndVerifyData(org.apache.hadoop.hbase.TableName tableName) static voidstatic voidvoidsetConf(org.apache.hadoop.conf.Configuration conf) voidvoidvoidvoidvoidvoidvoidprivate static voidvalidateHFiles(org.apache.hadoop.fs.FileSystem fs, String outputPath, String family, int expectedKVCount) Confirm ImportTsv via HFiles on fs.private static voidvalidateTable(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, String family, int valueMultiplier) Confirm ImportTsv via data in online table. 
- 
Field Details
- 
CLASS_RULE
 - 
LOG
 - 
NAME
 - 
util
 - 
DELETE_AFTER_LOAD_CONF
Delete the tmp directory after running doMROnTableTest. Boolean. Default is false. - 
FORCE_COMBINER_CONF
Force use of combiner in doMROnTableTest. Boolean. Default is true. - 
FAMILY
- See Also:
 
 - 
TOPSECRET
- See Also:
 
 - 
PUBLIC
- See Also:
 
 - 
PRIVATE
- See Also:
 
 - 
CONFIDENTIAL
- See Also:
 
 - 
SECRET
- See Also:
 
 - 
SUPERUSER
 - 
conf
 - 
name
 
 - 
 - 
Constructor Details
- 
TestImportTSVWithVisibilityLabels
public TestImportTSVWithVisibilityLabels() 
 - 
 - 
Method Details
- 
getConf
- Specified by:
 getConfin interfaceorg.apache.hadoop.conf.Configurable
 - 
setConf
- Specified by:
 setConfin interfaceorg.apache.hadoop.conf.Configurable
 - 
provisionCluster
- Throws:
 Exception
 - 
createLabels
- Throws:
 IOExceptionInterruptedException
 - 
releaseCluster
- Throws:
 Exception
 - 
testMROnTable
- Throws:
 Exception
 - 
testMROnTableWithDeletes
- Throws:
 Exception
 - 
issueDeleteAndVerifyData
private void issueDeleteAndVerifyData(org.apache.hadoop.hbase.TableName tableName) throws IOException - Throws:
 IOException
 - 
testMROnTableWithBulkload
- Throws:
 Exception
 - 
testBulkOutputWithTsvImporterTextMapper
- Throws:
 Exception
 - 
testMRWithOutputFormat
- Throws:
 Exception
 - 
testBulkOutputWithInvalidLabels
- Throws:
 Exception
 - 
testBulkOutputWithTsvImporterTextMapperWithInvalidLabels
- Throws:
 Exception
 - 
doMROnTableTest
protected static org.apache.hadoop.util.Tool doMROnTableTest(HBaseTestingUtil util, String family, String data, String[] args, int valueMultiplier) throws Exception - Throws:
 Exception
 - 
doMROnTableTest
protected static org.apache.hadoop.util.Tool doMROnTableTest(HBaseTestingUtil util, String family, String data, String[] args, int valueMultiplier, int expectedKVCount) throws Exception Run an ImportTsv job and perform basic validation on the results. Returns the ImportTsvToolinstance so that other tests can inspect it for further validation as necessary. This method is static to insure non-reliance on instance's util/conf facilities. Any arguments to pass BEFORE inputFile path is appended.- Parameters:
 expectedKVCount- Expected KV count. pass -1 to skip the kvcount check- Returns:
 - The Tool instance used to run the test.
 - Throws:
 Exception
 - 
validateHFiles
private static void validateHFiles(org.apache.hadoop.fs.FileSystem fs, String outputPath, String family, int expectedKVCount) throws IOException Confirm ImportTsv via HFiles on fs.- Throws:
 IOException
 - 
validateTable
private static void validateTable(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, String family, int valueMultiplier) throws IOException Confirm ImportTsv via data in online table.- Throws:
 IOException
 - 
getKVCountFromHfile
private static int getKVCountFromHfile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p) throws IOException Method returns the total KVs in given hfile- Parameters:
 fs- File Systemp- HFile path- Returns:
 - KV count in the given hfile
 - Throws:
 IOException
 
 -