Examples of TableInfo


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 = Monitor.summarizeTableStats(status);
      if (tableId != null)
        summary = status.tableMap.get(tableId);
      if (summary == null)
        continue;
      TableRow row = tServerList.prepareRow();
View Full Code Here

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

    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

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

   
    Map<String,Object> results = new HashMap<String,Object>();
    List<Map<String,Object>> servers = new ArrayList<Map<String,Object>>();
   
    for (TabletServerStatus status : Monitor.getMmi().tServerInfo) {
      TableInfo summary = Monitor.summarizeTableStats(status);
      servers.add(addServer(status.name, TServerLinkType.displayName(status.name), status.osLoad, summary.ingestRate, summary.queryRate,
          summary.ingestByteRate / 1000000.0, summary.queryByteRate / 1000000.0, summary.scans.running + summary.scans.queued, Monitor.getLookupRate(),
          status.holdTime));
    }
   
View Full Code Here

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

      MasterClientService.Iface client = null;
      try {
        client = MasterClient.getConnectionWithRetry(opts.getInstance());
        MasterMonitorInfo stats = client.getMasterStats(Tracer.traceInfo(), 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

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

  // 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

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

    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

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

    String tablename = null;
    for (Object c : config) {
      if (c instanceof String) {
        tablename = (String) c;
      } else {
        TableInfo info = new TableInfo();
        int count = (Integer) c;
        info.onlineTablets = count;
        info.tablets = count;
        result.tableMap.put(tablename, info);
      }
View Full Code Here

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

    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

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

    }
    Map<String,TableInfo> tables = new HashMap<String,TableInfo>();

    for (Entry<KeyExtent,Tablet> entry : onlineTabletsCopy.entrySet()) {
      String tableId = entry.getKey().getTableId().toString();
      TableInfo table = tables.get(tableId);
      if (table == null) {
        table = new TableInfo();
        table.minors = new Compacting();
        table.majors = new Compacting();
        tables.put(tableId, table);
      }
      Tablet tablet = entry.getValue();
      long recs = tablet.getNumEntries();
      table.tablets++;
      table.onlineTablets++;
      table.recs += recs;
      table.queryRate += tablet.queryRate();
      table.queryByteRate += tablet.queryByteRate();
      table.ingestRate += tablet.ingestRate();
      table.ingestByteRate += tablet.ingestByteRate();
      table.scanRate += tablet.scanRate();
      long recsInMemory = tablet.getNumEntriesInMemory();
      table.recsInMemory += recsInMemory;
      if (tablet.minorCompactionRunning())
        table.minors.running++;
      if (tablet.minorCompactionQueued())
        table.minors.queued++;
      if (tablet.majorCompactionRunning())
        table.majors.running++;
      if (tablet.majorCompactionQueued())
        table.majors.queued++;
    }

    for (Entry<String,MapCounter<ScanRunState>> entry : scanCounts.entrySet()) {
      TableInfo table = tables.get(entry.getKey());
      if (table == null) {
        table = new TableInfo();
        tables.put(entry.getKey(), table);
      }

      if (table.scans == null)
        table.scans = new Compacting();

      table.scans.queued += entry.getValue().get(ScanRunState.QUEUED);
      table.scans.running += entry.getValue().get(ScanRunState.RUNNING);
    }

    ArrayList<KeyExtent> offlineTabletsCopy = new ArrayList<KeyExtent>();
    synchronized (this.unopenedTablets) {
      synchronized (this.openingTablets) {
        offlineTabletsCopy.addAll(this.unopenedTablets);
        offlineTabletsCopy.addAll(this.openingTablets);
      }
    }

    for (KeyExtent extent : offlineTabletsCopy) {
      String tableId = extent.getTableId().toString();
      TableInfo table = tables.get(tableId);
      if (table == null) {
        table = new TableInfo();
        tables.put(tableId, table);
      }
      table.tablets++;
    }
View Full Code Here

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
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.