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 Details

  • Method Details

    • testAcceptsDistinctCandidates

      @Test public void testAcceptsDistinctCandidates()
      Happy-path check: distinct candidate regions should pass without throwing.
    • testDetectsDuplicatesInCandidates

      @Test public void 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)