Package org.apache.hadoop.hbase.tool
Class BulkLoadHFilesTestBase
java.lang.Object
org.apache.hadoop.hbase.tool.BulkLoadHFilesTestBase
- Direct Known Subclasses:
TestBulkLoadHFiles,TestBulkLoadHFilesSFT,TestSecureBulkLoadHFiles
Test cases for the "load" half of the HFileOutputFormat bulk load functionality. These tests run
faster than the full MR cluster tests in TestHFileOutputFormat
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Stringprivate static final byte[](package private) static final intprivate static final Stringprivate static final byte[]private static final byte[][](package private) static HBaseTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddStartEndKeysForTest(TreeMap<byte[], Integer> map, byte[] first, byte[] last) private org.apache.hadoop.hbase.client.TableDescriptorbuildHTD(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.regionserver.BloomType bloomType) private static voidcreateRandomDataFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, int size) static intloadHFiles(String testName, org.apache.hadoop.hbase.client.TableDescriptor htd, HBaseTestingUtil util, byte[] fam, byte[] qual, boolean preCreateTable, byte[][] tableSplitKeys, byte[][][] hfileRanges, boolean useMap, boolean deleteFile, boolean copyFiles, int initRowCount, int factor, int depth) private voidrunTest(String testName, org.apache.hadoop.hbase.client.TableDescriptor htd, boolean preCreateTable, byte[][] tableSplitKeys, byte[][][] hfileRanges, boolean useMap, boolean copyFiles, int depth) private voidrunTest(String testName, org.apache.hadoop.hbase.regionserver.BloomType bloomType, byte[][][] hfileRanges) private voidrunTest(String testName, org.apache.hadoop.hbase.regionserver.BloomType bloomType, byte[][][] hfileRanges, boolean useMap) private voidrunTest(String testName, org.apache.hadoop.hbase.regionserver.BloomType bloomType, byte[][] tableSplitKeys, byte[][][] hfileRanges) private voidrunTest(String testName, org.apache.hadoop.hbase.regionserver.BloomType bloomType, byte[][] tableSplitKeys, byte[][][] hfileRanges, boolean useMap) private voidrunTest(String testName, org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.regionserver.BloomType bloomType, boolean preCreateTable, byte[][] tableSplitKeys, byte[][][] hfileRanges, boolean useMap, int depth) protected static voidstatic voidvoidtestBulkLoadByFamily(org.junit.jupiter.api.TestInfo testInfo) voidtestFailIfNeedSplitHFile(org.junit.jupiter.api.TestInfo testInfo) voidvoidvoidtestNonexistentColumnFamilyLoad(org.junit.jupiter.api.TestInfo testInfo) Test loading into a column family that does not exist.voidprivate voidtestNonHfileFolder(String tableName, boolean preCreateTable) Write a random data file and a non-file in a dir with a valid family name but not part of the table families.voidvoidTest case that creates some regions and loads HFiles that cross the boundaries and have different region boundaries than the table pre-split.private voidtestRegionCrossingHFileSplit(org.apache.hadoop.hbase.regionserver.BloomType bloomType) voidTest case that creates some regions and loads HFiles that cross the boundaries have a ROW bloom filter and a different region boundaries than the table pre-split.voidTest case that creates some regions and loads HFiles that cross the boundaries have a ROWCOL bloom filter and a different region boundaries than the table pre-split.voidTest case that creates some regions and loads HFiles that cross the boundaries of those regionsvoidTest loading into a column family that has a ROW bloom filter.voidTest loading into a column family that has a ROWCOL bloom filter.voidTest case that creates some regions and loads HFiles that have different region boundaries than the table pre-split.voidTest case that creates some regions and loads HFiles that fit snugly inside those regionsvoidtestSimpleLoadWithFileCopy(org.junit.jupiter.api.TestInfo testInfo) voidvoidvoidtestSplitStoreFile(org.junit.jupiter.api.TestInfo testInfo) voidtestSplitStoreFileWithCreateTimeTS(org.junit.jupiter.api.TestInfo testInfo) private voidtestSplitStoreFileWithDifferentEncoding(org.apache.hadoop.hbase.io.encoding.DataBlockEncoding bulkloadEncoding, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding cfEncoding, org.junit.jupiter.api.TestInfo testInfo) voidtestSplitStoreFileWithEncodedToEncoded(org.junit.jupiter.api.TestInfo testInfo) voidtestSplitStoreFileWithEncodedToNone(org.junit.jupiter.api.TestInfo testInfo) voidtestSplitStoreFileWithFavoriteNodes(org.junit.jupiter.api.TestInfo testInfo) Test hfile splits with the favored nodesvoidtestSplitStoreFileWithNoneToEncoded(org.junit.jupiter.api.TestInfo testInfo) voidtestSplitStoreFileWithNoneToNone(org.junit.jupiter.api.TestInfo testInfo) voidtestTableWithCFNameStartWithUnderScore(org.junit.jupiter.api.TestInfo testInfo) voidtestTagsSurviveBulkLoadSplit(org.junit.jupiter.api.TestInfo testInfo) Test that tags survive through a bulk load that needs to split hfiles.voidprivate intverifyHFile(org.apache.hadoop.fs.Path p) private voidverifyHFileCreateTimeTS(org.apache.hadoop.fs.Path p) private voidverifyHFileFavoriteNode(org.apache.hadoop.fs.Path p, org.apache.hadoop.hbase.client.AsyncTableRegionLocator regionLocator, org.apache.hadoop.fs.FileSystem fs) test split storefile with favorite node information
-
Field Details
-
QUALIFIER
-
FAMILY
-
NAMESPACE
- See Also:
-
EXPECTED_MSG_FOR_NON_EXISTING_FAMILY
- See Also:
-
MAX_FILES_PER_REGION_PER_FAMILY
- See Also:
-
SPLIT_KEYS
-
util
-
-
Constructor Details
-
BulkLoadHFilesTestBase
public BulkLoadHFilesTestBase()
-
-
Method Details
-
setupNamespace
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
testSimpleLoadWithMap
- Throws:
Exception
-
testSimpleLoad
Test case that creates some regions and loads HFiles that fit snugly inside those regions- Throws:
Exception
-
testSimpleLoadWithFileCopy
@Test public void testSimpleLoadWithFileCopy(org.junit.jupiter.api.TestInfo testInfo) throws Exception - Throws:
Exception
-
testRegionCrossingLoad
Test case that creates some regions and loads HFiles that cross the boundaries of those regions- Throws:
Exception
-
testRegionCrossingRowBloom
Test loading into a column family that has a ROW bloom filter.- Throws:
Exception
-
testRegionCrossingRowColBloom
Test loading into a column family that has a ROWCOL bloom filter.- Throws:
Exception
-
testSimpleHFileSplit
Test case that creates some regions and loads HFiles that have different region boundaries than the table pre-split.- Throws:
Exception
-
testRegionCrossingHFileSplit
Test case that creates some regions and loads HFiles that cross the boundaries and have different region boundaries than the table pre-split.- Throws:
Exception
-
testRegionCrossingHFileSplitRowBloom
Test case that creates some regions and loads HFiles that cross the boundaries have a ROW bloom filter and a different region boundaries than the table pre-split.- Throws:
Exception
-
testRegionCrossingHFileSplitRowColBloom
Test case that creates some regions and loads HFiles that cross the boundaries have a ROWCOL bloom filter and a different region boundaries than the table pre-split.- Throws:
Exception
-
testSplitALot
- Throws:
Exception
-
testRegionCrossingHFileSplit
private void testRegionCrossingHFileSplit(org.apache.hadoop.hbase.regionserver.BloomType bloomType) throws Exception - Throws:
Exception
-
buildHTD
private org.apache.hadoop.hbase.client.TableDescriptor buildHTD(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.regionserver.BloomType bloomType) -
runTest
private void runTest(String testName, org.apache.hadoop.hbase.regionserver.BloomType bloomType, byte[][][] hfileRanges) throws Exception - Throws:
Exception
-
runTest
private void runTest(String testName, org.apache.hadoop.hbase.regionserver.BloomType bloomType, byte[][][] hfileRanges, boolean useMap) throws Exception - Throws:
Exception
-
runTest
private void runTest(String testName, org.apache.hadoop.hbase.regionserver.BloomType bloomType, byte[][] tableSplitKeys, byte[][][] hfileRanges) throws Exception - Throws:
Exception
-
runTest
private void runTest(String testName, org.apache.hadoop.hbase.regionserver.BloomType bloomType, byte[][] tableSplitKeys, byte[][][] hfileRanges, boolean useMap) throws Exception - Throws:
Exception
-
runTest
private void runTest(String testName, org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.regionserver.BloomType bloomType, boolean preCreateTable, byte[][] tableSplitKeys, byte[][][] hfileRanges, boolean useMap, int depth) throws Exception - Throws:
Exception
-
loadHFiles
public static int loadHFiles(String testName, org.apache.hadoop.hbase.client.TableDescriptor htd, HBaseTestingUtil util, byte[] fam, byte[] qual, boolean preCreateTable, byte[][] tableSplitKeys, byte[][][] hfileRanges, boolean useMap, boolean deleteFile, boolean copyFiles, int initRowCount, int factor, int depth) throws Exception - Throws:
Exception
-
runTest
private void runTest(String testName, org.apache.hadoop.hbase.client.TableDescriptor htd, boolean preCreateTable, byte[][] tableSplitKeys, byte[][][] hfileRanges, boolean useMap, boolean copyFiles, int depth) throws Exception - Throws:
Exception
-
testTagsSurviveBulkLoadSplit
@Test public void testTagsSurviveBulkLoadSplit(org.junit.jupiter.api.TestInfo testInfo) throws Exception Test that tags survive through a bulk load that needs to split hfiles. This test depends on the "hbase.client.rpc.codec" = KeyValueCodecWithTags so that the client can get tags in the responses.- Throws:
Exception
-
testNonexistentColumnFamilyLoad
@Test public void testNonexistentColumnFamilyLoad(org.junit.jupiter.api.TestInfo testInfo) throws Exception Test loading into a column family that does not exist.- Throws:
Exception
-
testNonHfileFolderWithUnmatchedFamilyName
- Throws:
Exception
-
testNonHfileFolder
- Throws:
Exception
-
testNonHfileFolder
Write a random data file and a non-file in a dir with a valid family name but not part of the table families. we should we able to bulkload without getting the unmatched family exception. HBASE-13037/HBASE-13227- Throws:
Exception
-
createRandomDataFile
private static void createRandomDataFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, int size) throws IOException - Throws:
IOException
-
testSplitStoreFile
- Throws:
IOException
-
testSplitStoreFileWithFavoriteNodes
@Test public void testSplitStoreFileWithFavoriteNodes(org.junit.jupiter.api.TestInfo testInfo) throws IOException Test hfile splits with the favored nodes- Throws:
IOException
-
testSplitStoreFileWithCreateTimeTS
@Test public void testSplitStoreFileWithCreateTimeTS(org.junit.jupiter.api.TestInfo testInfo) throws IOException - Throws:
IOException
-
testSplitStoreFileWithNoneToNone
@Test public void testSplitStoreFileWithNoneToNone(org.junit.jupiter.api.TestInfo testInfo) throws IOException - Throws:
IOException
-
testSplitStoreFileWithEncodedToEncoded
@Test public void testSplitStoreFileWithEncodedToEncoded(org.junit.jupiter.api.TestInfo testInfo) throws IOException - Throws:
IOException
-
testSplitStoreFileWithEncodedToNone
@Test public void testSplitStoreFileWithEncodedToNone(org.junit.jupiter.api.TestInfo testInfo) throws IOException - Throws:
IOException
-
testSplitStoreFileWithNoneToEncoded
@Test public void testSplitStoreFileWithNoneToEncoded(org.junit.jupiter.api.TestInfo testInfo) throws IOException - Throws:
IOException
-
testSplitStoreFileWithDifferentEncoding
private void testSplitStoreFileWithDifferentEncoding(org.apache.hadoop.hbase.io.encoding.DataBlockEncoding bulkloadEncoding, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding cfEncoding, org.junit.jupiter.api.TestInfo testInfo) throws IOException - Throws:
IOException
-
verifyHFile
- Throws:
IOException
-
verifyHFileCreateTimeTS
- Throws:
IOException
-
verifyHFileFavoriteNode
private void verifyHFileFavoriteNode(org.apache.hadoop.fs.Path p, org.apache.hadoop.hbase.client.AsyncTableRegionLocator regionLocator, org.apache.hadoop.fs.FileSystem fs) throws IOException test split storefile with favorite node information- Throws:
IOException
-
addStartEndKeysForTest
-
testInferBoundaries
-
testLoadTooMayHFiles
- Throws:
Exception
-
testWithoutAnExistingTableAndCreateTableSetToNo
- Throws:
Exception
-
testTableWithCFNameStartWithUnderScore
@Test public void testTableWithCFNameStartWithUnderScore(org.junit.jupiter.api.TestInfo testInfo) throws Exception - Throws:
Exception
-
testBulkLoadByFamily
- Throws:
Exception
-
testFailIfNeedSplitHFile
@Test public void testFailIfNeedSplitHFile(org.junit.jupiter.api.TestInfo testInfo) throws IOException - Throws:
IOException
-