Package org.apache.hadoop.hbase.client
Class TestRegionLocationCaching
java.lang.Object
org.apache.hadoop.hbase.client.TestRegionLocationCaching
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static byte[]private static byte[]private static intprivate static org.apache.hadoop.hbase.TableNameprivate static final HBaseTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcheckExistence(org.apache.hadoop.hbase.TableName tableName, byte[] row, byte[] family, byte[] qualifier) Method to check whether the passed row exists in the given tableprivate voidcheckRegionLocationIsCached(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.Connection conn) Method to check whether the cached region location is non-empty for the given table.private voidcheckRegionLocationIsNotCached(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.Connection conn) Method to check whether the cached region location is empty for the given table.static voidstatic voidvoidvoidvoidvoid
-
Field Details
-
CLASS_RULE
-
TEST_UTIL
-
SLAVES
-
TABLE_NAME
-
FAMILY
-
QUALIFIER
-
-
Constructor Details
-
TestRegionLocationCaching
public TestRegionLocationCaching()
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
testCachingForHTableSinglePut
- Throws:
Exception
-
testCachingForHTableMultiPut
- Throws:
Exception
-
checkRegionLocationIsCached
private void checkRegionLocationIsCached(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.Connection conn) throws InterruptedException, IOException Method to check whether the cached region location is non-empty for the given table. It repeats the same check several times as clearing of cache by some async operations may not reflect immediately.- Throws:
InterruptedExceptionIOException
-
checkRegionLocationIsNotCached
private void checkRegionLocationIsNotCached(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.Connection conn) throws InterruptedException Method to check whether the cached region location is empty for the given table. It repeats the same check several times as clearing of cache by some async operations may not reflect immediately.- Throws:
InterruptedException
-
checkExistence
private static void checkExistence(org.apache.hadoop.hbase.TableName tableName, byte[] row, byte[] family, byte[] qualifier) throws Exception Method to check whether the passed row exists in the given table- Throws:
Exception
-
testInvalidateMetaCache
- Throws:
Throwable
-
testDisableInvalidateMetaCache
- Throws:
Throwable
-