Package org.apache.hadoop.hbase.client
Class AbstractTestRegionLocator
java.lang.Object
org.apache.hadoop.hbase.client.AbstractTestRegionLocator
- Direct Known Subclasses:
TestAsyncTableRegionLocator,TestRegionLocator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static byte[]protected static intprotected static byte[][]protected static org.apache.hadoop.hbase.TableNameprotected static final HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidassertEndKeys(byte[][] endKeys) private voidassertMetaRegionLocation(org.apache.hadoop.hbase.HRegionLocation loc, int replicaId) private voidassertMetaRegionLocations(List<org.apache.hadoop.hbase.HRegionLocation> locs) private voidassertMetaStartOrEndKeys(byte[][] keys) private voidassertRegionLocation(org.apache.hadoop.hbase.HRegionLocation loc, int index, int replicaId) private voidassertStartKeys(byte[][] startKeys) protected abstract voidclearCache(org.apache.hadoop.hbase.TableName tableName) private org.apache.hadoop.hbase.ServerNamefindRegionLocation(org.apache.hadoop.hbase.TableName tableName, byte[] startKey, int replicaId) protected abstract List<org.apache.hadoop.hbase.HRegionLocation>getAllRegionLocations(org.apache.hadoop.hbase.TableName tableName) private byte[]getEndKey(int index) protected abstract byte[][]getEndKeys(org.apache.hadoop.hbase.TableName tableName) protected abstract org.apache.hadoop.hbase.HRegionLocationgetRegionLocation(org.apache.hadoop.hbase.TableName tableName, byte[] row, int replicaId) protected abstract List<org.apache.hadoop.hbase.HRegionLocation>getRegionLocations(org.apache.hadoop.hbase.TableName tableName, byte[] row) protected abstract org.apache.hadoop.hbase.util.Pair<byte[][],byte[][]> getStartEndKeys(org.apache.hadoop.hbase.TableName tableName) private byte[]getStartKey(int index) protected abstract byte[][]getStartKeys(org.apache.hadoop.hbase.TableName tableName) protected static voidvoidvoidvoidvoidvoidtestMeta()void
-
Field Details
-
UTIL
-
TABLE_NAME
-
FAMILY
-
REGION_REPLICATION
-
SPLIT_KEYS
-
-
Constructor Details
-
AbstractTestRegionLocator
public AbstractTestRegionLocator()
-
-
Method Details
-
startClusterAndCreateTable
- Throws:
Exception
-
tearDownAfterTest
- Throws:
IOException
-
getStartKey
-
getEndKey
-
assertStartKeys
-
assertEndKeys
-
testStartEndKeys
- Throws:
IOException
-
assertRegionLocation
private void assertRegionLocation(org.apache.hadoop.hbase.HRegionLocation loc, int index, int replicaId) -
findRegionLocation
private org.apache.hadoop.hbase.ServerName findRegionLocation(org.apache.hadoop.hbase.TableName tableName, byte[] startKey, int replicaId) -
testGetRegionLocation
- Throws:
IOException
-
testGetRegionLocations
- Throws:
IOException
-
testGetAllRegionLocations
- Throws:
IOException
-
assertMetaStartOrEndKeys
-
assertMetaRegionLocation
-
assertMetaRegionLocations
-
testMeta
- Throws:
IOException
-
getStartKeys
protected abstract byte[][] getStartKeys(org.apache.hadoop.hbase.TableName tableName) throws IOException - Throws:
IOException
-
getEndKeys
protected abstract byte[][] getEndKeys(org.apache.hadoop.hbase.TableName tableName) throws IOException - Throws:
IOException
-
getStartEndKeys
protected abstract org.apache.hadoop.hbase.util.Pair<byte[][],byte[][]> getStartEndKeys(org.apache.hadoop.hbase.TableName tableName) throws IOException - Throws:
IOException
-
getRegionLocation
protected abstract org.apache.hadoop.hbase.HRegionLocation getRegionLocation(org.apache.hadoop.hbase.TableName tableName, byte[] row, int replicaId) throws IOException - Throws:
IOException
-
getRegionLocations
protected abstract List<org.apache.hadoop.hbase.HRegionLocation> getRegionLocations(org.apache.hadoop.hbase.TableName tableName, byte[] row) throws IOException - Throws:
IOException
-
getAllRegionLocations
protected abstract List<org.apache.hadoop.hbase.HRegionLocation> getAllRegionLocations(org.apache.hadoop.hbase.TableName tableName) throws IOException - Throws:
IOException
-
clearCache
- Throws:
IOException
-