本文整理了Java中org.apache.hadoop.hbase.zookeeper.ZKAssign.getRegionName()
方法的一些代码示例,展示了ZKAssign.getRegionName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKAssign.getRegionName()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.zookeeper.ZKAssign
类名称:ZKAssign
方法名:getRegionName
[英]Gets the region name from the full path node name of an unassigned node.
[中]从未分配节点的完整路径节点名称中获取区域名称。
代码示例来源:origin: harbby/presto-connectors
@Override
public void nodeDeleted(final String path) {
if (path.startsWith(watcher.assignmentZNode)) {
final String regionName = ZKAssign.getRegionName(watcher, path);
zkEventWorkersSubmit(new RegionRunnable() {
@Override
代码示例来源:origin: harbby/presto-connectors
final String regionName = ZKAssign.getRegionName(watcher, path);
代码示例来源:origin: co.cask.hbase/hbase
@Override
public void nodeDeleted(final String path) {
if (path.startsWith(this.watcher.assignmentZNode)) {
String regionName = ZKAssign.getRegionName(this.master.getZooKeeper(), path);
RegionState rs = this.regionsInTransition.get(regionName);
if (rs != null) {
HRegionInfo regionInfo = rs.getRegion();
if (rs.isSplit()) {
LOG.debug("Ephemeral node deleted, regionserver crashed?, offlining the region"
+ rs.getRegion() + " clearing from RIT;");
regionOffline(rs.getRegion());
} else if (rs.isSplitting()) {
LOG.debug("Ephemeral node deleted. Found in SPLITTING state. " + "Removing from RIT "
+ rs.getRegion());
synchronized(this.regionsInTransition) {
this.regionsInTransition.remove(regionName);
}
} else {
LOG.debug("The znode of region " + regionInfo.getRegionNameAsString()
+ " has been deleted.");
if (rs.isOpened()) {
makeRegionOnline(rs, regionInfo);
}
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!