Java 类org.apache.hadoop.hbase.replication.ReplicationZookeeper.PeerState 实例源码

项目:LCIndex-HBase-0.94.16    文件:ReplicationPeer.java   
/**
 * start a state tracker to check whether this peer is enabled or not
 *
 * @param zookeeper zk watcher for the local cluster
 * @param peerStateNode path to zk node which stores peer state
 * @throws KeeperException
 */
public void startStateTracker(ZooKeeperWatcher zookeeper, String peerStateNode)
    throws KeeperException {
  if (ZKUtil.checkExists(zookeeper, peerStateNode) == -1) {
    // There is a race b/w PeerWatcher and ReplicationZookeeper#add method to create the
    // peer-state znode. This happens while adding a peer.
    // The peer state data is set as "ENABLED" by default.
    ZKUtil.createNodeIfNotExistsAndWatch(zookeeper, peerStateNode,
      Bytes.toBytes(PeerState.ENABLED.name()));
  }
  this.peerStateTracker = new PeerStateTracker(peerStateNode, zookeeper,
      this);
  this.peerStateTracker.start();
  this.readPeerStateZnode();
}
项目:IRIndex    文件:ReplicationPeer.java   
/**
 * start a state tracker to check whether this peer is enabled or not
 *
 * @param zookeeper zk watcher for the local cluster
 * @param peerStateNode path to zk node which stores peer state
 * @throws KeeperException
 */
public void startStateTracker(ZooKeeperWatcher zookeeper, String peerStateNode)
    throws KeeperException {
  if (ZKUtil.checkExists(zookeeper, peerStateNode) == -1) {
    // There is a race b/w PeerWatcher and ReplicationZookeeper#add method to create the
    // peer-state znode. This happens while adding a peer.
    // The peer state data is set as "ENABLED" by default.
    ZKUtil.createNodeIfNotExistsAndWatch(zookeeper, peerStateNode,
      Bytes.toBytes(PeerState.ENABLED.name()));
  }
  this.peerStateTracker = new PeerStateTracker(peerStateNode, zookeeper,
      this);
  this.peerStateTracker.start();
  this.readPeerStateZnode();
}
项目:HBase-Research    文件:ReplicationPeer.java   
/**
 * start a state tracker to check whether this peer is enabled or not
 *
 * @param zookeeper zk watcher for the local cluster
 * @param peerStateNode path to zk node which stores peer state
 * @throws KeeperException
 */
public void startStateTracker(ZooKeeperWatcher zookeeper, String peerStateNode)
    throws KeeperException {
  if (ZKUtil.checkExists(zookeeper, peerStateNode) == -1) {
    // There is a race b/w PeerWatcher and ReplicationZookeeper#add method to create the
    // peer-state znode. This happens while adding a peer.
    // The peer state data is set as "ENABLED" by default.
    ZKUtil.createNodeIfNotExistsAndWatch(zookeeper, peerStateNode,
      Bytes.toBytes(PeerState.ENABLED.name()));
  }
  this.peerStateTracker = new PeerStateTracker(peerStateNode, zookeeper,
      this);
  this.peerStateTracker.start();
  this.readPeerStateZnode();
}
项目:hbase-0.94.8-qod    文件:ReplicationPeer.java   
/**
 * start a state tracker to check whether this peer is enabled or not
 *
 * @param zookeeper zk watcher for the local cluster
 * @param peerStateNode path to zk node which stores peer state
 * @throws KeeperException
 */
public void startStateTracker(ZooKeeperWatcher zookeeper, String peerStateNode)
    throws KeeperException {
  if (ZKUtil.checkExists(zookeeper, peerStateNode) == -1) {
    // There is a race b/w PeerWatcher and ReplicationZookeeper#add method to create the
    // peer-state znode. This happens while adding a peer.
    // The peer state data is set as "ENABLED" by default.
    ZKUtil.createNodeIfNotExistsAndWatch(zookeeper, peerStateNode,
      Bytes.toBytes(PeerState.ENABLED.name()));
  }
  this.peerStateTracker = new PeerStateTracker(peerStateNode, zookeeper,
      this);
  this.peerStateTracker.start();
  this.readPeerStateZnode();
}
项目:hbase-0.94.8-qod    文件:ReplicationPeer.java   
/**
 * start a state tracker to check whether this peer is enabled or not
 *
 * @param zookeeper zk watcher for the local cluster
 * @param peerStateNode path to zk node which stores peer state
 * @throws KeeperException
 */
