Search in sources :

Example 16 with ReplicationPeer

use of org.apache.hadoop.hbase.replication.ReplicationPeer in project hbase by apache.

the class TestHBaseInterClusterReplicationEndpointFilterEdits method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    UTIL.startMiniCluster();
    ReplicationPeer replicationPeer = mock(ReplicationPeer.class);
    ReplicationPeerConfig rpc = mock(ReplicationPeerConfig.class);
    when(rpc.isSerial()).thenReturn(false);
    when(replicationPeer.getPeerConfig()).thenReturn(rpc);
    Context context = new Context(null, UTIL.getConfiguration(), UTIL.getConfiguration(), null, null, null, replicationPeer, null, null, null);
    endpoint = new HBaseInterClusterReplicationEndpoint();
    endpoint.init(context);
    UTIL.createTable(TABLE1, FAMILY);
}
Also used : Context(org.apache.hadoop.hbase.replication.ReplicationEndpoint.Context) ReplicationPeerConfig(org.apache.hadoop.hbase.replication.ReplicationPeerConfig) ReplicationPeer(org.apache.hadoop.hbase.replication.ReplicationPeer) BeforeClass(org.junit.BeforeClass)

Aggregations

ReplicationPeer (org.apache.hadoop.hbase.replication.ReplicationPeer)16 ReplicationPeerConfig (org.apache.hadoop.hbase.replication.ReplicationPeerConfig)10 Test (org.junit.Test)7 AtomicLong (java.util.concurrent.atomic.AtomicLong)6 Configuration (org.apache.hadoop.conf.Configuration)6 HBaseConfiguration (org.apache.hadoop.hbase.HBaseConfiguration)5 ArrayList (java.util.ArrayList)4 Path (org.apache.hadoop.fs.Path)4 RegionServerServices (org.apache.hadoop.hbase.regionserver.RegionServerServices)4 HashMap (java.util.HashMap)2 NavigableSet (java.util.NavigableSet)2 TreeSet (java.util.TreeSet)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 Cell (org.apache.hadoop.hbase.Cell)2 ReplicationEndpoint (org.apache.hadoop.hbase.replication.ReplicationEndpoint)2 WALEntryFilter (org.apache.hadoop.hbase.replication.WALEntryFilter)2 WAL (org.apache.hadoop.hbase.wal.WAL)2 WALEdit (org.apache.hadoop.hbase.wal.WALEdit)2 WALKeyImpl (org.apache.hadoop.hbase.wal.WALKeyImpl)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1