Class TestMasterTransitions

java.lang.Object
org.apache.hadoop.hbase.master.TestMasterTransitions

@Tag("org.apache.hadoop.hbase.testclassification.MasterTests") @Tag("org.apache.hadoop.hbase.testclassification.LargeTests") public class TestMasterTransitions extends Object
Test transitions of state across the master. Sets up the cluster once and then runs a couple of tests.
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • TEST_UTIL

      private static final HBaseTestingUtil TEST_UTIL
    • TABLENAME

      private static final org.apache.hadoop.hbase.TableName TABLENAME
    • FAMILIES

      private static final byte[][] FAMILIES
  • Constructor Details

  • Method Details

    • beforeAllTests

      @BeforeAll public static void beforeAllTests() throws Exception
      Start up a mini cluster and put a small table of many empty regions into it.
      Throws:
      Exception
    • afterAllTests

      @AfterAll public static void afterAllTests() throws Exception
      Throws:
      Exception
    • setup

      @BeforeEach public void setup() throws IOException
      Throws:
      IOException
    • testRegionCloseWhenNoMetaHBase2428

      @Disabled @Test public void testRegionCloseWhenNoMetaHBase2428() throws Exception
      In 2428, the meta region has just been set offline and then a close comes in.
      Throws:
      Exception
      See Also:
    • testAddingServerBeforeOldIsDead2413

      @Disabled @Test public void testAddingServerBeforeOldIsDead2413() throws IOException
      Test adding in a new server before old one on same host+port is dead. Make the test more onerous by having the server under test carry the meta. If confusion between old and new, purportedly meta never comes back. Test that meta gets redeployed.
      Throws:
      IOException
    • testKillRSWithOpeningRegion2482

      @Disabled @Test public void testKillRSWithOpeningRegion2482() throws Exception
      In 2482, a RS with an opening region on it dies. The said region is then stuck in the master's regions-in-transition and never leaves it. This test works by bringing up a new regionserver, waiting for the load balancer to give it some regions. Then, we close all on the new server. After sending all the close messages, we send the new regionserver the special blocking message so it can not process any more messages. Meantime reopening of the just-closed regions is backed up on the new server. Soon as master gets an opening region from the new regionserver, we kill it. We then wait on all regions to come back on line. If bug is fixed, this should happen soon as the processing of the killed server is done.
      Throws:
      Exception
      See Also:
    • addToEachStartKey

      private static int addToEachStartKey(int expected) throws IOException
      Throws:
      IOException
    • getStartKey

      private static byte[] getStartKey(org.apache.hadoop.hbase.client.RegionInfo hri)
    • getTestFamily

      private static byte[] getTestFamily()
    • getTestQualifier

      private static byte[] getTestQualifier()