public class TestMetaRegionReplicaReplication extends Object
TestRegionReplicaReplication
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private HBaseTestingUtil |
HTU |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private static int |
NB_SERVERS |
private int |
numOfMetaReplica |
private static byte[] |
VALUE |
Constructor and Description |
---|
TestMetaRegionReplicaReplication() |
Modifier and Type | Method and Description |
---|---|
void |
after() |
void |
before() |
(package private) static boolean |
contains(List<org.apache.hadoop.hbase.client.Result> contains,
List<org.apache.hadoop.hbase.Cell> cells)
Presumes sorted Cells.
|
private boolean |
doesNotContain(List<org.apache.hadoop.hbase.Cell> cells,
org.apache.hadoop.hbase.TableName tableName)
Cells are from hbase:meta replica so will start w/ 'tableName,'; i.e.
|
private void |
doNGets(org.apache.hadoop.hbase.client.Table table,
byte[][] keys) |
private org.apache.hadoop.hbase.regionserver.Region[] |
getAllRegions(org.apache.hadoop.hbase.TableName tableName,
int replication)
Returns All Regions for tableName including Replicas.
|
private List<org.apache.hadoop.hbase.client.Result> |
getMetaCells(org.apache.hadoop.hbase.TableName tableName)
Scan hbase:meta for
tableName content. |
private void |
getMetaReplicaReadRequests(org.apache.hadoop.hbase.regionserver.Region[] metaRegions,
long[] counters) |
private void |
primaryIncreaseReplicaIncrease(long[] before,
long[] after) |
private void |
primaryIncreaseReplicaNoChange(long[] before,
long[] after) |
private void |
primaryNoChangeReplicaIncrease(long[] before,
long[] after) |
void |
testCatalogReplicaReplicationWithFlushAndCompaction() |
void |
testCatalogReplicaReplicationWithReplicaMoved() |
void |
testHBaseMetaReplicaGets() |
void |
testHBaseMetaReplicates()
Test meta region replica replication.
|
private void |
verifyDeletedReplication(org.apache.hadoop.hbase.TableName tableName,
int regionReplication,
org.apache.hadoop.hbase.TableName deletedTableName)
Verify when a Table is deleted from primary, then there are no references in replicas (because
they get the delete of the table rows too).
|
protected void |
verifyReplication(org.apache.hadoop.hbase.TableName tableName,
int regionReplication,
int startRow,
int endRow,
byte[] family) |
private void |
verifyReplication(org.apache.hadoop.hbase.TableName tableName,
int regionReplication,
int startRow,
int endRow,
byte[] family,
boolean present) |
private void |
verifyReplication(org.apache.hadoop.hbase.TableName tableName,
int regionReplication,
List<org.apache.hadoop.hbase.client.Result> contains)
Verify Replicas have results (exactly).
|
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final int NB_SERVERS
private final HBaseTestingUtil HTU
private int numOfMetaReplica
private static byte[] VALUE
public org.junit.rules.TestName name
public TestMetaRegionReplicaReplication()
public void testHBaseMetaReplicates() throws Exception
Exception
public void testCatalogReplicaReplicationWithFlushAndCompaction() throws Exception
Exception
public void testCatalogReplicaReplicationWithReplicaMoved() throws Exception
Exception
protected void verifyReplication(org.apache.hadoop.hbase.TableName tableName, int regionReplication, int startRow, int endRow, byte[] family) throws Exception
Exception
private void verifyReplication(org.apache.hadoop.hbase.TableName tableName, int regionReplication, int startRow, int endRow, byte[] family, boolean present) throws Exception
Exception
private List<org.apache.hadoop.hbase.client.Result> getMetaCells(org.apache.hadoop.hbase.TableName tableName) throws IOException
tableName
content.IOException
private org.apache.hadoop.hbase.regionserver.Region[] getAllRegions(org.apache.hadoop.hbase.TableName tableName, int replication)
private void verifyDeletedReplication(org.apache.hadoop.hbase.TableName tableName, int regionReplication, org.apache.hadoop.hbase.TableName deletedTableName)
private boolean doesNotContain(List<org.apache.hadoop.hbase.Cell> cells, org.apache.hadoop.hbase.TableName tableName)
cells
.private void verifyReplication(org.apache.hadoop.hbase.TableName tableName, int regionReplication, List<org.apache.hadoop.hbase.client.Result> contains)
static boolean contains(List<org.apache.hadoop.hbase.client.Result> contains, List<org.apache.hadoop.hbase.Cell> cells) throws IOException
cells
has contains
at least.IOException
private void doNGets(org.apache.hadoop.hbase.client.Table table, byte[][] keys) throws Exception
Exception
private void primaryNoChangeReplicaIncrease(long[] before, long[] after)
private void primaryIncreaseReplicaNoChange(long[] before, long[] after)
private void primaryIncreaseReplicaIncrease(long[] before, long[] after)
private void getMetaReplicaReadRequests(org.apache.hadoop.hbase.regionserver.Region[] metaRegions, long[] counters)
public void testHBaseMetaReplicaGets() throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.