Class TestEncodedNameCollisionDetection
java.lang.Object
org.apache.hadoop.hbase.master.procedure.TestEncodedNameCollisionDetection
@Tag("org.apache.hadoop.hbase.testclassification.SmallTests")
public class TestEncodedNameCollisionDetection
extends Object
Tests for encoded region-name collision detection (HBASE-30160). If two regions end up with the
same encoded name, we should fail fast instead of allowing subtle metadata corruption later.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hadoop.hbase.client.RegionInfomockRegionInfo(org.apache.hadoop.hbase.TableName tableName, String encodedName) voidHappy-path check: distinct candidate regions should pass without throwing.voidA candidate region should be rejected if its encoded name already exists.voidVerifies that duplicate encoded region names within candidate regions are rejected.voidTest that checkForEncodedNameCollisions handles empty/null inputs and rejects null RegionStates when candidates are present.
-
Constructor Details
-
TestEncodedNameCollisionDetection
public TestEncodedNameCollisionDetection()
-
-
Method Details
-
testAcceptsDistinctCandidates
Happy-path check: distinct candidate regions should pass without throwing. -
testDetectsDuplicatesInCandidates
Verifies that duplicate encoded region names within candidate regions are rejected. -
testDetectsCollisionWithExistingRegions
A candidate region should be rejected if its encoded name already exists. -
testInputValidationAndNullRegionStatesBehavior
Test that checkForEncodedNameCollisions handles empty/null inputs and rejects null RegionStates when candidates are present. -
mockRegionInfo
private org.apache.hadoop.hbase.client.RegionInfo mockRegionInfo(org.apache.hadoop.hbase.TableName tableName, String encodedName)
-