Search in sources :

Example 6 with ClusterId

use of org.apache.hadoop.hbase.ClusterId in project hbase by apache.

the class TestReplicationTrackerZKImpl method setUp.

@Before
public void setUp() throws Exception {
    zkw = HBaseTestingUtility.getZooKeeperWatcher(utility);
    String fakeRs1 = ZKUtil.joinZNode(zkw.znodePaths.rsZNode, "hostname1.example.org:1234");
    try {
        ZKClusterId.setClusterId(zkw, new ClusterId());
        rp = ReplicationFactory.getReplicationPeers(zkw, conf, zkw);
        rp.init();
        rt = ReplicationFactory.getReplicationTracker(zkw, rp, conf, zkw, new DummyServer(fakeRs1));
    } catch (Exception e) {
        fail("Exception during test setup: " + e);
    }
    rsRemovedCount = new AtomicInteger(0);
    rsRemovedData = "";
    plChangedCount = new AtomicInteger(0);
    plChangedData = new ArrayList<>();
    peerRemovedCount = new AtomicInteger(0);
    peerRemovedData = "";
}
Also used : ZKClusterId(org.apache.hadoop.hbase.zookeeper.ZKClusterId) ClusterId(org.apache.hadoop.hbase.ClusterId) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Before(org.junit.Before)

Aggregations

ClusterId (org.apache.hadoop.hbase.ClusterId)6 ZKClusterId (org.apache.hadoop.hbase.zookeeper.ZKClusterId)3 IOException (java.io.IOException)2 Path (org.apache.hadoop.fs.Path)2 DeserializationException (org.apache.hadoop.hbase.exceptions.DeserializationException)2 ZooKeeperWatcher (org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher)2 EOFException (java.io.EOFException)1 InterruptedIOException (java.io.InterruptedIOException)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 Configuration (org.apache.hadoop.conf.Configuration)1 FSDataInputStream (org.apache.hadoop.fs.FSDataInputStream)1 FileStatus (org.apache.hadoop.fs.FileStatus)1 LocatedFileStatus (org.apache.hadoop.fs.LocatedFileStatus)1 ClusterStatus (org.apache.hadoop.hbase.ClusterStatus)1 HColumnDescriptor (org.apache.hadoop.hbase.HColumnDescriptor)1 HRegionInfo (org.apache.hadoop.hbase.HRegionInfo)1 HTableDescriptor (org.apache.hadoop.hbase.HTableDescriptor)1 ServerName (org.apache.hadoop.hbase.ServerName)1 RegionState (org.apache.hadoop.hbase.master.RegionState)1 ByteString (org.apache.hadoop.hbase.shaded.com.google.protobuf.ByteString)1