gpt4 book ai didi

org.apache.hadoop.hbase.YouAreDeadException类的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 12:27:31 24 4
gpt4 key购买 nike

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

YouAreDeadException介绍

[英]This exception is thrown by the master when a region server reports and is already being processed as dead. This can happen when a region server loses its session but didn't figure it yet.
[中]当区域服务器报告并已被处理为死机时,主服务器会引发此异常。当区域服务器丢失其会话但尚未找到它时,可能会发生这种情况。

代码示例

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

/**
 * If this server is on the dead list, reject it with a YouAreDeadException.
 * If it was dead but came back with a new start code, remove the old entry
 * from the dead list.
 * @param what START or REPORT
 */
private void checkIsDead(final ServerName serverName, final String what)
  throws YouAreDeadException {
 if (this.deadservers.isDeadServer(serverName)) {
  // host name, port and start code all match with existing one of the
  // dead servers. So, this server must be dead.
  String message = "Server " + what + " rejected; currently processing " +
    serverName + " as dead server";
  LOG.debug(message);
  throw new YouAreDeadException(message);
 }
 // remove dead server with same hostname and port of newly checking in rs after master
 // initialization.See HBASE-5916 for more information.
 if ((this.master == null || this.master.isInitialized())
   && this.deadservers.cleanPreviousInstance(serverName)) {
  // This server has now become alive after we marked it as dead.
  // We removed it's previous entry from the dead list to reflect it.
  LOG.debug(what + ":" + " Server " + serverName + " came back up," +
    " removed it from the dead servers list");
 }
}

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

/**
 * If this server is on the dead list, reject it with a YouAreDeadException.
 * If it was dead but came back with a new start code, remove the old entry
 * from the dead list.
 * @param serverName
 * @param what START or REPORT
 * @throws YouAreDeadException
 */
private void checkIsDead(final ServerName serverName, final String what)
  throws YouAreDeadException {
 if (this.deadservers.isDeadServer(serverName)) {
  // host name, port and start code all match with existing one of the
  // dead servers. So, this server must be dead.
  String message = "Server " + what + " rejected; currently processing " +
    serverName + " as dead server";
  LOG.debug(message);
  throw new YouAreDeadException(message);
 }
 // remove dead server with same hostname and port of newly checking in rs after master
 // initialization.See HBASE-5916 for more information.
 if ((this.services == null || ((HMaster) this.services).isInitialized())
   && this.deadservers.cleanPreviousInstance(serverName)) {
  // This server has now become alive after we marked it as dead.
  // We removed it's previous entry from the dead list to reflect it.
  LOG.debug(what + ":" + " Server " + serverName + " came back up," +
    " removed it from the dead servers list");
 }
}

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

/**
 * If this server is on the dead list, reject it with a YouAreDeadException.
 * If it was dead but came back with a new start code, remove the old entry
 * from the dead list.
 * @param serverName
 * @param what START or REPORT
 * @throws org.apache.hadoop.hbase.YouAreDeadException
 */
private void checkIsDead(final ServerName serverName, final String what)
  throws YouAreDeadException {
 if (this.deadservers.isDeadServer(serverName)) {
  // host name, port and start code all match with existing one of the
  // dead servers. So, this server must be dead.
  String message = "Server " + what + " rejected; currently processing " +
    serverName + " as dead server";
  LOG.debug(message);
  throw new YouAreDeadException(message);
 }
 // remove dead server with same hostname and port of newly checking in rs after master
 // initialization.See HBASE-5916 for more information.
 if ((this.services == null || ((HMaster) this.services).isInitialized())
   && this.deadservers.cleanPreviousInstance(serverName)) {
  // This server has now become alive after we marked it as dead.
  // We removed it's previous entry from the dead list to reflect it.
  LOG.debug(what + ":" + " Server " + serverName + " came back up," +
    " removed it from the dead servers list");
 }
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com