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
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static org.apache.hadoop.conf.Configuration
private static final String
protected static final String
Delete the tmp directory after running doMROnTableTest.private final String
protected static final String
Force use of combiner in doMROnTableTest.private static final org.slf4j.Logger
org.junit.rules.TestName
protected static final String
private static final String
private static final String
private static final String
private static org.apache.hadoop.hbase.security.User
private static final String
protected static HBaseTestingUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
protected static org.apache.hadoop.util.Tool
doMROnTableTest
(HBaseTestingUtil util, String family, String data, String[] args, int valueMultiplier) protected static org.apache.hadoop.util.Tool
doMROnTableTest
(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.Configuration
getConf()
private static int
getKVCountFromHfile
(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p) Method returns the total KVs in given hfileprivate void
issueDeleteAndVerifyData
(org.apache.hadoop.hbase.TableName tableName) static void
static void
void
setConf
(org.apache.hadoop.conf.Configuration conf) void
void
void
void
void
void
void
private static void
validateHFiles
(org.apache.hadoop.fs.FileSystem fs, String outputPath, String family, int expectedKVCount) Confirm ImportTsv via HFiles on fs.private static void
validateTable
(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:
getConf
in interfaceorg.apache.hadoop.conf.Configurable
-
setConf
- Specified by:
setConf
in interfaceorg.apache.hadoop.conf.Configurable
-
provisionCluster
- Throws:
Exception
-
createLabels
- Throws:
IOException
InterruptedException
-
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 ImportTsvTool
instance 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
-