Ejemplo n.º 1
0
 // 69, 1
 private void __jamon_innerUnit__baseStats(
     @SuppressWarnings({"unused", "hiding"}) final java.io.Writer jamonWriter,
     final MetricsRegionServerWrapper mWrap)
     throws java.io.IOException {
   // 73, 1
   jamonWriter.write(
       "<table class=\"table table-striped\">\n    <tr>\n\n        <th>Requests Per Second</th>\n        <th>Num. Regions</th>\n        <th>Block locality</th>\n        <th>Slow WAL Append Count</th>\n    </tr>\n    <tr>\n        <td>");
   // 82, 13
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(String.format("%.0f", mWrap.getRequestsPerSecond())),
       jamonWriter);
   // 82, 70
   jamonWriter.write("</td>\n        <td>");
   // 83, 13
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(mWrap.getNumOnlineRegions()), jamonWriter);
   // 83, 46
   jamonWriter.write("</td>\n        <td>");
   // 84, 13
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(mWrap.getPercentFileLocal()), jamonWriter);
   // 84, 46
   jamonWriter.write("</td>\n        <td>");
   // 85, 13
   org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(0), jamonWriter);
   // 85, 20
   jamonWriter.write("</td>\n    </tr>\n</table>\n");
 }
  public void renderNoFlush(
      @SuppressWarnings({"unused", "hiding"}) final java.io.Writer jamonWriter)
      throws java.io.IOException {
    // 35, 1

    Collection<ServerName> backupMasters = null;
    if (master.isActiveMaster()) {
      ClusterStatus status = master.getClusterStatus();
      backupMasters = status.getBackupMasters();
    }

    // 43, 1
    jamonWriter.write("<table class=\"table table-striped\">\n");
    // 44, 1
    if ((backupMasters != null && backupMasters.size() > 0)) {
      // 44, 59
      jamonWriter.write(
          "\n<tr>\n    <th>ServerName</th>\n    <th>Port</th>\n    <th>Start Time</th>\n</tr>\n");
      // 50, 1

      ServerName[] serverNames = backupMasters.toArray(new ServerName[backupMasters.size()]);
      Arrays.sort(serverNames);
      for (ServerName serverName : serverNames) {

        // 55, 1
        jamonWriter.write("<tr>\n    <td>");
        // 56, 9
        org.jamon.escaping.Escaping.HTML.write(
            org.jamon.emit.StandardEmitter.valueOf(serverName.getHostname()), jamonWriter);
        // 56, 39
        jamonWriter.write("</td>\n    <td>");
        // 57, 9
        org.jamon.escaping.Escaping.HTML.write(
            org.jamon.emit.StandardEmitter.valueOf(serverName.getPort()), jamonWriter);
        // 57, 35
        jamonWriter.write("</td>\n    <td>");
        // 58, 9
        org.jamon.escaping.Escaping.HTML.write(
            org.jamon.emit.StandardEmitter.valueOf(new Date(serverName.getStartcode())),
            jamonWriter);
        // 58, 50
        jamonWriter.write("</td>\n</tr>\n");
        // 60, 1

      }
    }
    // 63, 7
    jamonWriter.write("\n<tr><td>Total:");
    // 64, 15
    org.jamon.escaping.Escaping.HTML.write(
        org.jamon.emit.StandardEmitter.valueOf((backupMasters != null) ? backupMasters.size() : 0),
        jamonWriter);
    // 64, 71
    jamonWriter.write("</td>\n</table>\n\n\n\n\n");
  }
Ejemplo n.º 3
0
 // 90, 1
 private void __jamon_innerUnit__memoryStats(
     @SuppressWarnings({"unused", "hiding"}) final java.io.Writer jamonWriter,
     final MetricsRegionServerWrapper mWrap)
     throws java.io.IOException {
   // 94, 1
   jamonWriter.write(
       "<table class=\"table table-striped\">\n<tr>\n    <tr>\n        <th>Used Heap</th>\n        <th>Max Heap</th>\n        <th>Direct Memory Used</th>\n        <th>Direct Memory Configured</th>\n        <th>Memstore Size</th>\n    </tr>\n</tr>\n<tr>\n    <td>\n        ");
   // 106, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(
           StringUtils.humanReadableInt(
               ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getUsed())),
       jamonWriter);
   // 106, 111
   jamonWriter.write("\n    </td>\n    <td>\n        ");
   // 109, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(
           StringUtils.humanReadableInt(
               ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax())),
       jamonWriter);
   // 109, 110
   jamonWriter.write("\n    </td>\n    <td>\n        ");
   // 112, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(
           StringUtils.humanReadableInt(DirectMemoryUtils.getDirectMemoryUsage())),
       jamonWriter);
   // 112, 85
   jamonWriter.write("\n    </td>\n    <td>\n        ");
   // 115, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(
           StringUtils.humanReadableInt(DirectMemoryUtils.getDirectMemorySize())),
       jamonWriter);
   // 115, 84
   jamonWriter.write("\n    </td>\n    <td>");
   // 117, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(
           StringUtils.humanReadableInt(mWrap.getMemstoreSize())),
       jamonWriter);
   // 117, 68
   jamonWriter.write("</td>\n</tr>\n</table>\n");
 }
