Package org.apache.hadoop.hbase.client
Class AbstractTestRegionLocator
java.lang.Object
org.apache.hadoop.hbase.client.AbstractTestRegionLocator
- Direct Known Subclasses:
TestAsyncTableRegionLocator
,TestRegionLocator
-
Field Summary
Modifier and TypeFieldDescriptionprotected static byte[]
protected static int
protected static byte[][]
protected static org.apache.hadoop.hbase.TableName
protected static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
assertEndKeys
(byte[][] endKeys) private void
assertMetaRegionLocation
(org.apache.hadoop.hbase.HRegionLocation loc, int replicaId) private void
assertMetaRegionLocations
(List<org.apache.hadoop.hbase.HRegionLocation> locs) private void
assertMetaStartOrEndKeys
(byte[][] keys) private void
assertRegionLocation
(org.apache.hadoop.hbase.HRegionLocation loc, int index, int replicaId) private void
assertStartKeys
(byte[][] startKeys) protected abstract void
clearCache
(org.apache.hadoop.hbase.TableName tableName) private org.apache.hadoop.hbase.ServerName
findRegionLocation
(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.HRegionLocation
getRegionLocation
(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 void
void
void
void
void
void
testMeta()
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
-