Class TestRegionReplicaFailover
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestRegionReplicaFailover
Tests failover of secondary region replicas.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprotected final byte[]protected final byte[][]private org.apache.hadoop.hbase.client.TableDescriptorprivate static final HBaseTestingUtilprivate static final org.slf4j.Loggerorg.junit.rules.TestNameprivate static final intprotected final byte[]protected final byte[]protected final byte[]protected final byte[]
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidafter()voidbefore()voidTests the case where we are creating a table with a lot of regions and replicas.voidTests the case where killing a primary region with unflushed data recoversvoidTests the case where killing a secondary region with unflushed data recovers, and the replica becomes available to read again shortly.voidTests the case where there are 3 region replicas and the primary is continuously accepting new writes while one of the secondaries is killed.voidTests the case where a newly created table with region replicas and no data, the secondary region replicas are available to read immediately.voidTests 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 voidverifyNumericRowsWithTimeout(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- 
TestRegionReplicaFailoverpublic TestRegionReplicaFailover()
 
- 
- 
Method Details- 
before- Throws:
- Exception
 
- 
after- Throws:
- Exception
 
- 
testSecondaryRegionWithEmptyRegionTests the case where a newly created table with region replicas and no data, the secondary region replicas are available to read immediately.- Throws:
- IOException
 
- 
testSecondaryRegionWithNonEmptyRegionTests 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
 
- 
testPrimaryRegionKillTests the case where killing a primary region with unflushed data recovers- Throws:
- Exception
 
- 
verifyNumericRowsWithTimeoutprivate 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
 
- 
testSecondaryRegionKillTests the case where killing a secondary region with unflushed data recovers, and the replica becomes available to read again shortly.- Throws:
- Exception
 
- 
testSecondaryRegionKillWhilePrimaryIsAcceptingWritesTests 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
 
- 
testLotsOfRegionReplicasTests 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
 
 
-