public class TestBulkLoad extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
TestBulkLoad.WalMatcher |
| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.conf.Configuration |
conf |
private byte[] |
family1 |
private byte[] |
family2 |
private byte[] |
family3 |
private org.apache.hadoop.hbase.wal.WAL |
log |
org.junit.rules.TestName |
name |
private Random |
random |
private byte[] |
randomBytes |
private static HBaseTestingUtility |
TEST_UTIL |
static org.junit.rules.TemporaryFolder |
testFolder |
| Constructor and Description |
|---|
TestBulkLoad() |
| Modifier and Type | Method and Description |
|---|---|
void |
before() |
void |
bulkHLogShouldThrowErrorWhenFamilySpecifiedAndHFileExistsButNotInTableDescriptor() |
void |
bulkHLogShouldThrowNoErrorAndWriteMarkerWithBlankInput() |
private static org.hamcrest.Matcher<org.apache.hadoop.hbase.wal.WALEdit> |
bulkLogWalEdit(byte[] typeBytes,
byte[] tableName,
byte[] familyName,
List<String> storeFileNames) |
private static org.hamcrest.Matcher<org.apache.hadoop.hbase.wal.WALEdit> |
bulkLogWalEditType(byte[] typeBytes) |
private String |
createHFileForFamilies(byte[] family) |
private List<org.apache.hadoop.hbase.util.Pair<byte[],String>> |
getBlankFamilyPaths() |
private String |
getNotExistFilePath() |
void |
shouldBulkLoadManyFamilyHLog() |
void |
shouldBulkLoadManyFamilyHLogEvenWhenTableNameNamespaceSpecified() |
void |
shouldBulkLoadSingleFamilyHLog() |
void |
shouldCrashIfBulkLoadFamiliesNotInTable() |
void |
shouldCrashIfBulkLoadMultiFamiliesNotInTable() |
void |
shouldThrowErrorIfBadFamilySpecifiedAsFamilyPath() |
void |
shouldThrowErrorIfHFileDoesNotExist() |
void |
shouldThrowErrorIfMultiHFileDoesNotExist() |
private org.apache.hadoop.hbase.regionserver.HRegion |
testRegionWithFamilies(byte[]... families) |
private org.apache.hadoop.hbase.regionserver.HRegion |
testRegionWithFamiliesAndSpecifiedTableName(org.apache.hadoop.hbase.TableName tableName,
byte[]... families) |
void |
verifyBulkLoadEvent() |
private List<org.apache.hadoop.hbase.util.Pair<byte[],String>> |
withFamilyPathsFor(byte[]... families) |
private org.apache.hadoop.hbase.util.Pair<byte[],String> |
withInvalidColumnFamilyButProperHFileLocation(byte[] family) |
private org.apache.hadoop.hbase.util.Pair<byte[],String> |
withMissingHFileForFamily(byte[] family) |
public static final HBaseClassTestRule CLASS_RULE
public static org.junit.rules.TemporaryFolder testFolder
private static HBaseTestingUtility TEST_UTIL
private final org.apache.hadoop.hbase.wal.WAL log
private final org.apache.hadoop.conf.Configuration conf
private final byte[] randomBytes
private final byte[] family1
private final byte[] family2
private final byte[] family3
public org.junit.rules.TestName name
public TestBulkLoad()
public void before() throws IOException
IOExceptionpublic void verifyBulkLoadEvent() throws IOException
IOExceptionpublic void bulkHLogShouldThrowNoErrorAndWriteMarkerWithBlankInput() throws IOException
IOExceptionpublic void shouldBulkLoadSingleFamilyHLog() throws IOException
IOExceptionpublic void shouldBulkLoadManyFamilyHLog() throws IOException
IOExceptionpublic void shouldBulkLoadManyFamilyHLogEvenWhenTableNameNamespaceSpecified() throws IOException
IOExceptionpublic void shouldCrashIfBulkLoadFamiliesNotInTable() throws IOException
IOExceptionpublic void shouldCrashIfBulkLoadMultiFamiliesNotInTable() throws IOException
IOExceptionpublic void bulkHLogShouldThrowErrorWhenFamilySpecifiedAndHFileExistsButNotInTableDescriptor() throws IOException
IOExceptionpublic void shouldThrowErrorIfBadFamilySpecifiedAsFamilyPath() throws IOException
IOExceptionpublic void shouldThrowErrorIfHFileDoesNotExist() throws IOException
IOExceptionpublic void shouldThrowErrorIfMultiHFileDoesNotExist() throws IOException
IOExceptionprivate org.apache.hadoop.hbase.util.Pair<byte[],String> withMissingHFileForFamily(byte[] family)
private String getNotExistFilePath()
private org.apache.hadoop.hbase.util.Pair<byte[],String> withInvalidColumnFamilyButProperHFileLocation(byte[] family) throws IOException
IOExceptionprivate org.apache.hadoop.hbase.regionserver.HRegion testRegionWithFamiliesAndSpecifiedTableName(org.apache.hadoop.hbase.TableName tableName, byte[]... families) throws IOException
IOExceptionprivate org.apache.hadoop.hbase.regionserver.HRegion testRegionWithFamilies(byte[]... families) throws IOException
IOExceptionprivate List<org.apache.hadoop.hbase.util.Pair<byte[],String>> getBlankFamilyPaths()
private List<org.apache.hadoop.hbase.util.Pair<byte[],String>> withFamilyPathsFor(byte[]... families) throws IOException
IOExceptionprivate String createHFileForFamilies(byte[] family) throws IOException
IOExceptionprivate static org.hamcrest.Matcher<org.apache.hadoop.hbase.wal.WALEdit> bulkLogWalEditType(byte[] typeBytes)
private static org.hamcrest.Matcher<org.apache.hadoop.hbase.wal.WALEdit> bulkLogWalEdit(byte[] typeBytes, byte[] tableName, byte[] familyName, List<String> storeFileNames)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.