Class TestMasterShutdown

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

public class TestMasterShutdown extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • shutdownCluster

      public void shutdownCluster() throws IOException
      Throws:
      IOException
    • testMasterShutdown

      public void testMasterShutdown() throws Exception
      Simple test of shutdown.

      Starts with three masters. Tells the active master to shutdown the cluster. Verifies that all masters are properly shutdown.

      Throws:
      Exception
    • testMasterShutdownBeforeStartingAnyRegionServer

      This test appears to be an intentional race between a thread that issues a shutdown RPC to the master, while the master is concurrently realizing it cannot initialize because there are no region servers available to it. The expected behavior is that master initialization is interruptable via said shutdown RPC.
      Throws:
      Exception
    • createMasterShutdownBeforeStartingAnyRegionServerConfiguration

      private static org.apache.hadoop.conf.Configuration createMasterShutdownBeforeStartingAnyRegionServerConfiguration()
      Create a cluster configuration suitable for testMasterShutdownBeforeStartingAnyRegionServer().
    • createResponsiveZkConfig

      private static org.apache.hadoop.conf.Configuration createResponsiveZkConfig(org.apache.hadoop.conf.Configuration baseConf)
      Create a new Configuration based on baseConf that has ZooKeeper connection settings tuned very aggressively. The resulting client is used within a retry loop, so there's no value in having the client itself do the retries. We want to iterate on the base configuration because we're waiting for the mini-cluster to start and set it's ZK client port.
      Returns:
      a new, configured Configuration instance.