Package org.apache.hadoop.hbase.client
Class TestConnectionImplementation
java.lang.Object
org.apache.hadoop.hbase.client.TestConnectionImplementation
This class is for testing HBaseConnectionManager features
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final byte[]private static final org.slf4j.Loggerorg.junit.rules.TestNameprivate static final byte[]private static final byte[]private static final intprotected static final AtomicBooleanprivate static final org.apache.hadoop.hbase.TableNameprivate static final org.apache.hadoop.hbase.TableNameprivate static final org.apache.hadoop.hbase.TableNameprivate static final org.apache.hadoop.hbase.TableNameprivate static final HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidassertEqualsWithJitter(long expected, long actual) private static voidassertEqualsWithJitter(long expected, long actual, long jitterBase) private intsetNumTries(org.apache.hadoop.hbase.client.ConnectionImplementation hci, int newVal) static voidvoidtearDown()static voidvoidNaive test to check that Connection#getAdmin returns a properly constructed HBaseAdmin objectvoidTest that stale cache updates don't override newer cached values.voidvoidvoidvoidvoidThis test checks that one can connect to the cluster with only the ZooKeeper quorum set.private voidtestConnectionClose(boolean allowsInterrupt) voidTest that we can handle connection close: it will trigger a retry, but the calls will finish.voidTest that the connection to the dead server is cut immediately when we receive the notification.voidTest that connection can become idle without breaking everything.voidTest that Connection or Pool are not closed when managed externallyvoidvoidvoidTrivial test to verify that nobody messes withConnectionFactory.createConnection(Configuration)voidprivate voidtestLocateRegionsRetrySpecialPause(Class<? extends org.apache.hadoop.hbase.HBaseServerException> exceptionClass) voidvoidvoidvoidvoidvoidTest that when we delete a location using the first row of a region that we really delete it.
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
TABLE_NAME
-
TABLE_NAME1
-
TABLE_NAME2
-
TABLE_NAME3
-
FAM_NAM
-
ROW
-
ROW_X
-
RPC_RETRY
- See Also:
-
name
-
syncBlockingFilter
-
-
Constructor Details
-
TestConnectionImplementation
public TestConnectionImplementation()
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
tearDown
- Throws:
IOException
-
testClusterConnection
- Throws:
IOException
-
testAdminFactory
Naive test to check that Connection#getAdmin returns a properly constructed HBaseAdmin object- Throws:
IOException- Unable to construct admin
-
testClusterStatus
- Throws:
Exception
-
testConnectionCloseAllowsInterrupt
Test that we can handle connection close: it will trigger a retry, but the calls will finish.- Throws:
Exception
-
testConnectionNotAllowsInterrupt
- Throws:
Exception
-
testConnectionClose
- Throws:
Exception
-
testConnectionIdle
Test that connection can become idle without breaking everything.- Throws:
Exception
-
testConnectionCut
Test that the connection to the dead server is cut immediately when we receive the notification.- Throws:
Exception
-
testRegionCaching
Test that when we delete a location using the first row of a region that we really delete it.- Throws:
Exception
-
testConnectionManagement
Test that Connection or Pool are not closed when managed externally- Throws:
Exception
-
testCacheSeqNums
Test that stale cache updates don't override newer cached values.- Throws:
Exception
-
testClosing
- Throws:
Exception
-
testCreateConnection
Trivial test to verify that nobody messes withConnectionFactory.createConnection(Configuration)- Throws:
Exception
-
testConnection
This test checks that one can connect to the cluster with only the ZooKeeper quorum set. Other stuff like master address will be read from ZK by the client.- Throws:
Exception
-
setNumTries
private int setNumTries(org.apache.hadoop.hbase.client.ConnectionImplementation hci, int newVal) throws Exception - Throws:
Exception
-
testMulti
- Throws:
Exception
-
testErrorBackoffTimeCalculation
- Throws:
Exception
-
assertEqualsWithJitter
-
assertEqualsWithJitter
-
testConnectionRideOverClusterRestart
- Throws:
IOExceptionInterruptedException
-
testLocateRegionsWithRegionReplicas
- Throws:
IOException
-
testLocateRegionsRetrySpecialPauseCQTBE
- Throws:
IOException
-
testLocateRegionsRetrySpecialPauseCDE
- Throws:
IOException
-
testLocateRegionsRetrySpecialPause
private void testLocateRegionsRetrySpecialPause(Class<? extends org.apache.hadoop.hbase.HBaseServerException> exceptionClass) throws IOException - Throws:
IOException
-
testMetaLookupThreadPoolCreated
- Throws:
Exception
-
testCancelConnectionMemoryLeak
- Throws:
IOExceptionInterruptedException
-