Package org.apache.accumulo.server.monitor.util

Examples of org.apache.accumulo.server.monitor.util.Table


        : null, minorQueueStdDev, total.minor.num != 0 ? (long) (total.minor.elapsed / total.minor.num) : null, minorStdDev, total.minor.elapsed);
    opHistoryDetails.generate(req, sb);
  }
 
  private void doDetailTable(HttpServletRequest req, StringBuilder sb, InetSocketAddress address, int numTablets, TabletStats total, TabletStats historical) {
    Table detailTable = new Table("tServerDetail", "Details");
    detailTable.setSubCaption(address.getHostName() + ":" + address.getPort());
    detailTable.addSortableColumn("Hosted&nbsp;Tablets", new NumberType<Integer>(), null);
    detailTable.addSortableColumn("Entries", new NumberType<Long>(), null);
    detailTable.addSortableColumn("Minor&nbsp;Compacting", new NumberType<Integer>(), null);
    detailTable.addSortableColumn("Major&nbsp;Compacting", new NumberType<Integer>(), null);
    detailTable.addSortableColumn("Splitting", new NumberType<Integer>(), null);
    detailTable.addRow(numTablets, total.numEntries, total.minor.status, total.major.status, historical.split.status);
    detailTable.generate(req, sb);
  }
View Full Code Here


    return 0;
  }
 
  private void doBadTserverList(HttpServletRequest req, StringBuilder sb) {
    if (Monitor.getMmi() != null && !Monitor.getMmi().badTServers.isEmpty()) {
      Table badTServerList = new Table("badtservers", "Non-Functioning&nbsp;Tablet&nbsp;Servers", "error");
      badTServerList.setSubCaption("The following tablet servers reported a status other than Online.");
      badTServerList.addSortableColumn("Tablet&nbsp;Server");
      badTServerList.addSortableColumn("Tablet&nbsp;Server&nbsp;Status");
      for (Entry<String,Byte> badserver : Monitor.getMmi().badTServers.entrySet())
        badTServerList.addRow(badserver.getKey(), TabletServerState.getStateById(badserver.getValue()).name());
      badTServerList.generate(req, sb);
    }
  }
View Full Code Here

    if (numProblems > 0)
      banner(sb, "error", String.format("<a href='/problems'>Table Problems: %d Total</a>", numProblems));
  }
 
  static void doTableList(HttpServletRequest req, StringBuilder sb, Map<String,String> tidToNameMap) {
    Table tableList = new Table("tableList", "Table&nbsp;List");
    tableList.addSortableColumn("Table&nbsp;Name", new TableLinkType(), null);
    tableList.addSortableColumn("State", new TableStateType(), null);
    tableList.addSortableColumn("#&nbsp;Tablets", new NumberType<Integer>(), "Tables are broken down into ranges of rows called tablets.");
    tableList.addSortableColumn("#&nbsp;Offline<br />Tablets", new NumberType<Integer>(0, 0), "Tablets unavailable for query or ingest.  "
        + "May be a transient condition when tablets are moved for balancing.");
    tableList.addSortableColumn("Entries", new NumberType<Long>(), "Key/value pairs over each instance, table or tablet.");
    tableList.addSortableColumn("Entries<br />In&nbsp;Memory", new NumberType<Long>(),
        "The total number of key/value pairs stored in memory and not yet written to disk");
    tableList.addSortableColumn("Ingest", new NumberType<Long>(), "The number of Key/Value pairs inserted.  Note that deletes are 'inserted'.");
    tableList.addSortableColumn("Query", new NumberType<Long>(),
        "The number of Key/Value pairs returned to clients during queries.  This is <b>not</b> the number of scans.");
    tableList.addSortableColumn("Hold&nbsp;Time", new DurationType(0l, 0l),
        "The amount of time that ingest operations are suspended while waiting for data to be written to disk.");
    tableList.addSortableColumn("Minor<br />Compactions", new CompactionsType("minor"), "Flushing memory to disk is called a \"minor compaction.\" "
        + "Multiple tablets can be minor compacted simultaneously, but " + "" + "sometimes they must wait for resources to be available.  These "
        + "tablets that are waiting for compaction are \"queued\" and are " + "indicated using parentheses. So <tt> 2 (3)</tt> indicates there are "
        + "two compactions running and three queued waiting for resources.");
    tableList.addSortableColumn("Major<br />Compactions", new CompactionsType("major"),
        "Gathering up many small files and rewriting them as one larger file is called a 'Major Compaction'. "
            + "Major Compactions are performed as a consequence of new files created from Minor Compactions and Bulk Load operations.  "
            + "They reduce the number of files used during queries.");
    SortedMap<String,TableInfo> tableStats = new TreeMap<String,TableInfo>();
   
    if (Monitor.getMmi() != null && Monitor.getMmi().tableMap != null)
      for (Entry<String,TableInfo> te : Monitor.getMmi().tableMap.entrySet())
        tableStats.put(Tables.getPrintableTableNameFromId(tidToNameMap, te.getKey()), te.getValue());
   
    Map<String,Double> compactingByTable = Monitor.summarizeTableStats(Monitor.getMmi());
    TableManager tableManager = TableManager.getInstance();
   
    for (Entry<String,String> tableName_tableId : Tables.getNameToIdMap(HdfsZooInstance.getInstance()).entrySet()) {
      String tableName = tableName_tableId.getKey();
      String tableId = tableName_tableId.getValue();
      TableInfo tableInfo = tableStats.get(tableName);
      Double holdTime = compactingByTable.get(tableId);
      if (holdTime == null)
        holdTime = new Double(0.);
      TableRow row = tableList.prepareRow();
      row.add(tableId);
      row.add(tableManager.getTableState(tableId));
      row.add(tableInfo == null ? null : tableInfo.tablets);
      row.add(tableInfo == null ? null : tableInfo.tablets - tableInfo.onlineTablets);
      row.add(tableInfo == null ? null : tableInfo.recs);
      row.add(tableInfo == null ? null : tableInfo.recsInMemory);
      row.add(tableInfo == null ? null : tableInfo.ingestRate);
      row.add(tableInfo == null ? null : tableInfo.queryRate);
      row.add(holdTime.longValue());
      row.add(tableInfo);
      row.add(tableInfo);
      tableList.addRow(row);
    }
   
    tableList.generate(req, sb);
  }
View Full Code Here

          log.error(ex, ex);
        }
      }
    }
   
    Table tableDetails = new Table("participatingTServers", "Participating&nbsp;Tablet&nbsp;Servers");
    tableDetails.setSubCaption(displayName);
    TServersServlet.doTserverList(req, sb, tservers, tableDetails);
  }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.server.monitor.util.Table

Copyright © 2018 www.massapicom. 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.