Class TestMasterTransitions

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

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

  • Constructor Details

  • Method Details

    • beforeAllTests

      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

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

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

      In 2428, the meta region has just been set offline and then a close comes in.
      Throws:
      Exception
      See Also:
    • testAddingServerBeforeOldIsDead2413

      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

      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()