Class TestBulkLoadCollectorJob
java.lang.Object
org.apache.hadoop.hbase.backup.mapreduce.TestBulkLoadCollectorJob
@Tag("org.apache.hadoop.hbase.testclassification.MapReduceTests") @Tag("org.apache.hadoop.hbase.testclassification.LargeTests")
public class TestBulkLoadCollectorJob
extends Object
Unit tests for BulkLoadCollectorJob (mapper, reducer and job creation/validation).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetUp()voidtearDown()voidVerifies thatBulkLoadCollectorJob.createSubmittableJob(String[])throws an IOException when called with insufficient or null arguments.voidvoidEnsuresBulkLoadCollectorJob.createSubmittableJob(String[])correctly configures input/output paths and parses time options into the job configuration.voidVerifies thatBulkLoadCollectorJob.DedupReducerwrites each unique key exactly once.voidVerifies thatBulkLoadCollectorJob.BulkLoadCollectorMappersafely handles null inputs.voidVerifies thatBulkLoadCollectorJob.BulkLoadCollectorMapperignores WAL entries whose table is not present in the configured tables map.
-
Field Details
-
conf
-
-
Constructor Details
-
TestBulkLoadCollectorJob
public TestBulkLoadCollectorJob()
-
-
Method Details
-
setUp
-
tearDown
-
testCreateSubmittableJobValid
EnsuresBulkLoadCollectorJob.createSubmittableJob(String[])correctly configures input/output paths and parses time options into the job configuration.- Throws:
Exception
-
testCreateSubmittableJob_throwsForInsufficientArgs
Verifies thatBulkLoadCollectorJob.createSubmittableJob(String[])throws an IOException when called with insufficient or null arguments.- Throws:
Exception
-
testCreateSubmittableJob_throwsForNullArgs
- Throws:
Exception
-
testMapperIgnoresWhenTableNotInMap
Verifies thatBulkLoadCollectorJob.BulkLoadCollectorMapperignores WAL entries whose table is not present in the configured tables map.- Throws:
Exception
-
testMapperHandlesNullKeyOrValue
Verifies thatBulkLoadCollectorJob.BulkLoadCollectorMappersafely handles null inputs.The mapper should ignore WAL entries when either the WAL key or the WALEdit value is null, and must not emit any output in those cases.
- Throws:
Exception- on test failure
-
testDedupReducerWritesOnce
Verifies thatBulkLoadCollectorJob.DedupReducerwrites each unique key exactly once.- Throws:
Exception
-