public class TestAsyncNonMetaRegionLocator extends Object
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.hbase.client.AsyncConnectionImpl |
conn |
private static byte[] |
FAMILY |
private org.apache.hadoop.hbase.client.AsyncNonMetaRegionLocator |
locator |
org.apache.hadoop.hbase.CatalogReplicaMode |
metaReplicaMode |
private static int |
NB_SERVERS |
private static int |
NUM_OF_META_REPLICA |
private static byte[][] |
SPLIT_KEYS |
private static org.apache.hadoop.hbase.TableName |
TABLE_NAME |
private static HBaseTestingUtility |
TEST_UTIL |
Constructor and Description |
---|
TestAsyncNonMetaRegionLocator() |
Modifier and Type | Method and Description |
---|---|
private void |
assertLocEquals(byte[] startKey,
byte[] endKey,
org.apache.hadoop.hbase.ServerName serverName,
org.apache.hadoop.hbase.HRegionLocation loc) |
private void |
checkRegions(org.apache.hadoop.hbase.client.AsyncConnectionImpl conn,
List<org.apache.hadoop.hbase.client.RegionInfo> regions,
org.apache.hadoop.hbase.client.RegionInfo chosen) |
private void |
checkRegionsWithRetries(org.apache.hadoop.hbase.client.AsyncConnectionImpl conn,
List<org.apache.hadoop.hbase.client.RegionInfo> regions,
org.apache.hadoop.hbase.client.RegionInfo chosen,
int retries) |
private void |
createMultiRegionTable() |
private void |
createSingleRegionTable() |
private CompletableFuture<org.apache.hadoop.hbase.HRegionLocation> |
getDefaultRegionLocation(org.apache.hadoop.hbase.TableName tableName,
byte[] row,
org.apache.hadoop.hbase.client.RegionLocateType locateType,
boolean reload) |
private static byte[][] |
getEndKeys() |
private org.apache.hadoop.hbase.ServerName[] |
getLocations(byte[][] startKeys) |
private static byte[][] |
getStartKeys() |
static Collection<Object[]> |
parameters() |
static void |
setUp() |
void |
setUpBeforeTest() |
static void |
tearDown() |
void |
tearDownAfterTest() |
void |
testCacheLocationWhenGetAllLocations() |
void |
testConcurrentLocate() |
void |
testConcurrentUpdateCachedLocationOnError() |
void |
testDisableTable() |
void |
testDoNotCacheLocationWithNullServerNameWhenGetAllLocations() |
void |
testLocateAfter() |
void |
testLocateBeforeInOnlyRegion() |
void |
testLocateBeforeLastRegion() |
void |
testMultiRegionTable() |
void |
testNoTable() |
void |
testRegionMove() |
void |
testRegionReplicas() |
void |
testReload() |
void |
testSingleRegionTable() |
public static final HBaseClassTestRule CLASS_RULE
private static final HBaseTestingUtility TEST_UTIL
private static final org.apache.hadoop.hbase.TableName TABLE_NAME
private static byte[] FAMILY
private static final int NB_SERVERS
private static final int NUM_OF_META_REPLICA
private static byte[][] SPLIT_KEYS
private org.apache.hadoop.hbase.client.AsyncConnectionImpl conn
private org.apache.hadoop.hbase.client.AsyncNonMetaRegionLocator locator
public org.apache.hadoop.hbase.CatalogReplicaMode metaReplicaMode
public TestAsyncNonMetaRegionLocator()
public void setUpBeforeTest() throws InterruptedException, ExecutionException, IOException
public void tearDownAfterTest() throws IOException
IOException
public static Collection<Object[]> parameters()
private void createSingleRegionTable() throws IOException, InterruptedException
IOException
InterruptedException
private CompletableFuture<org.apache.hadoop.hbase.HRegionLocation> getDefaultRegionLocation(org.apache.hadoop.hbase.TableName tableName, byte[] row, org.apache.hadoop.hbase.client.RegionLocateType locateType, boolean reload)
public void testNoTable() throws InterruptedException
InterruptedException
public void testDisableTable() throws IOException, InterruptedException
IOException
InterruptedException
private void assertLocEquals(byte[] startKey, byte[] endKey, org.apache.hadoop.hbase.ServerName serverName, org.apache.hadoop.hbase.HRegionLocation loc)
public void testSingleRegionTable() throws IOException, InterruptedException, ExecutionException
private void createMultiRegionTable() throws IOException, InterruptedException
IOException
InterruptedException
private static byte[][] getStartKeys()
private static byte[][] getEndKeys()
private org.apache.hadoop.hbase.ServerName[] getLocations(byte[][] startKeys)
public void testMultiRegionTable() throws IOException, InterruptedException
IOException
InterruptedException
public void testRegionMove() throws IOException, InterruptedException, ExecutionException
public void testLocateAfter() throws IOException, InterruptedException, ExecutionException
public void testConcurrentLocate() throws IOException, InterruptedException, ExecutionException
public void testReload() throws Exception
Exception
public void testLocateBeforeLastRegion() throws IOException, InterruptedException, ExecutionException
public void testRegionReplicas() throws Exception
Exception
public void testLocateBeforeInOnlyRegion() throws IOException, InterruptedException
IOException
InterruptedException
public void testConcurrentUpdateCachedLocationOnError() throws Exception
Exception
public void testCacheLocationWhenGetAllLocations() throws Exception
Exception
public void testDoNotCacheLocationWithNullServerNameWhenGetAllLocations() throws Exception
Exception
private void checkRegionsWithRetries(org.apache.hadoop.hbase.client.AsyncConnectionImpl conn, List<org.apache.hadoop.hbase.client.RegionInfo> regions, org.apache.hadoop.hbase.client.RegionInfo chosen, int retries) throws InterruptedException
InterruptedException
private void checkRegions(org.apache.hadoop.hbase.client.AsyncConnectionImpl conn, List<org.apache.hadoop.hbase.client.RegionInfo> regions, org.apache.hadoop.hbase.client.RegionInfo chosen)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.