Class TestRegionReplicaFailover
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestRegionReplicaFailover
Tests failover of secondary region replicas.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
protected final byte[]
protected final byte[][]
private org.apache.hadoop.hbase.client.TableDescriptor
private static final HBaseTestingUtil
private static final org.slf4j.Logger
org.junit.rules.TestName
private static final int
protected final byte[]
protected final byte[]
protected final byte[]
protected final byte[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
after()
void
before()
void
Tests the case where we are creating a table with a lot of regions and replicas.void
Tests the case where killing a primary region with unflushed data recoversvoid
Tests the case where killing a secondary region with unflushed data recovers, and the replica becomes available to read again shortly.void
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
Tests the case where a newly created table with region replicas and no data, the secondary region replicas are available to read immediately.void
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
-
Field Details
-
CLASS_RULE
-
LOG
-
HTU
-
NB_SERVERS
- See Also:
-
families
-
fam
-
qual1
-
value1
-
row
-
row2
-
name
-
htd
-
-
Constructor Details
-
TestRegionReplicaFailover
public TestRegionReplicaFailover()
-
-
Method Details
-
before
- Throws:
Exception
-
after
- Throws:
Exception
-
testSecondaryRegionWithEmptyRegion
Tests the case where a newly created table with region replicas and no data, the secondary region replicas are available to read immediately.- Throws:
IOException
-
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.- Throws:
IOException
-
testPrimaryRegionKill
Tests the case where killing a primary region with unflushed data recovers- Throws:
Exception
-
verifyNumericRowsWithTimeout
private void verifyNumericRowsWithTimeout(org.apache.hadoop.hbase.client.Table table, byte[] f, int startRow, int endRow, int replicaId, long timeout) throws Exception wal replication is async, we have to wait until the replication catches up, or we timeout- Throws:
Exception
-
testSecondaryRegionKill
Tests the case where killing a secondary region with unflushed data recovers, and the replica becomes available to read again shortly.- Throws:
Exception
-
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. Verification is done for both of the secondary replicas.- Throws:
Exception
-
testLotsOfRegionReplicas
Tests the case where we are creating a table with a lot of regions and replicas. Opening region replicas should not block handlers on RS indefinitely.- Throws:
IOException
-