Package org.apache.hadoop.hbase.master
Class TestMasterShutdown
java.lang.Object
org.apache.hadoop.hbase.master.TestMasterShutdown
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private HBaseTestingUtility
private static final org.slf4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static org.apache.hadoop.conf.Configuration
Create a cluster configuration suitable fortestMasterShutdownBeforeStartingAnyRegionServer()
.private static org.apache.hadoop.conf.Configuration
createResponsiveZkConfig
(org.apache.hadoop.conf.Configuration baseConf) Create a newConfiguration
based onbaseConf
that has ZooKeeper connection settings tuned very aggressively.void
void
Simple test of shutdown.void
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.
-
Field Details
-
LOG
-
CLASS_RULE
-
htu
-
-
Constructor Details
-
TestMasterShutdown
public TestMasterShutdown()
-
-
Method Details
-
shutdownCluster
- Throws:
IOException
-
testMasterShutdown
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 fortestMasterShutdownBeforeStartingAnyRegionServer()
. -
createResponsiveZkConfig
private static org.apache.hadoop.conf.Configuration createResponsiveZkConfig(org.apache.hadoop.conf.Configuration baseConf) Create a newConfiguration
based onbaseConf
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.
-