public void startStateTracker(ZooKeeperWatcher zookeeper, String peerStateNode)
    throws KeeperException {
  if (ZKUtil.checkExists(zookeeper, peerStateNode) == -1) {
    // There is a race b/w PeerWatcher and ReplicationZookeeper#add method to create the
    // peer-state znode. This happens while adding a peer.
    // The peer state data is set as "ENABLED" by default.
    ZKUtil.createNodeIfNotExistsAndWatch(zookeeper, peerStateNode,
      Bytes.toBytes(PeerState.ENABLED.name()));
  }
  this.peerStateTracker = new PeerStateTracker(peerStateNode, zookeeper,
      this);
  this.peerStateTracker.start();
  this.readPeerStateZnode();
}
项目:hindex    文件:ReplicationPeer.java   
/**
 * start a state tracker to check whether this peer is enabled or not
 *
 * @param zookeeper zk watcher for the local cluster
 * @param peerStateNode path to zk node which stores peer state
 * @throws KeeperException
 */
public void startStateTracker(ZooKeeperWatcher zookeeper, String peerStateNode)
    throws KeeperException {
  if (ZKUtil.checkExists(zookeeper, peerStateNode) == -1) {
    // There is a race b/w PeerWatcher and ReplicationZookeeper#add method to create the
    // peer-state znode. This happens while adding a peer.
    // The peer state data is set as "ENABLED" by default.
    ZKUtil.createNodeIfNotExistsAndWatch(zookeeper, peerStateNode,
      Bytes.toBytes(PeerState.ENABLED.name()));
  }
  this.peerStateTracker = new PeerStateTracker(peerStateNode, zookeeper,
      this);
  this.peerStateTracker.start();
  this.readPeerStateZnode();
}
项目:LCIndex-HBase-0.94.16    文件:ReplicationPeer.java   
private void readPeerStateZnode() {
  String currentState = Bytes.toString(peerStateTracker.getData(false));
  this.peerEnabled.set(PeerState.ENABLED.equals(PeerState
      .valueOf(currentState)));
}
项目:IRIndex    文件:ReplicationPeer.java   
private void readPeerStateZnode() {
  String currentState = Bytes.toString(peerStateTracker.getData(false));
  this.peerEnabled.set(PeerState.ENABLED.equals(PeerState
      .valueOf(currentState)));
}
项目:HBase-Research    文件:ReplicationPeer.java   
private void readPeerStateZnode() {
  String currentState = Bytes.toString(peerStateTracker.getData(false));
  this.peerEnabled.set(PeerState.ENABLED.equals(PeerState
      .valueOf(currentState)));
}
项目:hbase-0.94.8-qod    文件:ReplicationPeer.java   
private void readPeerStateZnode() {
  String currentState = Bytes.toString(peerStateTracker.getData(false));
  this.peerEnabled.set(PeerState.ENABLED.equals(PeerState
      .valueOf(currentState)));
}
项目:hbase-0.94.8-qod    文件:ReplicationPeer.java   
private void readPeerStateZnode() {
  String currentState = Bytes.toString(peerStateTracker.getData(false));
  this.peerEnabled.set(PeerState.ENABLED.equals(PeerState
      .valueOf(currentState)));
}
项目:hindex    文件:ReplicationPeer.java   
private void readPeerStateZnode() {
  String currentState = Bytes.toString(peerStateTracker.getData(false));
  this.peerEnabled.set(PeerState.ENABLED.equals(PeerState
      .valueOf(currentState)));
}