Package org.apache.blur.thrift.generated

Examples of org.apache.blur.thrift.generated.TableStats


  public static void main(String[] args) throws BlurException, TException, IOException {
    String connectionStr = args[0];
    final String tableName = args[1];

    Iface client = BlurClient.getClient(connectionStr);
    TableStats tableStats = client.tableStats(tableName);
    System.out.println(tableStats);
  }
View Full Code Here


    _timeout = timeout;
  }

  @Override
  public TableStats merge(BlurExecutorCompletionService<TableStats> service) throws BlurException {
    TableStats result = new TableStats();
    while (service.getRemainingCount() > 0) {
      Future<TableStats> tableStats = service.poll(_timeout, TimeUnit.MILLISECONDS, true);
      TableStats stats = service.getResultThrowException(tableStats);
      result = merge(result, stats);
    }
    return result;
  }
View Full Code Here

  @Override
  public TableStats tableStats(String table) throws BlurException, TException {
    checkTable(_cluster, table);
    resetSearchers();
    try {
      TableStats tableStats = new TableStats();
      tableStats.tableName = table;
      tableStats.recordCount = _indexServer.getRecordCount(table);
      tableStats.rowCount = _indexServer.getRowCount(table);
      tableStats.bytes = _indexServer.getTableSize(table);
      return tableStats;
View Full Code Here

    if (args.length != 2) {
      throw new CommandException("Invalid args: " + help());
    }
    String tablename = args[1];

    TableStats tableStats = client.tableStats(tablename);
    long bytes = tableStats.getBytes();
//    long queries = tableStats.getQueries();
    long recordCount = tableStats.getRecordCount();
    long rowCount = tableStats.getRowCount();
    //Queries is an unknown value now.
//    out.println("Queries      : " + queries);
    out.println("Row Count    : " + rowCount);
    out.println("Record Count : " + recordCount);
    out.println("Table Size   : " + humanize(bytes));
View Full Code Here

  @Override
  public TableStats tableStats(String table) throws BlurException, TException {
    try {
      checkTable(_cluster, table);
      resetSearchers();
      TableStats tableStats = new TableStats();
      tableStats.tableName = table;
      tableStats.recordCount = _indexServer.getRecordCount(table);
      tableStats.rowCount = _indexServer.getRowCount(table);
      tableStats.bytes = _indexServer.getTableSize(table);
      return tableStats;
View Full Code Here

        tableInfo.put("cluster", cluster);
        tableInfo.put("name", table);
        tableInfo.put("enabled", descriptor.isEnabled());

        if (descriptor.isEnabled()) {
          TableStats stats = client.tableStats(table);
          tableInfo.put("rows", stats.getRowCount());
          tableInfo.put("records", stats.getRecordCount());

          Schema schema = client.schema(table);
          tableInfo.put("families", new ArrayList<String>(schema.getFamilies().keySet()));
        } else {
          tableInfo.put("rows", "?");
View Full Code Here

    TestTableCreator.newTable(table)
        .withRowCount(1).withRecordsPerRow(100)
        .withRecordColumns("fam.value").create();

    TableStats stats = client().tableStats(table);

    assertEquals("We should have one record.", 100, stats.recordCount);
    assertEquals("We should have one row.", 1, stats.rowCount);

    assertTotalResults(table, "fam.value:value0-0", 1l);
View Full Code Here

    assertTrue(job.waitForCompletion(true));
    Counters ctrs = job.getCounters();
    System.out.println("Counters: " + ctrs);

    while (true) {
      TableStats tableStats = client.tableStats(tableName);
      System.out.println(tableStats);
      if (tableStats.getRowCount() > 0) {
        break;
      }
      Thread.sleep(5000);
    }
View Full Code Here

    assertTrue(job.waitForCompletion(true));
    Counters ctrs = job.getCounters();
    System.out.println("Counters: " + ctrs);

    while (true) {
      TableStats tableStats = client.tableStats(tableName);
      System.out.println(tableStats);
      if (tableStats.getRowCount() > 0) {
        break;
      }
      Thread.sleep(5000);
    }
View Full Code Here

    double seconds = (e - s) / 1000.0;
    double rate = count / seconds;
    System.out.println("Load row in queue at " + rate + "/s");

    for (int i = 0; i < 60; i++) {
      TableStats stats = client.tableStats(tableName);
      long rowCount = stats.getRowCount();
      if (rowCount == count) {
        return;
      }
      Thread.sleep(1000);
    }
View Full Code Here

TOP

Related Classes of org.apache.blur.thrift.generated.TableStats

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.