Ejemplo n.º 4
0
 // 122, 1
 private void __jamon_innerUnit__walStats(
     @SuppressWarnings({"unused", "hiding"}) final java.io.Writer jamonWriter,
     final MetricsRegionServerWrapper mWrap)
     throws java.io.IOException {
   // 126, 1
   jamonWriter.write(
       "<table class=\"table table-striped\">\n<tr>\n    <tr>\n        <th>Num. WAL Files</th>\n        <th>Size. WAL Files (bytes)</th>\n    </tr>\n</tr>\n<tr>\n    <td>");
   // 134, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(mWrap.getNumWALFiles()), jamonWriter);
   // 134, 37
   jamonWriter.write("</td>\n    <td>");
   // 135, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(mWrap.getWALFileSize()), jamonWriter);
   // 135, 37
   jamonWriter.write("</td>\n</tr>\n</table>\n");
 }
Ejemplo n.º 5
0
 // 182, 1
 private void __jamon_innerUnit__queueStats(
     @SuppressWarnings({"unused", "hiding"}) final java.io.Writer jamonWriter,
     final MetricsRegionServerWrapper mWrap)
     throws java.io.IOException {
   // 186, 1
   jamonWriter.write(
       "<table class=\"table table-striped\">\n<tr>\n    <th>Compaction Queue Size</th>\n    <th>Flush Queue Size</th>\n\n</tr>\n<tr>\n    <td>");
   // 193, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(mWrap.getCompactionQueueSize()), jamonWriter);
   // 193, 45
   jamonWriter.write("</td>\n    <td>");
   // 194, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(mWrap.getFlushQueueSize()), jamonWriter);
   // 194, 40
   jamonWriter.write("</td>\n</tr>\n</table>\n");
 }
Ejemplo n.º 6
0
 // 140, 1
 private void __jamon_innerUnit__storeStats(
     @SuppressWarnings({"unused", "hiding"}) final java.io.Writer jamonWriter,
     final MetricsRegionServerWrapper mWrap)
     throws java.io.IOException {
   // 144, 1
   jamonWriter.write(
       "<table class=\"table table-striped\">\n<tr>\n\n    <th>Num. Stores</th>\n    <th>Num. Storefiles</th>\n    <th>Root Index Size (bytes)</th>\n    <th>Index Size (bytes)</th>\n    <th>Bloom Size (bytes)</th>\n</tr>\n<tr>\n    <td>");
   // 154, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(StringUtils.humanReadableInt(mWrap.getNumStores())),
       jamonWriter);
   // 154, 65
   jamonWriter.write("</td>\n    <td>");
   // 155, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(
           StringUtils.humanReadableInt(mWrap.getNumStoreFiles())),
       jamonWriter);
   // 155, 69
   jamonWriter.write("</td>\n    <td>");
   // 156, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(
           StringUtils.humanReadableInt(mWrap.getStoreFileIndexSize())),
       jamonWriter);
   // 156, 74
   jamonWriter.write("</td>\n    <td>");
   // 157, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(
           StringUtils.humanReadableInt(mWrap.getTotalStaticIndexSize())),
       jamonWriter);
   // 157, 76
   jamonWriter.write("</td>\n    <td>");
   // 158, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(
           StringUtils.humanReadableInt(mWrap.getTotalStaticBloomSize())),
       jamonWriter);
   // 158, 76
   jamonWriter.write("</td>\n</tr>\n</table>\n");
 }
Ejemplo n.º 7
0
 // 164, 1
 private void __jamon_innerUnit__requestStats(
     @SuppressWarnings({"unused", "hiding"}) final java.io.Writer jamonWriter,
     final MetricsRegionServerWrapper mWrap)
     throws java.io.IOException {
   // 168, 1
   jamonWriter.write(
       "<table class=\"table table-striped\">\n<tr>\n    <th>Request Per Second</th>\n    <th>Read Request Count</th>\n    <th>Write Request Count</th>\n</tr>\n<tr>\n    <td>");
   // 175, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(String.format("%.0f", mWrap.getRequestsPerSecond())),
       jamonWriter);
   // 175, 66
   jamonWriter.write("</td>\n    <td>");
   // 176, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(mWrap.getReadRequestsCount()), jamonWriter);
   // 176, 43
   jamonWriter.write("</td>\n    <td>");
   // 177, 9
   org.jamon.escaping.Escaping.HTML.write(
       org.jamon.emit.StandardEmitter.valueOf(mWrap.getWriteRequestsCount()), jamonWriter);
   // 177, 44
   jamonWriter.write("</td>\n</tr>\n</table>\n");
 }