• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ReportRSFatalErrorRequest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRSFatalErrorRequest的典型用法代码示例。如果您正苦于以下问题:Java ReportRSFatalErrorRequest类的具体用法?Java ReportRSFatalErrorRequest怎么用?Java ReportRSFatalErrorRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ReportRSFatalErrorRequest类属于org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos包,在下文中一共展示了ReportRSFatalErrorRequest类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: reportRSFatalError

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRSFatalErrorRequest; //导入依赖的package包/类
@Override
public ReportRSFatalErrorResponse reportRSFatalError(
    RpcController controller, ReportRSFatalErrorRequest request) throws ServiceException {
  String errorText = request.getErrorMessage();
  ServerName sn = ProtobufUtil.toServerName(request.getServer());
  String msg = "Region server " + sn
    + " reported a fatal error:\n" + errorText;
  LOG.error(msg);
  master.rsFatals.add(msg);
  return ReportRSFatalErrorResponse.newBuilder().build();
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:12,代码来源:MasterRpcServices.java


示例2: abort

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRSFatalErrorRequest; //导入依赖的package包/类
/**
 * Cause the server to exit without closing the regions it is serving, the log
 * it is using and without notifying the master. Used unit testing and on
 * catastrophic events such as HDFS is yanked out from under hbase or we OOME.
 *
 * @param reason the reason we are aborting
 * @param cause  the exception that caused the abort, or null
 */
@Override public void abort(String reason, Throwable cause) {
  String msg = "ABORTING region server " + this + ": " + reason;
  if (cause != null) {
    LOG.fatal(msg, cause);
  } else {
    LOG.fatal(msg);
  }
  this.abortRequested = true;
  // HBASE-4014: show list of coprocessors that were loaded to help debug
  // regionserver crashes.Note that we're implicitly using
  // java.util.HashSet's toString() method to print the coprocessor names.
  LOG.fatal(
      "RegionServer abort: loaded coprocessors are: " + CoprocessorHost.getLoadedCoprocessors());
  // Try and dump metrics if abort -- might give clue as to how fatal came about....
  try {
    LOG.info("Dump of metrics as JSON on abort: " + JSONBean.dumpRegionServerMetrics());
  } catch (MalformedObjectNameException | IOException e) {
    LOG.warn("Failed dumping metrics", e);
  }

  // Do our best to report our abort to the master, but this may not work
  try {
    if (cause != null) {
      msg += "\nCause:\n" + StringUtils.stringifyException(cause);
    }
    // Report to the master but only if we have already registered with the master.
    if (rssStub != null && this.serverName != null) {
      ReportRSFatalErrorRequest.Builder builder = ReportRSFatalErrorRequest.newBuilder();
      ServerName sn = ServerName.parseVersionedServerName(this.serverName.getVersionedBytes());
      builder.setServer(ProtobufUtil.toServerName(sn));
      builder.setErrorMessage(msg);
      rssStub.reportRSFatalError(null, builder.build());
    }
  } catch (Throwable t) {
    LOG.warn("Unable to report fatal error to master", t);
  }
  stop(reason);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:47,代码来源:HRegionServer.java


示例3: reportRSFatalError

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRSFatalErrorRequest; //导入依赖的package包/类
@Override
public ReportRSFatalErrorResponse reportRSFatalError(
    RpcController controller, ReportRSFatalErrorRequest request) throws ServiceException {
  String errorText = request.getErrorMessage();
  ServerName sn = ProtobufUtil.toServerName(request.getServer());
  String msg = "Region server " + sn +
    " reported a fatal error:\n" + errorText;
  LOG.error(msg);
  rsFatals.add(msg);

  return ReportRSFatalErrorResponse.newBuilder().build();
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:13,代码来源:HMaster.java


示例4: abort

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRSFatalErrorRequest; //导入依赖的package包/类
/**
 * Cause the server to exit without closing the regions it is serving, the log
 * it is using and without notifying the master. Used unit testing and on
 * catastrophic events such as HDFS is yanked out from under hbase or we OOME.
 *
 * @param reason
 *          the reason we are aborting
 * @param cause
 *          the exception that caused the abort, or null
 */
@Override
public void abort(String reason, Throwable cause) {
  String msg = "ABORTING region server " + this + ": " + reason;
  if (cause != null) {
    LOG.fatal(msg, cause);
  } else {
    LOG.fatal(msg);
  }
  this.abortRequested = true;
  // HBASE-4014: show list of coprocessors that were loaded to help debug
  // regionserver crashes.Note that we're implicitly using
  // java.util.HashSet's toString() method to print the coprocessor names.
  LOG.fatal("RegionServer abort: loaded coprocessors are: " +
      CoprocessorHost.getLoadedCoprocessors());
  // Do our best to report our abort to the master, but this may not work
  try {
    if (cause != null) {
      msg += "\nCause:\n" + StringUtils.stringifyException(cause);
    }
    // Report to the master but only if we have already registered with the master.
    if (rssStub != null && this.serverNameFromMasterPOV != null) {
      ReportRSFatalErrorRequest.Builder builder =
        ReportRSFatalErrorRequest.newBuilder();
      ServerName sn =
        ServerName.parseVersionedServerName(this.serverNameFromMasterPOV.getVersionedBytes());
      builder.setServer(ProtobufUtil.toServerName(sn));
      builder.setErrorMessage(msg);
      rssStub.reportRSFatalError(null, builder.build());
    }
  } catch (Throwable t) {
    LOG.warn("Unable to report fatal error to master", t);
  }
  stop(reason);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:45,代码来源:HRegionServer.java


示例5: abort

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRSFatalErrorRequest; //导入依赖的package包/类
/**
 * Cause the server to exit without closing the regions it is serving, the log
 * it is using and without notifying the master. Used unit testing and on
 * catastrophic events such as HDFS is yanked out from under hbase or we OOME.
 *
 * @param reason
 *          the reason we are aborting
 * @param cause
 *          the exception that caused the abort, or null
 */
@Override
public void abort(String reason, Throwable cause) {
  String msg = "ABORTING region server " + this + ": " + reason;
  if (cause != null) {
    LOG.fatal(msg, cause);
  } else {
    LOG.fatal(msg);
  }
  this.abortRequested = true;
  // HBASE-4014: show list of coprocessors that were loaded to help debug
  // regionserver crashes.Note that we're implicitly using
  // java.util.HashSet's toString() method to print the coprocessor names.
  LOG.fatal("RegionServer abort: loaded coprocessors are: " +
      CoprocessorHost.getLoadedCoprocessors());
  // Do our best to report our abort to the master, but this may not work
  try {
    if (cause != null) {
      msg += "\nCause:\n" + StringUtils.stringifyException(cause);
    }
    // Report to the master but only if we have already registered with the master.
    if (rssStub != null && this.serverName != null) {
      ReportRSFatalErrorRequest.Builder builder =
        ReportRSFatalErrorRequest.newBuilder();
      ServerName sn =
        ServerName.parseVersionedServerName(this.serverName.getVersionedBytes());
      builder.setServer(ProtobufUtil.toServerName(sn));
      builder.setErrorMessage(msg);
      rssStub.reportRSFatalError(null, builder.build());
    }
  } catch (Throwable t) {
    LOG.warn("Unable to report fatal error to master", t);
  }
  stop(reason);
}
 
开发者ID:shenli-uiuc,项目名称:PyroDB,代码行数:45,代码来源:HRegionServer.java


示例6: reportRSFatalError

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRSFatalErrorRequest; //导入依赖的package包/类
@Override
public ReportRSFatalErrorResponse reportRSFatalError(
    RpcController controller, ReportRSFatalErrorRequest request) throws ServiceException {
  String errorText = request.getErrorMessage();
  ServerName sn = ProtobufUtil.toServerName(request.getServer());
  String msg = "Region server " + Bytes.toString(sn.getVersionedBytes()) +
    " reported a fatal error:\n" + errorText;
  LOG.error(msg);
  rsFatals.add(msg);

  return ReportRSFatalErrorResponse.newBuilder().build();
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:13,代码来源:HMaster.java


示例7: abort

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRSFatalErrorRequest; //导入依赖的package包/类
/**
 * Cause the server to exit without closing the regions it is serving, the log
 * it is using and without notifying the master. Used unit testing and on
 * catastrophic events such as HDFS is yanked out from under hbase or we OOME.
 *
 * @param reason
 *          the reason we are aborting
 * @param cause
 *          the exception that caused the abort, or null
 */
public void abort(String reason, Throwable cause) {
  String msg = "ABORTING region server " + this + ": " + reason;
  if (cause != null) {
    LOG.fatal(msg, cause);
  } else {
    LOG.fatal(msg);
  }
  this.abortRequested = true;
  this.reservedSpace.clear();
  // HBASE-4014: show list of coprocessors that were loaded to help debug
  // regionserver crashes.Note that we're implicitly using
  // java.util.HashSet's toString() method to print the coprocessor names.
  LOG.fatal("RegionServer abort: loaded coprocessors are: " +
      CoprocessorHost.getLoadedCoprocessors());
  // Do our best to report our abort to the master, but this may not work
  try {
    if (cause != null) {
      msg += "\nCause:\n" + StringUtils.stringifyException(cause);
    }
    if (hbaseMaster != null) {
      ReportRSFatalErrorRequest.Builder builder =
        ReportRSFatalErrorRequest.newBuilder();
      ServerName sn =
        ServerName.parseVersionedServerName(this.serverNameFromMasterPOV.getVersionedBytes());
      builder.setServer(ProtobufUtil.toServerName(sn));
      builder.setErrorMessage(msg);
      hbaseMaster.reportRSFatalError(
        null,builder.build());
    }
  } catch (Throwable t) {
    LOG.warn("Unable to report fatal error to master", t);
  }
  stop(reason);
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:45,代码来源:HRegionServer.java


示例8: abort

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRSFatalErrorRequest; //导入依赖的package包/类
/**
 * Cause the server to exit without closing the regions it is serving, the log
 * it is using and without notifying the master. Used unit testing and on
 * catastrophic events such as HDFS is yanked out from under hbase or we OOME.
 *
 * @param reason the reason we are aborting
 * @param cause  the exception that caused the abort, or null
 */
@Override
public void abort(String reason, Throwable cause) {
    String msg = "ABORTING region server " + this + ": " + reason;
    if (cause != null) {
        LOG.fatal(msg, cause);
    } else {
        LOG.fatal(msg);
    }
    this.abortRequested = true;
    // HBASE-4014: show list of coprocessors that were loaded to help debug
    // regionserver crashes.Note that we're implicitly using
    // java.util.HashSet's toString() method to print the coprocessor names.
    LOG.fatal("RegionServer abort: loaded coprocessors are: " +
            CoprocessorHost.getLoadedCoprocessors());
    // Try and dump metrics if abort -- might give clue as to how fatal came about....
    try {
        LOG.info("Dump of metrics as JSON on abort: " + JSONBean.dumpRegionServerMetrics());
    } catch (MalformedObjectNameException | IOException e) {
        LOG.warn("Failed dumping metrics", e);
    }

    // Do our best to report our abort to the master, but this may not work
    try {
        if (cause != null) {
            msg += "\nCause:\n" + StringUtils.stringifyException(cause);
        }
        // Report to the master but only if we have already registered with the master.
        if (rssStub != null && this.serverName != null) {
            ReportRSFatalErrorRequest.Builder builder =
                    ReportRSFatalErrorRequest.newBuilder();
            ServerName sn =
                    ServerName.parseVersionedServerName(this.serverName.getVersionedBytes());
            builder.setServer(ProtobufUtil.toServerName(sn));
            builder.setErrorMessage(msg);
            rssStub.reportRSFatalError(null, builder.build());
        }
    } catch (Throwable t) {
        LOG.warn("Unable to report fatal error to master", t);
    }
    stop(reason);
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:50,代码来源:HRegionServer.java



注:本文中的org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRSFatalErrorRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Blob类代码示例发布时间:2022-05-22
下一篇:
Java ResourceOperation类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap