• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RegionServerReportResponse类的典型用法和代码示例

java 1次浏览

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

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

示例1: regionServerReport

点赞 3

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerReportResponse; //导入依赖的package包/类
@Override
public RegionServerReportResponse regionServerReport(
    RpcController controller, RegionServerReportRequest request) throws ServiceException {
  try {
    master.checkServiceStarted();
    ClusterStatusProtos.ServerLoad sl = request.getLoad();
    ServerName serverName = ProtobufUtil.toServerName(request.getServer());
    ServerLoad oldLoad = master.serverManager.getLoad(serverName);
    master.serverManager.regionServerReport(serverName, new ServerLoad(sl));
    if (sl != null && master.metricsMaster != null) {
      // Up our metrics.
      master.metricsMaster.incrementRequests(sl.getTotalNumberOfRequests()
          - (oldLoad != null ? oldLoad.getTotalNumberOfRequests() : 0));
    }
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
  return RegionServerReportResponse.newBuilder().build();
}
 

开发者ID:fengchen8086,
项目名称:ditb,
代码行数:20,
代码来源:MasterRpcServices.java

示例2: regionServerReport

点赞 3

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerReportResponse; //导入依赖的package包/类
@Override
public RegionServerReportResponse regionServerReport(
    RpcController controller, RegionServerReportRequest request) throws ServiceException {
  try {
    master.checkServiceStarted();
    ClusterStatusProtos.ServerLoad sl = request.getLoad();
    ServerName serverName = ProtobufUtil.toServerName(request.getServer());
    ServerLoad oldLoad = master.serverManager.getLoad(serverName);
    master.serverManager.regionServerReport(serverName, new ServerLoad(sl));
    if (sl != null && master.metricsMaster != null) {
      // Up our metrics.
      master.metricsMaster.incrementRequests(sl.getTotalNumberOfRequests()
        - (oldLoad != null ? oldLoad.getTotalNumberOfRequests() : 0));
    }
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
  return RegionServerReportResponse.newBuilder().build();
}
 

开发者ID:grokcoder,
项目名称:pbase,
代码行数:20,
代码来源:MasterRpcServices.java

示例3: regionServerReport

点赞 3

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerReportResponse; //导入依赖的package包/类
@Override
public RegionServerReportResponse regionServerReport(
    RpcController controller, RegionServerReportRequest request) throws ServiceException {
  try {
    ClusterStatusProtos.ServerLoad sl = request.getLoad();
    ServerName serverName = ProtobufUtil.toServerName(request.getServer());
    ServerLoad oldLoad = serverManager.getLoad(serverName);
    this.serverManager.regionServerReport(serverName, new ServerLoad(sl));
    if (sl != null && this.metricsMaster != null) {
      // Up our metrics.
      this.metricsMaster.incrementRequests(sl.getTotalNumberOfRequests()
        - (oldLoad != null ? oldLoad.getTotalNumberOfRequests() : 0));
    }
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }

  return RegionServerReportResponse.newBuilder().build();
}
 

开发者ID:tenggyut,
项目名称:HIndex,
代码行数:20,
代码来源:HMaster.java

示例4: regionServerReport

点赞 3

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerReportResponse; //导入依赖的package包/类
@Override
public RegionServerReportResponse regionServerReport(
    RpcController controller, RegionServerReportRequest request) throws ServiceException {
  try {
    ClusterStatusProtos.ServerLoad sl = request.getLoad();
    this.serverManager.regionServerReport(ProtobufUtil.toServerName(request.getServer()), new ServerLoad(sl));
    if (sl != null && this.metricsMaster != null) {
      // Up our metrics.
      this.metricsMaster.incrementRequests(sl.getTotalNumberOfRequests());
    }
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }

  return RegionServerReportResponse.newBuilder().build();
}
 

开发者ID:cloud-software-foundation,
项目名称:c5,
代码行数:17,
代码来源:HMaster.java

示例5: regionServerReport

点赞 3

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerReportResponse; //导入依赖的package包/类
@Override
public RegionServerReportResponse regionServerReport(
    RpcController controller, RegionServerReportRequest request) throws ServiceException {
  try {
    HBaseProtos.ServerLoad sl = request.getLoad();
    this.serverManager.regionServerReport(ProtobufUtil.toServerName(request.getServer()), new ServerLoad(sl));
    if (sl != null && this.metricsMaster != null) {
      // Up our metrics.
      this.metricsMaster.incrementRequests(sl.getTotalNumberOfRequests());
    }
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }

  return RegionServerReportResponse.newBuilder().build();
}
 

开发者ID:daidong,
项目名称:DominoHBase,
代码行数:17,
代码来源:HMaster.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)