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 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 |
shouldThrowErrorIfBadFamilySpecifiedAsFamilyPath() |
void |
shouldThrowErrorIfHFileDoesNotExist() |
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
public org.junit.rules.TestName name
public TestBulkLoad()
public void before() throws IOException
IOException
public void verifyBulkLoadEvent() throws IOException
IOException
public void bulkHLogShouldThrowNoErrorAndWriteMarkerWithBlankInput() throws IOException
IOException
public void shouldBulkLoadSingleFamilyHLog() throws IOException
IOException
public void shouldBulkLoadManyFamilyHLog() throws IOException
IOException
public void shouldBulkLoadManyFamilyHLogEvenWhenTableNameNamespaceSpecified() throws IOException
IOException
public void shouldCrashIfBulkLoadFamiliesNotInTable() throws IOException
IOException
public void bulkHLogShouldThrowErrorWhenFamilySpecifiedAndHFileExistsButNotInTableDescriptor() throws IOException
IOException
public void shouldThrowErrorIfBadFamilySpecifiedAsFamilyPath() throws IOException
IOException
public void shouldThrowErrorIfHFileDoesNotExist() throws IOException
IOException
private 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
IOException
private org.apache.hadoop.hbase.regionserver.HRegion testRegionWithFamiliesAndSpecifiedTableName(org.apache.hadoop.hbase.TableName tableName, byte[]... families) throws IOException
IOException
private org.apache.hadoop.hbase.regionserver.HRegion testRegionWithFamilies(byte[]... families) throws IOException
IOException
private 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
IOException
private String createHFileForFamilies(byte[] family) throws IOException
IOException
private 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–2019 The Apache Software Foundation. All rights reserved.