public class TestRegionReplicaFailover extends Object
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
protected byte[] |
fam |
protected byte[][] |
families |
private org.apache.hadoop.hbase.HTableDescriptor |
htd |
private static HBaseTestingUtility |
HTU |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private static int |
NB_SERVERS |
protected byte[] |
qual1 |
protected byte[] |
row |
protected byte[] |
row2 |
protected byte[] |
value1 |
Constructor and Description |
---|
TestRegionReplicaFailover() |
Modifier and Type | Method and Description |
---|---|
void |
after() |
void |
before() |
void |
testLotsOfRegionReplicas()
Tests the case where we are creating a table with a lot of regions and replicas.
|
void |
testPrimaryRegionKill()
Tests the case where killing a primary region with unflushed data recovers
|
void |
testSecondaryRegionKill()
Tests the case where killing a secondary region with unflushed data recovers, and the replica
becomes available to read again shortly.
|
void |
testSecondaryRegionKillWhilePrimaryIsAcceptingWrites()
Tests the case where there are 3 region replicas and the primary is continuously accepting
new writes while one of the secondaries is killed.
|
void |
testSecondaryRegionWithEmptyRegion()
Tests the case where a newly created table with region replicas and no data, the secondary
region replicas are available to read immediately.
|
void |
testSecondaryRegionWithNonEmptyRegion()
Tests the case where if there is some data in the primary region, reopening the region replicas
(enable/disable table, etc) makes the region replicas readable.
|
private void |
verifyNumericRowsWithTimeout(org.apache.hadoop.hbase.client.Table table,
byte[] f,
int startRow,
int endRow,
int replicaId,
long timeout)
wal replication is async, we have to wait until the replication catches up, or we timeout
|
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility HTU
private static final int NB_SERVERS
protected final byte[][] families
protected final byte[] fam
protected final byte[] qual1
protected final byte[] value1
protected final byte[] row
protected final byte[] row2
public org.junit.rules.TestName name
private org.apache.hadoop.hbase.HTableDescriptor htd
public TestRegionReplicaFailover()
public void testSecondaryRegionWithEmptyRegion() throws IOException
IOException
public void testSecondaryRegionWithNonEmptyRegion() throws IOException
IOException
public void testPrimaryRegionKill() throws Exception
Exception
private void verifyNumericRowsWithTimeout(org.apache.hadoop.hbase.client.Table table, byte[] f, int startRow, int endRow, int replicaId, long timeout) throws Exception
Exception
public void testSecondaryRegionKill() throws Exception
Exception
public void testSecondaryRegionKillWhilePrimaryIsAcceptingWrites() throws Exception
Exception
public void testLotsOfRegionReplicas() throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.