public abstract class AbstractTestRegionLocator extends Object
Modifier and Type | Field and Description |
---|---|
protected static byte[] |
FAMILY |
protected static int |
REGION_REPLICATION |
protected static byte[][] |
SPLIT_KEYS |
protected static org.apache.hadoop.hbase.TableName |
TABLE_NAME |
protected static HBaseTestingUtility |
UTIL |
Constructor and Description |
---|
AbstractTestRegionLocator() |
Modifier and Type | Method and Description |
---|---|
private 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 |
startClusterAndCreateTable() |
void |
tearDownAfterTest() |
void |
testGetAllRegionLocations() |
void |
testGetRegionLocation() |
void |
testGetRegionLocations() |
void |
testMeta() |
void |
testStartEndKeys() |
protected static final HBaseTestingUtility UTIL
protected static org.apache.hadoop.hbase.TableName TABLE_NAME
protected static byte[] FAMILY
protected static int REGION_REPLICATION
protected static byte[][] SPLIT_KEYS
public AbstractTestRegionLocator()
protected static void startClusterAndCreateTable() throws Exception
Exception
public void tearDownAfterTest() throws IOException
IOException
private byte[] getStartKey(int index)
private byte[] getEndKey(int index)
private void assertStartKeys(byte[][] startKeys)
private void assertEndKeys(byte[][] endKeys)
public void testStartEndKeys() throws IOException
IOException
private void assertRegionLocation(org.apache.hadoop.hbase.HRegionLocation loc, int index, int replicaId)
private org.apache.hadoop.hbase.ServerName findRegionLocation(org.apache.hadoop.hbase.TableName tableName, byte[] startKey, int replicaId)
public void testGetRegionLocation() throws IOException
IOException
public void testGetRegionLocations() throws IOException
IOException
public void testGetAllRegionLocations() throws IOException
IOException
private void assertMetaStartOrEndKeys(byte[][] keys)
private void assertMetaRegionLocation(org.apache.hadoop.hbase.HRegionLocation loc, int replicaId)
private void assertMetaRegionLocations(List<org.apache.hadoop.hbase.HRegionLocation> locs)
public void testMeta() throws IOException
IOException
protected abstract byte[][] getStartKeys(org.apache.hadoop.hbase.TableName tableName) throws IOException
IOException
protected abstract byte[][] getEndKeys(org.apache.hadoop.hbase.TableName tableName) throws IOException
IOException
protected abstract org.apache.hadoop.hbase.util.Pair<byte[][],byte[][]> getStartEndKeys(org.apache.hadoop.hbase.TableName tableName) throws IOException
IOException
protected abstract org.apache.hadoop.hbase.HRegionLocation getRegionLocation(org.apache.hadoop.hbase.TableName tableName, byte[] row, int replicaId) throws IOException
IOException
protected abstract List<org.apache.hadoop.hbase.HRegionLocation> getRegionLocations(org.apache.hadoop.hbase.TableName tableName, byte[] row) throws IOException
IOException
protected abstract List<org.apache.hadoop.hbase.HRegionLocation> getAllRegionLocations(org.apache.hadoop.hbase.TableName tableName) throws IOException
IOException
protected abstract void clearCache(org.apache.hadoop.hbase.TableName tableName) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.