org.apache.hadoop.hbase.zookeeper.ZKNodeTracker.nodeDataChanged()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.apache.hadoop.hbase.zookeeper.ZKNodeTracker.nodeDataChanged()方法的一些代码示例,展示了ZKNodeTracker.nodeDataChanged()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKNodeTracker.nodeDataChanged()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.zookeeper.ZKNodeTracker
类名称:ZKNodeTracker
方法名:nodeDataChanged

ZKNodeTracker.nodeDataChanged介绍

暂无

代码示例

代码示例来源:origin: apache/hbase

/**
 * Set the switch on/off
 * @param enabled switch enabled or not?
 * @throws KeeperException keepException will be thrown out
 */
public void setSwitchEnabled(boolean enabled) throws KeeperException {
 byte [] upData = toByteArray(enabled);
 try {
  ZKUtil.setData(watcher, node, upData);
 } catch(KeeperException.NoNodeException nne) {
  ZKUtil.createAndWatch(watcher, node, upData);
 }
 super.nodeDataChanged(node);
}

代码示例来源:origin: apache/hbase

/**
 * Set the balancer on/off.
 *
 * @param balancerOn true if the balancher should be on, false otherwise
 * @throws KeeperException if a ZooKeeper operation fails
 */
public void setBalancerOn(boolean balancerOn) throws KeeperException {
 byte [] upData = toByteArray(balancerOn);
 try {
  ZKUtil.setData(watcher, watcher.getZNodePaths().balancerZNode, upData);
 } catch(KeeperException.NoNodeException nne) {
  ZKUtil.createAndWatch(watcher, watcher.getZNodePaths().balancerZNode, upData);
 }
 super.nodeDataChanged(watcher.getZNodePaths().balancerZNode);
}

代码示例来源:origin: apache/hbase

/**
 * Set region normalizer on/off
 * @param normalizerOn whether normalizer should be on or off
 * @throws KeeperException if a ZooKeeper operation fails
 */
public void setNormalizerOn(boolean normalizerOn) throws KeeperException {
 byte [] upData = toByteArray(normalizerOn);
 try {
  ZKUtil.setData(watcher, watcher.getZNodePaths().regionNormalizerZNode, upData);
 } catch(KeeperException.NoNodeException nne) {
  ZKUtil.createAndWatch(watcher, watcher.getZNodePaths().regionNormalizerZNode, upData);
 }
 super.nodeDataChanged(watcher.getZNodePaths().regionNormalizerZNode);
}

代码示例来源:origin: org.apache.hbase/hbase-zookeeper

/**
 * Set region normalizer on/off
 * @param normalizerOn whether normalizer should be on or off
 * @throws KeeperException if a ZooKeeper operation fails
 */
public void setNormalizerOn(boolean normalizerOn) throws KeeperException {
 byte [] upData = toByteArray(normalizerOn);
 try {
  ZKUtil.setData(watcher, watcher.getZNodePaths().regionNormalizerZNode, upData);
 } catch(KeeperException.NoNodeException nne) {
  ZKUtil.createAndWatch(watcher, watcher.getZNodePaths().regionNormalizerZNode, upData);
 }
 super.nodeDataChanged(watcher.getZNodePaths().regionNormalizerZNode);
}

代码示例来源:origin: org.apache.hbase/hbase-zookeeper

/**
 * Set the balancer on/off.
 *
 * @param balancerOn true if the balancher should be on, false otherwise
 * @throws KeeperException if a ZooKeeper operation fails
 */
public void setBalancerOn(boolean balancerOn) throws KeeperException {
 byte [] upData = toByteArray(balancerOn);
 try {
  ZKUtil.setData(watcher, watcher.getZNodePaths().balancerZNode, upData);
 } catch(KeeperException.NoNodeException nne) {
  ZKUtil.createAndWatch(watcher, watcher.getZNodePaths().balancerZNode, upData);
 }
 super.nodeDataChanged(watcher.getZNodePaths().balancerZNode);
}

相关文章