public class TestReplicateToReplica extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TestReplicateToReplica.HRegionForTest |
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.hbase.client.AsyncClusterConnection |
conn |
private static org.apache.hadoop.hbase.executor.ExecutorService |
EXEC |
private static byte[] |
FAMILY |
private org.apache.hadoop.hbase.regionserver.FlushRequester |
flushRequester |
private org.apache.hadoop.hbase.regionserver.regionreplication.RegionReplicationBufferManager |
manager |
TableNameTestRule |
name |
private org.apache.hadoop.hbase.regionserver.HRegion |
primary |
private static byte[] |
QUAL |
private boolean |
queueReqAndResps |
private Queue<org.apache.hadoop.hbase.util.Pair<List<org.apache.hadoop.hbase.wal.WAL.Entry>,CompletableFuture<Void>>> |
reqAndResps |
private org.apache.hadoop.hbase.regionserver.RegionServerServices |
rss |
private org.apache.hadoop.hbase.regionserver.HRegion |
secondary |
private org.apache.hadoop.hbase.TableName |
tableName |
private org.apache.hadoop.hbase.client.TableDescriptor |
td |
private org.apache.hadoop.fs.Path |
testDir |
private static List<org.apache.hadoop.hbase.client.Put> |
TO_ADD_AFTER_PREPARE_FLUSH |
private static HBaseTestingUtil |
UTIL |
private org.apache.hadoop.hbase.wal.WALFactory |
walFactory |
Constructor and Description |
---|
TestReplicateToReplica() |
Modifier and Type | Method and Description |
---|---|
private void |
failAll() |
private void |
failOne() |
private org.apache.hadoop.hbase.regionserver.HRegion.FlushResult |
flushPrimary() |
private void |
replicate(org.apache.hadoop.hbase.util.Pair<List<org.apache.hadoop.hbase.wal.WAL.Entry>,CompletableFuture<Void>> pair) |
private void |
replicateAll() |
private void |
replicateOne() |
void |
setUp() |
static void |
setUpBeforeClass() |
void |
tearDown() |
static void |
tearDownAfterClass() |
void |
testCatchUpWithCannotFlush() |
void |
testCatchUpWithReopen() |
void |
testErrorAfterFlushStartBeforeFlushCommit() |
void |
testErrorBeforeFlushStart() |
void |
testNormalFlush() |
void |
testNormalReplicate() |
public static final HBaseClassTestRule CLASS_RULE
private static final HBaseTestingUtil UTIL
private static byte[] FAMILY
private static byte[] QUAL
private static org.apache.hadoop.hbase.executor.ExecutorService EXEC
public final TableNameTestRule name
private org.apache.hadoop.hbase.TableName tableName
private org.apache.hadoop.fs.Path testDir
private org.apache.hadoop.hbase.client.TableDescriptor td
private org.apache.hadoop.hbase.regionserver.RegionServerServices rss
private org.apache.hadoop.hbase.client.AsyncClusterConnection conn
private org.apache.hadoop.hbase.regionserver.regionreplication.RegionReplicationBufferManager manager
private org.apache.hadoop.hbase.regionserver.FlushRequester flushRequester
private org.apache.hadoop.hbase.regionserver.HRegion primary
private org.apache.hadoop.hbase.regionserver.HRegion secondary
private org.apache.hadoop.hbase.wal.WALFactory walFactory
private boolean queueReqAndResps
private Queue<org.apache.hadoop.hbase.util.Pair<List<org.apache.hadoop.hbase.wal.WAL.Entry>,CompletableFuture<Void>>> reqAndResps
private static List<org.apache.hadoop.hbase.client.Put> TO_ADD_AFTER_PREPARE_FLUSH
public TestReplicateToReplica()
public static void setUpBeforeClass()
public static void tearDownAfterClass()
public void setUp() throws IOException
IOException
public void tearDown() throws IOException
IOException
private org.apache.hadoop.hbase.regionserver.HRegion.FlushResult flushPrimary() throws IOException
IOException
private void replicate(org.apache.hadoop.hbase.util.Pair<List<org.apache.hadoop.hbase.wal.WAL.Entry>,CompletableFuture<Void>> pair) throws IOException
IOException
private void replicateOne() throws IOException
IOException
private void replicateAll() throws IOException
IOException
private void failOne()
private void failAll()
public void testNormalReplicate() throws IOException
IOException
public void testNormalFlush() throws IOException
IOException
public void testErrorBeforeFlushStart() throws IOException
IOException
public void testErrorAfterFlushStartBeforeFlushCommit() throws IOException
IOException
public void testCatchUpWithCannotFlush() throws IOException, InterruptedException
IOException
InterruptedException
public void testCatchUpWithReopen() throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.