Package org.apache.accumulo.core.master.thrift

Examples of org.apache.accumulo.core.master.thrift.TableInfo


   
    log.debug("tableId: " + tableId);
    for (TabletServerStatus status : tservers) {
      if (status == null)
        status = NO_STATUS;
      TableInfo summary = TableInfoUtil.summarizeTableStats(status);
      if (tableId != null)
        summary = status.tableMap.get(tableId);
      if (summary == null)
        continue;
      TableRow row = tServerList.prepareRow();
View Full Code Here


    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);
View Full Code Here

 
  @Override
  public String format(Object obj) {
    if (obj == null)
      return "-";
    TableInfo summary = (TableInfo) obj;
    Compacting c = summary.majors;
    if (fieldName.equals("minor"))
      c = summary.minors;
    else if (fieldName.equals("scans"))
      c = summary.scans;
View Full Code Here

  // define what it means for a tablet to be busy
  private static String busiest(Map<String,TableInfo> tables) {
    String result = null;
    double busiest = Double.NEGATIVE_INFINITY;
    for (Entry<String,TableInfo> entry : tables.entrySet()) {
      TableInfo info = entry.getValue();
      double busy = info.ingestRate + info.queryRate;
      if (busy > busiest) {
        busiest = busy;
        result = entry.getKey();
      }
View Full Code Here

    total.queryRate += more.queryRate;
    total.queryByteRate += more.queryByteRate;
  }
 
  public static TableInfo summarizeTableStats(TabletServerStatus status) {
    TableInfo summary = new TableInfo();
    summary.major = new Compacting();
    summary.minor = new Compacting();
    summary.scans = new Compacting();
    for (TableInfo rates : status.tableMap.values()) {
      add(summary, rates);
View Full Code Here

      indexCacheRequestTracker.startingUpdates();
      dataCacheHitTracker.startingUpdates();
      dataCacheRequestTracker.startingUpdates();
     
      for (TabletServerStatus server : mmi.tServerInfo) {
        TableInfo summary = Monitor.summarizeTableStats(server);
        totalIngestRate += summary.ingestRate;
        totalIngestByteRate += summary.ingestByteRate;
        totalQueryRate += summary.queryRate;
        totalQueryByteRate += summary.queryByteRate;
        totalEntries += summary.recs;
View Full Code Here

      MasterClientService.Iface client = null;
      try {
        client = MasterClient.getConnection(HdfsZooInstance.getInstance());
        MasterMonitorInfo stats = client.getMasterStats(null, SecurityConstants.getSystemCredentials());
       
        TableInfo all = new TableInfo();
        Map<String,TableInfo> tableSummaries = new HashMap<String,TableInfo>();
       
        for (TabletServerStatus server : stats.tServerInfo) {
          for (Entry<String,TableInfo> info : server.tableMap.entrySet()) {
            TableInfo tableSummary = tableSummaries.get(info.getKey());
            if (tableSummary == null) {
              tableSummary = new TableInfo();
              tableSummaries.put(info.getKey(), tableSummary);
            }
            Monitor.add(tableSummary, info.getValue());
            Monitor.add(all, info.getValue());
          }
        }
       
        TableInfo ti = tableSummaries.get(tableId);
       
        return "" + stats.tServerInfo.size() + " " + all.recs + " " + (long) all.ingestRate + " " + (long) all.queryRate + " " + ti.recs + " "
            + ti.recsInMemory + " " + (long) ti.ingestRate + " " + (long) ti.queryRate + " " + ti.tablets + " " + ti.onlineTablets;
       
      } finally {
View Full Code Here

    TabletServerStatus getStatus(TServerInstance server) {
      TabletServerStatus result = new TabletServerStatus();
      result.tableMap = new HashMap<String,TableInfo>();
      for (KeyExtent extent : extents) {
        String table = extent.getTableId().toString();
        TableInfo info = result.tableMap.get(table);
        if (info == null)
          result.tableMap.put(table, info = new TableInfo());
        info.onlineTablets++;
        info.recs = info.onlineTablets;
        info.ingestRate = 123.;
        info.queryRate = 456.;
      }
View Full Code Here

   
    log.debug("tableId: " + tableId);
    for (TabletServerStatus status : tservers) {
      if (status == null)
        status = NO_STATUS;
      TableInfo summary = Monitor.summarizeTableStats(status);
      if (tableId != null)
        summary = status.tableMap.get(tableId);
      if (summary == null)
        continue;
      TableRow row = tServerList.prepareRow();
View Full Code Here

      }
    }
    if (stats.tableMap != null && stats.tableMap.size() > 0) {
      out(0, "Tables");
      for (Entry<String,TableInfo> entry : stats.tableMap.entrySet()) {
        TableInfo v = entry.getValue();
        out(1, "%s", entry.getKey());
        out(2, "Records: %d", v.recs);
        out(2, "Records in Memory: %d", v.recsInMemory);
        out(2, "Tablets %d", v.tablets);
        out(2, "Online Tablets %d", v.onlineTablets);
        out(2, "Ingest Rate %.2f", v.ingestRate);
        out(2, "Query Rate %.2f", v.queryRate);
      }
    }
    if (stats.tServerInfo != null && stats.tServerInfo.size() > 0) {
      out(0, "Tablet Servers");
      long now = System.currentTimeMillis();
      for (TabletServerStatus server : stats.tServerInfo) {
        TableInfo summary = Monitor.summarizeTableStats(server);
        out(1, "Name %s", server.name);
        out(2, "Ingest %.2f", summary.ingestRate);
        out(2, "Last Contact %s", server.lastContact);
        out(2, "OS Load Average %.2f", server.osLoad);
        out(2, "Queries %.2f", summary.queryRate);
        out(2, "Time Difference %.1f", ((now - server.lastContact) / 1000.));
        out(2, "Total Records %d", summary.recs);
        out(2, "Lookups %d", server.lookups);
        out(2, "Loggers %d", server.loggers.size());
        for (String logger : server.loggers)
          out(3, "Logger %s", logger);
        if (server.holdTime > 0)
          out(2, "Hold Time %d", server.holdTime);
        if (server.tableMap != null && server.tableMap.size() > 0) {
          out(2, "Tables");
          for (Entry<String,TableInfo> status : server.tableMap.entrySet()) {
            TableInfo info = status.getValue();
            out(3, "Table %s", status.getKey());
            out(4, "Tablets %d", info.onlineTablets);
            out(4, "Records %d", info.recs);
            out(4, "Records in Memory %d", info.recsInMemory);
            out(4, "Ingest %.2f", info.ingestRate);
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.master.thrift.TableInfo

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.