Examples of ServerLoad


Examples of com.alibaba.wasp.ServerLoad

  public FServerReportResponse fServerReport(RpcController controller,
      FServerReportRequest request) throws ServiceException {
    try {
      ServerLoadProtos sl = request.getLoad();
      this.serverManager.fserverReport(
          ProtobufUtil.toServerName(request.getServer()), new ServerLoad(sl));
      // Up our metrics.
      if (sl != null && this.metricsMaster != null) {
        this.metricsMaster.incrementRequests(sl.getTotalNumberOfRequests());
      }
    } catch (IOException ioe) {
View Full Code Here

Examples of com.alibaba.wasp.ServerLoad

    jamonWriter.write("<table class=\"table table-striped\">\n<tr>\n    <th>ServerName</th>\n    <th>Request Per Second</th>\n    <th>Read Request Count</th>\n    <th>Write Request Count</th>\n</tr>\n");
    // 159, 1
   
for (ServerName serverName: serverNames) {

ServerLoad sl = master.getFServerManager().getLoad(serverName);
if (sl != null) {

    // 165, 1
    jamonWriter.write("<tr>\n<td>");
    // 166, 5
    {
      // 166, 5
      __jamon_innerUnit__serverNameLink(jamonWriter, serverName, sl);
    }
    // 166, 66
    jamonWriter.write("</td>\n<td>");
    // 167, 5
    org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(sl.getRequestsPerSecond()), jamonWriter);
    // 167, 36
    jamonWriter.write("</td>\n<td>");
    // 168, 5
    org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(sl.getReadRequestsCount()), jamonWriter);
    // 168, 36
    jamonWriter.write("</td>\n<td>");
    // 169, 5
    org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(sl.getWriteRequestsCount()), jamonWriter);
    // 169, 37
    jamonWriter.write("</td>\n</tr>\n");
    // 171, 1
   
        else {
View Full Code Here

Examples of com.alibaba.wasp.ServerLoad

    jamonWriter.write("<table class=\"table table-striped\">\n<tr>\n    <th>ServerName</th>\n    <th>Used Heap</th>\n    <th>Max Heap</th>\n    <th>Memstore Size</th>\n\n</tr>\n");
    // 125, 1
   
for (ServerName serverName: serverNames) {

    ServerLoad sl = master.getFServerManager().getLoad(serverName);
    if (sl != null) {

    // 131, 1
    jamonWriter.write("<tr>\n    <td>");
    // 132, 9
View Full Code Here

Examples of com.alibaba.wasp.ServerLoad

   
    int totalEntityGroups = 0;
    int totalRequests = 0;
    for (ServerName serverName: serverNames) {

    ServerLoad sl = master.getFServerManager().getLoad(serverName);
    double requestsPerSecond = 0.0;
    int numEntityGroupsOnline = 0;

    if (sl != null) {
        requestsPerSecond = sl.getRequestsPerSecond();
        numEntityGroupsOnline = sl.getNumberOfEntityGroups();
        totalEntityGroups += sl.getNumberOfEntityGroups();
        // Is this correct?  Adding a rate to a measure.
        totalRequests += sl.getNumberOfRequests();
    }
    long startcode = serverName.getStartcode();

    // 96, 1
    jamonWriter.write("<tr>\n    <td>");
View Full Code Here

Examples of com.alibaba.wasp.ServerLoad

    jamonWriter.write("<table class=\"table table-striped\">\n<tr>\n    <th>ServerName</th>\n    <th>Num. Compacting KVs</th>\n    <th>Num. Compacted KVs</th>\n    <th>Compaction Progress</th>\n</tr>\n");
    // 212, 1
   
for (ServerName serverName: serverNames) {

ServerLoad sl = master.getFServerManager().getLoad(serverName);
if (sl != null) {
String percentDone = "";


    // 220, 1
View Full Code Here

Examples of org.apache.hadoop.hbase.ServerLoad

    // However we temporarily need the old loads so we can use them to keep the rolling average.
    Map<String, Deque<RegionLoad>> oldLoads = loads;
    loads = new HashMap<String, Deque<RegionLoad>>();

    for (ServerName sn : clusterStatus.getServers()) {
      ServerLoad sl = clusterStatus.getLoad(sn);
      if (sl == null) {
        continue;
      }
      for (Entry<byte[], RegionLoad> entry : sl.getRegionsLoad().entrySet()) {
        Deque<RegionLoad> rLoads = oldLoads.get(Bytes.toString(entry.getKey()));
        if (rLoads == null) {
          // There was nothing there
          rLoads = new ArrayDeque<RegionLoad>();
        } else if (rLoads.size() >= 15) {
View Full Code Here

Examples of org.apache.hadoop.hbase.ServerLoad

  protected void unbalanceRegions(ClusterStatus clusterStatus,
      List<ServerName> fromServers, List<ServerName> toServers,
      double fractionOfRegions) throws Exception {
    List<byte[]> victimRegions = new LinkedList<byte[]>();
    for (ServerName server : fromServers) {
      ServerLoad serverLoad = clusterStatus.getLoad(server);
      // Ugh.
      List<byte[]> regions = new LinkedList<byte[]>(serverLoad.getRegionsLoad().keySet());
      int victimRegionCount = (int)Math.ceil(fractionOfRegions * regions.size());
      LOG.debug("Removing " + victimRegionCount + " regions from " + server.getServerName());
      for (int i = 0; i < victimRegionCount; ++i) {
        int victimIx = RandomUtils.nextInt(regions.size());
        String regionId = HRegionInfo.encodeRegionName(regions.remove(victimIx));
View Full Code Here

Examples of org.apache.hadoop.hbase.ServerLoad

              currentServerWithoutStartCode.equals(favoredNodes.get(2))) {
            continue;
          }
          //the region is currently on none of the favored nodes
          //get it on one of them if possible
          ServerLoad l1 = super.services.getServerManager().getLoad(
              serverNameWithoutCodeToServerName.get(favoredNodes.get(1)));
          ServerLoad l2 = super.services.getServerManager().getLoad(
              serverNameWithoutCodeToServerName.get(favoredNodes.get(2)));
          if (l1 != null && l2 != null) {
            if (l1.getLoad() > l2.getLoad()) {
              destination = serverNameWithoutCodeToServerName.get(favoredNodes.get(2));
            } else {
              destination = serverNameWithoutCodeToServerName.get(favoredNodes.get(1));
            }
          } else if (l1 != null) {
View Full Code Here

Examples of org.apache.hadoop.hbase.ServerLoad

      addRegionToMap(assignmentMapForFavoredNodes, region, primaryHost);
    } else if (secondaryHost != null && tertiaryHost != null) {
      // assign the region to the one with a lower load
      // (both have the desired hdfs blocks)
      ServerName s;
      ServerLoad tertiaryLoad = super.services.getServerManager().getLoad(tertiaryHost);
      ServerLoad secondaryLoad = super.services.getServerManager().getLoad(secondaryHost);
      if (secondaryLoad.getLoad() < tertiaryLoad.getLoad()) {
        s = secondaryHost;
      } else {
        s = tertiaryHost;
      }
      addRegionToMap(assignmentMapForFavoredNodes, region, s);
View Full Code Here

Examples of org.apache.hadoop.hbase.ServerLoad

  @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) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.