Package org.apache.hadoop.hbase
Class TestZooKeeper
java.lang.Object
org.apache.hadoop.hbase.TestZooKeeper
@Tag("org.apache.hadoop.hbase.testclassification.MiscTests") @Tag("org.apache.hadoop.hbase.testclassification.MediumTests")
public class TestZooKeeper
extends Object
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate static final HBaseTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafter()private intcountListeners(org.apache.hadoop.hbase.zookeeper.ZKWatcher watcher, Class<?>... exclude) Count listeners in zkw excluding provided classesprivate intcountPermanentListeners(org.apache.hadoop.hbase.zookeeper.ZKWatcher watcher) Count listeners in zkw excluding listeners, that belongs to workers or other temporary processes.voidsetUp()static voidstatic voidvoidtestLogSplittingAfterMasterRecoveryDueToZKExpiry(org.junit.jupiter.api.TestInfo testInfo) Tests whether the logs are split when master recovers from a expired zookeeper session and an RS goes down.voidtestMasterSessionExpired(org.junit.jupiter.api.TestInfo testInfo) voidtestMasterZKSessionRecoveryFailure(org.junit.jupiter.api.TestInfo testInfo) Master recovery when the znode already exists.voidtestRegionAssignmentAfterMasterRecoveryDueToZKExpiry(org.junit.jupiter.api.TestInfo testInfo) Tests that the master does not call retainAssignment after recovery from expired zookeeper session.voidtestRegionServerSessionExpired(org.junit.jupiter.api.TestInfo testInfo) private voidtestSanity(String testName) Make sure we can use the cluster
-
Field Details
-
LOG
-
TEST_UTIL
-
-
Constructor Details
-
TestZooKeeper
public TestZooKeeper()
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
setUp
- Throws:
Exception
-
after
- Throws:
Exception
-
testRegionServerSessionExpired
@Test public void testRegionServerSessionExpired(org.junit.jupiter.api.TestInfo testInfo) throws Exception - Throws:
Exception
-
testMasterSessionExpired
@Test public void testMasterSessionExpired(org.junit.jupiter.api.TestInfo testInfo) throws Exception - Throws:
Exception
-
testMasterZKSessionRecoveryFailure
@Test public void testMasterZKSessionRecoveryFailure(org.junit.jupiter.api.TestInfo testInfo) throws Exception Master recovery when the znode already exists. Internally, this test differs fromtestMasterSessionExpired(org.junit.jupiter.api.TestInfo)because here the master znode will exist in ZK.- Throws:
Exception
-
testSanity
Make sure we can use the cluster- Throws:
Exception
-
testRegionAssignmentAfterMasterRecoveryDueToZKExpiry
@Test public void testRegionAssignmentAfterMasterRecoveryDueToZKExpiry(org.junit.jupiter.api.TestInfo testInfo) throws Exception Tests that the master does not call retainAssignment after recovery from expired zookeeper session. Without the HBASE-6046 fix master always tries to assign all the user regions by calling retainAssignment.- Throws:
Exception
-
countPermanentListeners
Count listeners in zkw excluding listeners, that belongs to workers or other temporary processes. -
countListeners
private int countListeners(org.apache.hadoop.hbase.zookeeper.ZKWatcher watcher, Class<?>... exclude) Count listeners in zkw excluding provided classes -
testLogSplittingAfterMasterRecoveryDueToZKExpiry
@Test public void testLogSplittingAfterMasterRecoveryDueToZKExpiry(org.junit.jupiter.api.TestInfo testInfo) throws Exception Tests whether the logs are split when master recovers from a expired zookeeper session and an RS goes down.- Throws:
Exception
-