本文整理了Java中org.apache.hadoop.hbase.zookeeper.ZKAssign.getData()
方法的一些代码示例,展示了ZKAssign.getData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKAssign.getData()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.zookeeper.ZKAssign
类名称:ZKAssign
方法名:getData
[英]Gets the current data in the unassigned node for the specified region name or fully-qualified path.
Returns null if the region does not currently have a node.
Sets a watch on the node if the node exists.
[中]获取指定区域名称或完全限定路径的未分配节点中的当前数据。
如果区域当前没有节点,则返回null。
如果节点存在,则在节点上设置监视。
代码示例来源:origin: co.cask.hbase/hbase
/**
* @param path
* @return True if znode is in SPLIT or SPLITTING state.
* @throws KeeperException Can happen if the znode went away in meantime.
*/
private boolean isSplitOrSplitting(final String path) throws KeeperException {
boolean result = false;
// This may fail if the SPLIT or SPLITTING znode gets cleaned up before we
// can get data from it.
RegionTransitionData data = ZKAssign.getData(master.getZooKeeper(), path);
EventType evt = data.getEventType();
switch (evt) {
case RS_ZK_REGION_SPLIT:
case RS_ZK_REGION_SPLITTING:
result = true;
break;
default:
break;
}
return result;
}
代码示例来源:origin: co.cask.hbase/hbase
ZKAssign.getData(zkw, region.getEncodedName());
if (curData.getEventType() != data.getEventType()) {
代码示例来源:origin: co.cask.hbase/hbase
RegionTransitionData data = ZKAssign.getData(watcher,
regionInfo.getEncodedName());
代码示例来源:origin: harbby/presto-connectors
byte [] data = ZKAssign.getData(watcher, path);
if (data == null) {
LOG.info("Node " + path + " is gone");
代码示例来源:origin: co.cask.hbase/hbase
RegionTransitionData data = null;
try {
data = ZKAssign.getData(master.getZooKeeper(), hri.getEncodedName());
} catch (KeeperException e) {
master.abort("Unexpected ZK exception reading unassigned node for region="
代码示例来源:origin: harbby/presto-connectors
.getRegionMergeCoordination().processRegionMergeRequest(p, hri_a, hri_b, sn, std);
if (((ZkRegionMergeCoordination.ZkRegionMergeDetails) std).getZnodeVersion() == -1) {
byte[] data = ZKAssign.getData(watcher, encodedName);
EventType currentType = null;
if (data != null) {
代码示例来源:origin: harbby/presto-connectors
byte [] bytes = ZKAssign.getData(zkw, region.getEncodedName());
rt = getRegionTransition(bytes);
if (rt.getEventType() != EventType.M_ZK_REGION_OFFLINE) {
代码示例来源:origin: harbby/presto-connectors
if (((BaseCoordinatedStateManager) server.getCoordinatedStateManager())
.getSplitTransactionCoordination().processTransition(p, hri_a, hri_b, sn, std) == -1) {
byte[] data = ZKAssign.getData(watcher, encodedName);
EventType currentType = null;
if (data != null) {
代码示例来源:origin: harbby/presto-connectors
RegionTransition rt = null;
try {
byte [] data = ZKAssign.getData(watcher, hri.getEncodedName());
内容来源于网络,如有侵权,请联系作者删除!