Package org.apache.hadoop.hbase.master
Class TestMasterNoCluster
java.lang.Object
org.apache.hadoop.hbase.master.TestMasterNoCluster
@Tag("org.apache.hadoop.hbase.testclassification.MasterTests") @Tag("org.apache.hadoop.hbase.testclassification.MediumTests")
public class TestMasterNoCluster
extends Object
Standup the master and fake it to test various aspects of master function. Does NOT spin up a
mini hbase nor mini dfs cluster testing master (it does put up a zk cluster but this is usually
pretty fast compared). Also, should be possible to inject faults at points difficult to get at in
cluster context. TODO: Speed up the zk connection by Master. It pauses 5 seconds establishing
session.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate static final HBaseTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoidtearDown()static voidvoidThe master reads and writes HFiles through its local MasterRegion, so it must enable IO metrics even when no RegionServer runs in the same JVM.voidvoidvoidTest starting master then stopping it before its fully up.
-
Field Details
-
LOG
-
TESTUTIL
-
-
Constructor Details
-
TestMasterNoCluster
public TestMasterNoCluster()
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
tearDown
@AfterEach public void tearDown() throws org.apache.zookeeper.KeeperException, org.apache.hadoop.hbase.ZooKeeperConnectionException, IOException- Throws:
org.apache.zookeeper.KeeperExceptionorg.apache.hadoop.hbase.ZooKeeperConnectionExceptionIOException
-
testStopDuringStart
@Test public void testStopDuringStart() throws IOException, org.apache.zookeeper.KeeperException, InterruptedExceptionTest starting master then stopping it before its fully up.- Throws:
IOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedException
-
testMasterEnablesMetricsIO
The master reads and writes HFiles through its local MasterRegion, so it must enable IO metrics even when no RegionServer runs in the same JVM. See HBASE-30231.- Throws:
IOExceptionInterruptedException
-
testMasterInitWithSameClientServerZKQuorum
- Throws:
Exception
-
testMasterInitWithObserverModeClientZKQuorum
- Throws:
Exception
-