public class TestMetaTableLocator extends Object
MetaTableLocator| Modifier and Type | Class and Description |
|---|---|
(package private) class |
TestMetaTableLocator.WaitOnMetaThread
Wait on META.
|
| Modifier and Type | Field and Description |
|---|---|
private org.apache.hadoop.hbase.Abortable |
abortable |
static HBaseClassTestRule |
CLASS_RULE |
private static org.slf4j.Logger |
LOG |
private static org.apache.hadoop.hbase.ServerName |
SN |
private static HBaseTestingUtility |
UTIL |
private org.apache.hadoop.hbase.zookeeper.ZKWatcher |
watcher |
| Constructor and Description |
|---|
TestMetaTableLocator() |
| Modifier and Type | Method and Description |
|---|---|
void |
after() |
static void |
afterClass() |
void |
before() |
static void |
beforeClass() |
private org.apache.hadoop.hbase.client.ClusterConnection |
mockConnection(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface client) |
private void |
startWaitAliveThenWaitItLives(Thread t,
int ms) |
void |
testGetMetaServerConnectionFails()
Test we survive a connection refused
ConnectException |
void |
testInterruptWaitOnMeta()
Test interruptable while blocking wait on meta.
|
void |
testMetaLookup()
Test normal operations
|
void |
testNoTimeoutWaitForMeta()
Test waiting on meat w/ no timeout specified.
|
void |
testTimeoutWaitForMeta() |
void |
testVerifyMetaRegionLocationFails()
Test get of meta region fails properly if nothing to connect to.
|
private void |
testVerifyMetaRegionLocationWithException(Exception ex) |
void |
testVerifyMetaRegionServerNotRunning()
Test that verifyMetaRegionLocation properly handles getting a
ServerNotRunningException.
|
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility UTIL
private static final org.apache.hadoop.hbase.ServerName SN
private org.apache.hadoop.hbase.zookeeper.ZKWatcher watcher
private org.apache.hadoop.hbase.Abortable abortable
public TestMetaTableLocator()
public static void beforeClass() throws Exception
Exceptionpublic static void afterClass() throws IOException
IOExceptionpublic void before() throws IOException
IOExceptionpublic void after()
public void testMetaLookup() throws IOException, InterruptedException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException, org.apache.zookeeper.KeeperException
IOExceptionInterruptedExceptionorg.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionorg.apache.zookeeper.KeeperExceptionpublic void testInterruptWaitOnMeta() throws IOException, InterruptedException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOExceptionorg.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionInterruptedExceptionprivate void testVerifyMetaRegionLocationWithException(Exception ex) throws IOException, InterruptedException, org.apache.zookeeper.KeeperException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOExceptionInterruptedExceptionorg.apache.zookeeper.KeeperExceptionorg.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionpublic void testGetMetaServerConnectionFails() throws IOException, InterruptedException, org.apache.zookeeper.KeeperException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
ConnectExceptionIOExceptionInterruptedExceptionorg.apache.zookeeper.KeeperExceptionorg.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionpublic void testVerifyMetaRegionServerNotRunning() throws IOException, InterruptedException, org.apache.zookeeper.KeeperException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOExceptionInterruptedExceptionorg.apache.zookeeper.KeeperExceptionorg.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionpublic void testVerifyMetaRegionLocationFails() throws IOException, InterruptedException, org.apache.zookeeper.KeeperException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOExceptionInterruptedExceptionorg.apache.zookeeper.KeeperExceptionorg.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionpublic void testTimeoutWaitForMeta() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testNoTimeoutWaitForMeta() throws IOException, InterruptedException, org.apache.zookeeper.KeeperException
IOExceptionInterruptedExceptionorg.apache.zookeeper.KeeperExceptionprivate org.apache.hadoop.hbase.client.ClusterConnection mockConnection(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface client) throws IOException
admin - An AdminProtos.AdminService.BlockingInterface instance; you'll likely
want to pass a mocked HRS; can be null.client - A mocked ClientProtocol instance, can be nullConfiguration when
Connection.getConfiguration() is called, a 'location' when
RegionLocator.getRegionLocation(byte[], boolean) is called,
and that returns the passed AdminProtos.AdminService.BlockingInterface instance when
ClusterConnection.getAdmin(ServerName) is called, returns the passed
ClientProtos.ClientService.BlockingInterface instance when
ClusterConnection.getClient(ServerName) is called.IOExceptionprivate void startWaitAliveThenWaitItLives(Thread t, int ms)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.