public class TestMasterShutdown extends Object
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private HBaseTestingUtility |
htu |
private static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
TestMasterShutdown() |
Modifier and Type | Method and Description |
---|---|
private static org.apache.hadoop.conf.Configuration |
createMasterShutdownBeforeStartingAnyRegionServerConfiguration()
Create a cluster configuration suitable for
testMasterShutdownBeforeStartingAnyRegionServer() . |
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. |
void |
shutdownCluster() |
void |
testMasterShutdown()
Simple test of shutdown.
|
void |
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.
|
private static final org.slf4j.Logger LOG
public static final HBaseClassTestRule CLASS_RULE
private HBaseTestingUtility htu
public TestMasterShutdown()
public void shutdownCluster() throws IOException
IOException
public void testMasterShutdown() throws Exception
Starts with three masters. Tells the active master to shutdown the cluster. Verifies that all masters are properly shutdown.
Exception
public void testMasterShutdownBeforeStartingAnyRegionServer() throws Exception
Exception
private static org.apache.hadoop.conf.Configuration createMasterShutdownBeforeStartingAnyRegionServerConfiguration()
testMasterShutdownBeforeStartingAnyRegionServer()
.private static org.apache.hadoop.conf.Configuration createResponsiveZkConfig(org.apache.hadoop.conf.Configuration baseConf)
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.Configuration
instance.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.