Class TestBulkLoadProcessor
java.lang.Object
org.apache.hadoop.hbase.backup.util.TestBulkLoadProcessor
@Tag("org.apache.hadoop.hbase.testclassification.SmallTests")
public class TestBulkLoadProcessor
extends Object
Unit tests for
BulkLoadProcessor.
These tests validate the extraction of bulk-loaded file paths from WAL entries under different scenarios, including:
- Valid replicable bulk load entries
- Non-replicable bulk load entries
- Entries with no bulk load qualifier
- Entries containing multiple column families
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hadoop.hbase.wal.WAL.EntrycreateBulkLoadWalEntry(org.apache.hadoop.hbase.TableName tableName, String regionName, boolean replicate, String family, String... storeFiles) Creates a WAL.Entry containing aWALProtos.BulkLoadDescriptorwith the given parameters.voidSanity check: list-based API should still work and return the same results as invoking the single-entry API for the same entry (ensures delegation/backwards compatibility).voidVerifies that multiple WAL entries with different column families produce the correct set of file paths.voidvoidVerifies that entries without the BULK_LOAD qualifier are ignored.voidvoidVerifies that a non-replicable bulk load entry is ignored.voidvoidVerifies that a valid replicable bulk load WAL entry produces the correct number and structure of file paths.void
-
Constructor Details
-
TestBulkLoadProcessor
public TestBulkLoadProcessor()
-
-
Method Details
-
createBulkLoadWalEntry
private org.apache.hadoop.hbase.wal.WAL.Entry createBulkLoadWalEntry(org.apache.hadoop.hbase.TableName tableName, String regionName, boolean replicate, String family, String... storeFiles) Creates a WAL.Entry containing aWALProtos.BulkLoadDescriptorwith the given parameters.- Parameters:
tableName- The table nameregionName- The encoded region namereplicate- Whether the bulk load is marked for replicationfamily- Column family namestoreFiles- One or more store file names to include- Returns:
- A WAL.Entry representing the bulk load event
-
testProcessBulkLoadFiles_validEntry
Verifies that a valid replicable bulk load WAL entry produces the correct number and structure of file paths.- Throws:
IOException
-
testProcessBulkLoadFiles_validEntry_singleEntryApi
- Throws:
IOException
-
testProcessBulkLoadFiles_nonReplicableSkipped
Verifies that a non-replicable bulk load entry is ignored.- Throws:
IOException
-
testProcessBulkLoadFiles_nonReplicableSkipped_singleEntryApi
- Throws:
IOException
-
testProcessBulkLoadFiles_noBulkLoadQualifier
Verifies that entries without the BULK_LOAD qualifier are ignored.- Throws:
IOException
-
testProcessBulkLoadFiles_noBulkLoadQualifier_singleEntryApi
- Throws:
IOException
-
testProcessBulkLoadFiles_multipleFamilies
Verifies that multiple WAL entries with different column families produce the correct set of file paths.- Throws:
IOException
-
testProcessBulkLoadFiles_multipleFamilies_singleEntryApi
- Throws:
IOException
-
testProcessBulkLoadFiles_listApi_delegatesToSingle
Sanity check: list-based API should still work and return the same results as invoking the single-entry API for the same entry (ensures delegation/backwards compatibility).- Throws:
IOException
-