public class TestImportTSVWithVisibilityLabels extends Object implements org.apache.hadoop.conf.Configurable
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static org.apache.hadoop.conf.Configuration |
conf |
private static String |
CONFIDENTIAL |
protected static String |
DELETE_AFTER_LOAD_CONF
Delete the tmp directory after running doMROnTableTest.
|
private String |
FAMILY |
protected static String |
FORCE_COMBINER_CONF
Force use of combiner in doMROnTableTest.
|
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
protected static String |
NAME |
private static String |
PRIVATE |
private static String |
PUBLIC |
private static String |
SECRET |
private static org.apache.hadoop.hbase.security.User |
SUPERUSER |
private static String |
TOPSECRET |
protected static HBaseTestingUtility |
util |
Constructor and Description |
---|
TestImportTSVWithVisibilityLabels() |
Modifier and Type | Method and Description |
---|---|
private static void |
createLabels() |
protected static org.apache.hadoop.util.Tool |
doMROnTableTest(HBaseTestingUtility util,
String family,
String data,
String[] args,
int valueMultiplier) |
protected static org.apache.hadoop.util.Tool |
doMROnTableTest(HBaseTestingUtility 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 hfile
|
private void |
issueDeleteAndVerifyData(org.apache.hadoop.hbase.TableName tableName) |
static void |
provisionCluster() |
static void |
releaseCluster() |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
void |
testBulkOutputWithInvalidLabels() |
void |
testBulkOutputWithTsvImporterTextMapper() |
void |
testBulkOutputWithTsvImporterTextMapperWithInvalidLabels() |
void |
testMROnTable() |
void |
testMROnTableWithBulkload() |
void |
testMROnTableWithDeletes() |
void |
testMRWithOutputFormat() |
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.
|
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
protected static HBaseTestingUtility util
protected static final String DELETE_AFTER_LOAD_CONF
protected static final String FORCE_COMBINER_CONF
private final String FAMILY
private static final String TOPSECRET
private static final String PUBLIC
private static final String PRIVATE
private static final String CONFIDENTIAL
private static final String SECRET
private static org.apache.hadoop.hbase.security.User SUPERUSER
private static org.apache.hadoop.conf.Configuration conf
public org.junit.rules.TestName name
public TestImportTSVWithVisibilityLabels()
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public static void provisionCluster() throws Exception
Exception
private static void createLabels() throws IOException, InterruptedException
IOException
InterruptedException
public static void releaseCluster() throws Exception
Exception
public void testMROnTable() throws Exception
Exception
public void testMROnTableWithDeletes() throws Exception
Exception
private void issueDeleteAndVerifyData(org.apache.hadoop.hbase.TableName tableName) throws IOException
IOException
public void testMROnTableWithBulkload() throws Exception
Exception
public void testBulkOutputWithTsvImporterTextMapper() throws Exception
Exception
public void testMRWithOutputFormat() throws Exception
Exception
public void testBulkOutputWithInvalidLabels() throws Exception
Exception
public void testBulkOutputWithTsvImporterTextMapperWithInvalidLabels() throws Exception
Exception
protected static org.apache.hadoop.util.Tool doMROnTableTest(HBaseTestingUtility util, String family, String data, String[] args, int valueMultiplier) throws Exception
Exception
protected static org.apache.hadoop.util.Tool doMROnTableTest(HBaseTestingUtility util, String family, String data, String[] args, int valueMultiplier, int expectedKVCount) throws Exception
Tool
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.args
- Any arguments to pass BEFORE inputFile path is appended.expectedKVCount
- Expected KV count. pass -1 to skip the kvcount checkException
private static void validateHFiles(org.apache.hadoop.fs.FileSystem fs, String outputPath, String family, int expectedKVCount) throws IOException
IOException
private static void validateTable(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, String family, int valueMultiplier) throws IOException
IOException
private static int getKVCountFromHfile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p) throws IOException
fs
- File Systemp
- HFile pathIOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.