org.apache.hadoop.hbase.procedure.ZKProcedureMemberRpcs.abort()方法的使用及代码示例

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

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

ZKProcedureMemberRpcs.abort介绍

[英]Pass along the found abort notification to the listener
[中]将发现的中止通知传递给侦听器

代码示例

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

private void watchForAbortedProcedures() {
 LOG.debug("Checking for aborted procedures on node: '" + zkController.getAbortZnode() + "'");
 try {
  // this is the list of the currently aborted procedues
  List<String> children = ZKUtil.listChildrenAndWatchForNewChildren(zkController.getWatcher(),
         zkController.getAbortZnode());
  if (children == null || children.isEmpty()) {
   return;
  }
  for (String node : children) {
   String abortNode = ZNodePaths.joinZNode(zkController.getAbortZnode(), node);
   abort(abortNode);
  }
 } catch (KeeperException e) {
  member.controllerConnectionFailure("Failed to list children for abort node:"
    + zkController.getAbortZnode(), e, null);
 }
}

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

@Override
public void nodeCreated(String path) {
 if (!isInProcedurePath(path)) {
  return;
 }
 LOG.info("Received created event:" + path);
 // if it is a simple start/end/abort then we just rewatch the node
 if (isAcquiredNode(path)) {
  waitForNewProcedures();
  return;
 } else if (isAbortNode(path)) {
  watchForAbortedProcedures();
  return;
 }
 String parent = ZKUtil.getParent(path);
 // if its the end barrier, the procedure can be completed
 if (isReachedNode(parent)) {
  receivedReachedGlobalBarrier(path);
  return;
 } else if (isAbortNode(parent)) {
  abort(path);
  return;
 } else if (isAcquiredNode(parent)) {
  startNewSubprocedure(path);
 } else {
  LOG.debug("Ignoring created notification for node:" + path);
 }
}

代码示例来源:origin: co.cask.hbase/hbase

private void watchForAbortedProcedures() {
 LOG.debug("Checking for aborted procedures on node: '" + zkController.getAbortZnode() + "'");
 try {
  // this is the list of the currently aborted procedues
  for (String node : ZKUtil.listChildrenAndWatchForNewChildren(zkController.getWatcher(),
   zkController.getAbortZnode())) {
   String abortNode = ZKUtil.joinZNode(zkController.getAbortZnode(), node);
   abort(abortNode);
  }
 } catch (KeeperException e) {
  member.controllerConnectionFailure("Failed to list children for abort node:"
    + zkController.getAbortZnode(), new IOException(e));
 }
}

代码示例来源:origin: co.cask.hbase/hbase

@Override
public void nodeCreated(String path) {
 if (!isInProcedurePath(path)) {
  return;
 }
 LOG.info("Received created event:" + path);
 // if it is a simple start/end/abort then we just rewatch the node
 if (isAcquiredNode(path)) {
  waitForNewProcedures();
  return;
 } else if (isAbortNode(path)) {
  watchForAbortedProcedures();
  return;
 }
 String parent = ZKUtil.getParent(path);
 // if its the end barrier, the procedure can be completed
 if (isReachedNode(parent)) {
  receivedReachedGlobalBarrier(path);
  return;
 } else if (isAbortNode(parent)) {
  abort(path);
  return;
 } else if (isAcquiredNode(parent)) {
  startNewSubprocedure(path);
 } else {
  LOG.debug("Ignoring created notification for node:" + path);
 }
}

代码示例来源:origin: harbby/presto-connectors

private void watchForAbortedProcedures() {
 LOG.debug("Checking for aborted procedures on node: '" + zkController.getAbortZnode() + "'");
 try {
  // this is the list of the currently aborted procedues
  for (String node : ZKUtil.listChildrenAndWatchForNewChildren(zkController.getWatcher(),
   zkController.getAbortZnode())) {
   String abortNode = ZKUtil.joinZNode(zkController.getAbortZnode(), node);
   abort(abortNode);
  }
 } catch (KeeperException e) {
  member.controllerConnectionFailure("Failed to list children for abort node:"
    + zkController.getAbortZnode(), e, null);
 }
}

代码示例来源:origin: harbby/presto-connectors

@Override
public void nodeCreated(String path) {
 if (!isInProcedurePath(path)) {
  return;
 }
 LOG.info("Received created event:" + path);
 // if it is a simple start/end/abort then we just rewatch the node
 if (isAcquiredNode(path)) {
  waitForNewProcedures();
  return;
 } else if (isAbortNode(path)) {
  watchForAbortedProcedures();
  return;
 }
 String parent = ZKUtil.getParent(path);
 // if its the end barrier, the procedure can be completed
 if (isReachedNode(parent)) {
  receivedReachedGlobalBarrier(path);
  return;
 } else if (isAbortNode(parent)) {
  abort(path);
  return;
 } else if (isAcquiredNode(parent)) {
  startNewSubprocedure(path);
 } else {
  LOG.debug("Ignoring created notification for node:" + path);
 }
}

相关文章