Package org.apache.hadoop.hbase.client
Class TestAsyncNonMetaRegionLocator
java.lang.Object
org.apache.hadoop.hbase.client.TestAsyncNonMetaRegionLocator
@Tag("org.apache.hadoop.hbase.testclassification.MediumTests") @Tag("org.apache.hadoop.hbase.testclassification.ClientTests")
public class TestAsyncNonMetaRegionLocator
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.hbase.client.AsyncConnectionImplprivate static byte[]private org.apache.hadoop.hbase.client.AsyncNonMetaRegionLocatorprivate final org.apache.hadoop.hbase.CatalogReplicaModeprivate static final intprivate static final intprivate static byte[][]private static final org.apache.hadoop.hbase.TableNameprivate static final HBaseTestingUtil -
Constructor Summary
ConstructorsConstructorDescriptionTestAsyncNonMetaRegionLocator(org.apache.hadoop.hbase.CatalogReplicaMode metaReplicaMode) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidassertLocEquals(byte[] startKey, byte[] endKey, org.apache.hadoop.hbase.ServerName serverName, org.apache.hadoop.hbase.HRegionLocation loc) private voidcheckRegions(org.apache.hadoop.hbase.client.AsyncConnectionImpl conn, List<org.apache.hadoop.hbase.client.RegionInfo> regions, org.apache.hadoop.hbase.client.RegionInfo chosen) private voidcheckRegionsWithRetries(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 voidprivate voidprivate 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[][]private org.apache.hadoop.hbase.ServerName[]getLocations(byte[][] startKeys) private static byte[][]static Stream<org.junit.jupiter.params.provider.Arguments>static voidsetUp()voidstatic voidtearDown()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
Field Details
-
TEST_UTIL
-
TABLE_NAME
-
FAMILY
-
NB_SERVERS
- See Also:
-
NUM_OF_META_REPLICA
- See Also:
-
SPLIT_KEYS
-
conn
-
locator
-
metaReplicaMode
-
-
Constructor Details
-
TestAsyncNonMetaRegionLocator
-
-
Method Details
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
setUpBeforeTest
@BeforeEach public void setUpBeforeTest() throws InterruptedException, ExecutionException, IOException -
tearDownAfterTest
- Throws:
IOException
-
parameters
-
createSingleRegionTable
- Throws:
IOExceptionInterruptedException
-
getDefaultRegionLocation
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) -
testNoTable
- Throws:
InterruptedException
-
testDisableTable
- Throws:
IOExceptionInterruptedException
-
assertLocEquals
private void assertLocEquals(byte[] startKey, byte[] endKey, org.apache.hadoop.hbase.ServerName serverName, org.apache.hadoop.hbase.HRegionLocation loc) -
testSingleRegionTable
@TestTemplate public void testSingleRegionTable() throws IOException, InterruptedException, ExecutionException -
createMultiRegionTable
- Throws:
IOExceptionInterruptedException
-
getStartKeys
-
getEndKeys
-
getLocations
-
testMultiRegionTable
- Throws:
IOExceptionInterruptedException
-
testRegionMove
@TestTemplate public void testRegionMove() throws IOException, InterruptedException, ExecutionException -
testLocateAfter
@TestTemplate public void testLocateAfter() throws IOException, InterruptedException, ExecutionException -
testConcurrentLocate
@TestTemplate public void testConcurrentLocate() throws IOException, InterruptedException, ExecutionException -
testReload
- Throws:
Exception
-
testLocateBeforeLastRegion
@TestTemplate public void testLocateBeforeLastRegion() throws IOException, InterruptedException, ExecutionException -
testRegionReplicas
- Throws:
Exception
-
testLocateBeforeInOnlyRegion
- Throws:
IOExceptionInterruptedException
-
testConcurrentUpdateCachedLocationOnError
- Throws:
Exception
-
testCacheLocationWhenGetAllLocations
- Throws:
Exception
-
testDoNotCacheLocationWithNullServerNameWhenGetAllLocations
@TestTemplate public void testDoNotCacheLocationWithNullServerNameWhenGetAllLocations() throws Exception- Throws:
Exception
-
checkRegionsWithRetries
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 - Throws:
InterruptedException
-
checkRegions
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)
-