org.apache.hadoop.hbase.ZNodeClearer.deleteMyEphemeralNodeOnDisk()方法的使用及代码示例

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

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

ZNodeClearer.deleteMyEphemeralNodeOnDisk介绍

[英]delete the znode file
[中]删除znode文件

代码示例

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

public void stop() {
  try {
   synchronized (clusterHasActiveMaster) {
    // Master is already stopped, wake up the manager
    // thread so that it can shutdown soon.
    clusterHasActiveMaster.notifyAll();
   }
   // If our address is in ZK, delete it on our way out
   ServerName activeMaster = null;
   try {
    activeMaster = MasterAddressTracker.getMasterAddress(this.watcher);
   } catch (IOException e) {
    LOG.warn("Failed get of master address: " + e.toString());
   }
   if (activeMaster != null &&  activeMaster.equals(this.sn)) {
    ZKUtil.deleteNode(watcher, watcher.getZNodePaths().masterAddressZNode);
    // We may have failed to delete the znode at the previous step, but
    //  we delete the file anyway: a second attempt to delete the znode is likely to fail again.
    ZNodeClearer.deleteMyEphemeralNodeOnDisk();
   }
  } catch (KeeperException e) {
   LOG.debug(this.watcher.prefix("Failed delete of our master address node; " +
     e.getMessage()));
  }
 }
}

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

ZNodeClearer.deleteMyEphemeralNodeOnDisk();
} else {
 msg = "Another master is the active master, " + currentMaster +

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

ZNodeClearer.deleteMyEphemeralNodeOnDisk();

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

public void stop() {
  try {
   synchronized (clusterHasActiveMaster) {
    // Master is already stopped, wake up the manager
    // thread so that it can shutdown soon.
    clusterHasActiveMaster.notifyAll();
   }
   // If our address is in ZK, delete it on our way out
   ServerName activeMaster = null;
   try {
    activeMaster = MasterAddressTracker.getMasterAddress(this.watcher);
   } catch (IOException e) {
    LOG.warn("Failed get of master address: " + e.toString());
   }
   if (activeMaster != null &&  activeMaster.equals(this.sn)) {
    ZKUtil.deleteNode(watcher, watcher.getMasterAddressZNode());
    // We may have failed to delete the znode at the previous step, but
    //  we delete the file anyway: a second attempt to delete the znode is likely to fail again.
    ZNodeClearer.deleteMyEphemeralNodeOnDisk();
   }
  } catch (KeeperException e) {
   LOG.error(this.watcher.prefix("Error deleting our own master address node"), e);
  }
 }
}

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

ZNodeClearer.deleteMyEphemeralNodeOnDisk();
} else {
 msg = "Another master is the active master, " + currentMaster +

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

ZNodeClearer.deleteMyEphemeralNodeOnDisk();

相关文章