Package org.apache.hadoop.hbase.replication

Examples of org.apache.hadoop.hbase.replication.ReplicationPeers


          new Abortable() {
            @Override public void abort(String why, Throwable e) {}
            @Override public boolean isAborted() {return false;}
          });

      ReplicationPeers rp = ReplicationFactory.getReplicationPeers(localZKW, conf, localZKW);
      rp.init();

      Configuration peerConf = rp.getPeerConf(peerId);
      if (peerConf == null) {
        throw new IOException("Couldn't get peer conf!");
      }

      return ZKUtil.getZooKeeperClusterKey(peerConf);
View Full Code Here


              localZKW = new ZooKeeperWatcher(
                conf, "VerifyReplication", new Abortable() {
                @Override public void abort(String why, Throwable e) {}
                @Override public boolean isAborted() {return false;}
              });
              ReplicationPeers rp =
                  ReplicationFactory.getReplicationPeers(localZKW, conf, localZKW);
              rp.init();
              Configuration peerConf = rp.getPeerConf(peerId);
              if (peerConf == null) {
                throw new IOException("Couldn't get peer conf!");
              }
              HTable replicatedTable = new HTable(peerConf, conf.get(NAME + ".tableName"));
              scan.setStartRow(value.getRow());
View Full Code Here

          new Abortable() {
            @Override public void abort(String why, Throwable e) {}
            @Override public boolean isAborted() {return false;}
          });

      ReplicationPeers rp = ReplicationFactory.getReplicationPeers(localZKW, conf, localZKW);
      rp.init();

      Configuration peerConf = rp.getPeerConf(peerId);
      if (peerConf == null) {
        throw new IOException("Couldn't get peer conf!");
      }

      return ZKUtil.getZooKeeperClusterKey(peerConf);
View Full Code Here

              localZKW = new ZooKeeperWatcher(
                conf, "VerifyReplication", new Abortable() {
                @Override public void abort(String why, Throwable e) {}
                @Override public boolean isAborted() {return false;}
              });
              ReplicationPeers rp =
                  ReplicationFactory.getReplicationPeers(localZKW, conf, localZKW);
              rp.init();
              Configuration peerConf = rp.getPeerConf(peerId);
              if (peerConf == null) {
                throw new IOException("Couldn't get peer conf!");
              }
              HTable replicatedTable = new HTable(peerConf, conf.get(NAME + ".tableName"));
              scan.setStartRow(value.getRow());
View Full Code Here

          new Abortable() {
            @Override public void abort(String why, Throwable e) {}
            @Override public boolean isAborted() {return false;}
          });

      ReplicationPeers rp = ReplicationFactory.getReplicationPeers(localZKW, conf, localZKW);
      rp.init();

      Pair<ReplicationPeerConfig, Configuration> pair = rp.getPeerConf(peerId);
      if (pair == null) {
        throw new IOException("Couldn't get peer conf!");
      }
      Configuration peerConf = rp.getPeerConf(peerId).getSecond();
      return ZKUtil.getZooKeeperClusterKey(peerConf);
    } catch (ReplicationException e) {
      throw new IOException(
          "An error occured while trying to connect to the remove peer cluster", e);
    } finally {
View Full Code Here

    }
    Server s1 = new DummyServer("dummyserver1.example.org");
    ReplicationQueues rq1 =
        ReplicationFactory.getReplicationQueues(s1.getZooKeeper(), s1.getConfiguration(), s1);
    rq1.init(s1.getServerName().toString());
    ReplicationPeers rp1 =
        ReplicationFactory.getReplicationPeers(s1.getZooKeeper(), s1.getConfiguration(), s1);
    rp1.init();
    NodeFailoverWorker w1 =
        manager.new NodeFailoverWorker(server.getServerName().getServerName(), rq1, rp1, new UUID(
            new Long(1), new Long(2)));
    w1.start();
    w1.join(5000);
View Full Code Here

          new Abortable() {
            @Override public void abort(String why, Throwable e) {}
            @Override public boolean isAborted() {return false;}
          });

      ReplicationPeers rp = ReplicationFactory.getReplicationPeers(localZKW, conf, localZKW);
      rp.init();

      Configuration peerConf = rp.getPeerConf(peerId);
      if (peerConf == null) {
        throw new IOException("Couldn't get peer conf!");
      }

      return ZKUtil.getZooKeeperClusterKey(peerConf);
View Full Code Here

          new Abortable() {
            @Override public void abort(String why, Throwable e) {}
            @Override public boolean isAborted() {return false;}
          });

      ReplicationPeers rp = ReplicationFactory.getReplicationPeers(localZKW, conf, localZKW);
      rp.init();

      Pair<ReplicationPeerConfig, Configuration> pair = rp.getPeerConf(peerId);
      if (pair == null) {
        throw new IOException("Couldn't get peer conf!");
      }
      Configuration peerConf = rp.getPeerConf(peerId).getSecond();
      return ZKUtil.getZooKeeperClusterKey(peerConf);
    } catch (ReplicationException e) {
      throw new IOException(
          "An error occured while trying to connect to the remove peer cluster", e);
    } finally {
View Full Code Here

    @Before
    public void setUp() throws IOException {
        sepReplicationSource = new SepReplicationSource();
        Configuration conf = hbaseTestUtil.getConfiguration();
        ReplicationPeers replicationPeers = mock(ReplicationPeers.class);
        when(replicationPeers.getTableCFs(anyString())).thenReturn(null);
        sepReplicationSource.init(conf, FileSystem.get(conf), mock(ReplicationSourceManager.class),
                                  mock(ReplicationQueues.class), replicationPeers,
                                  mock(Stoppable.class), "/hbase.replication", UUID.randomUUID());
    }
View Full Code Here

          new Abortable() {
            @Override public void abort(String why, Throwable e) {}
            @Override public boolean isAborted() {return false;}
          });

      ReplicationPeers rp = ReplicationFactory.getReplicationPeers(localZKW, conf, localZKW);
      rp.init();

      Configuration peerConf = rp.getPeerConf(peerId);
      if (peerConf == null) {
        throw new IOException("Couldn't get peer conf!");
      }

      return ZKUtil.getZooKeeperClusterKey(peerConf);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.replication.ReplicationPeers

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.