Examples of Iface


Examples of org.apache.blur.thrift.generated.Blur.Iface

    List<String> terms = client.terms(tableName, columnFamily, columnName, "", (short) numberOfTerms);
    return new HashSet<String>(terms);
  }

  private static Set<String> getFields(String connectionStr, final String tableName) throws BlurException, TException, IOException {
    Iface client = BlurClient.getClient(connectionStr);
    Schema schema = client.schema(tableName);
    Set<String> fields = new HashSet<String>();
    for (String cf : schema.families.keySet()) {
      for (String field : schema.families.get(cf).keySet()) {
        fields.add(cf + "." + field);
      }
View Full Code Here

Examples of org.apache.blur.thrift.generated.Blur.Iface

public class OptimizeTable {

  public static void main(String[] args) throws BlurException, TException, IOException {
    final String tableName = args[1];
    final int segmentCount = Integer.parseInt(args[2]);
    Iface client = BlurClient.getClient(args[0]);
    client.optimize(tableName, segmentCount);
  }
View Full Code Here

Examples of org.apache.blur.thrift.generated.Blur.Iface

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

    Iface client = BlurClient.getClient(connectionStr);
    client.removeTable(tableName, true);
  }
View Full Code Here

Examples of org.apache.blur.thrift.generated.Blur.Iface

    tableDescriptor.readOnly = false;

    tableDescriptor.shardCount = shardCount;
    tableDescriptor.tableUri = uri;

    Iface client = BlurClient.getClient(connectionStr);
    client.createTable(tableDescriptor);
  }
View Full Code Here

Examples of org.apache.blur.thrift.generated.Blur.Iface

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

    Iface client = BlurClient.getClient(connectionStr);
    client.disableTable(tableName);
  }
View Full Code Here

Examples of org.apache.blur.thrift.generated.Blur.Iface

    // String sql = "select * from test-table.fam0 where fam0.col0 = 'abroad'";
    String sql = "select * from test-table.fam0";
    List<Connection> connections = BlurClientManager.getConnections("10.192.56.10:40010");
    // BlurResultSetRows resultSet = new BlurResultSetRows(sql,connections);

    Iface client = BlurClient.getClient(connections);
    Parser parser = new Parser();
    parser.parse(sql);

    BlurResultSetRecords resultSet = new BlurResultSetRecords(client, parser);
    int c = 0;
View Full Code Here

Examples of org.apache.blur.thrift.generated.Blur.Iface

    }

    final String controllerConnectionStr = cmd.getOptionValue("c");
    final String tableName = cmd.getOptionValue("t");

    final Iface client = controllerPool.getClient(controllerConnectionStr);
    TableDescriptor tableDescriptor = client.describe(tableName);

    Job job = new Job(configuration, "Blur indexer [" + tableName + "]");
    job.setJarByClass(CsvBlurDriver.class);
    job.setMapperClass(CsvBlurMapper.class);
View Full Code Here

Examples of org.apache.blur.thrift.generated.Blur.Iface

    // conf.setInt(BLUR_SHARD_BIND_PORT, 40002);
    // startControllers(conf, 1);
    // startShards(conf, 1);

    try {
      Iface client = BlurClient.getClient(getControllerConnectionStr());
      createTable("test", client);
      long start = System.nanoTime();
      for (int i = 0; i < 1000; i++) {
        long now = System.nanoTime();
        if (start + 5000000000L < now) {
View Full Code Here

Examples of org.apache.blur.thrift.generated.Blur.Iface

public class ShardServerLayoutStateTables {

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

    Iface client = BlurClient.getClient(connectionStr);
    System.out.println(client.tableList());

    while (true) {
      System.out.println("===============");
      for (String table : client.tableList()) {
        Map<String, Map<String, ShardState>> state = client.shardServerLayoutState(table);
        for (String shard : state.keySet()) {
          Map<String, ShardState> shardMap = state.get(shard);
          for (Entry<String, ShardState> entry : shardMap.entrySet()) {
            System.out.println(shard + " " + entry.getKey() + " " + entry.getValue());
          }
View Full Code Here

Examples of org.apache.blur.thrift.generated.Blur.Iface

    final long start = System.currentTimeMillis();
    long s = start;
    long responseTime = 0;
    int count = 0;
    long resultCount = 0;
    Iface client = BlurClient.getClient(connectionStr);
    int i;
    for (i = 0; i < numberOfSearchesPerPass; i++) {
      long now = System.currentTimeMillis();
      if (s + timeBetweenReporting < now) {
        double avgSeconds = (now - start) / 1000.0;
        double seconds = (now - s) / 1000.0;
        double avgRate = i / avgSeconds;
        double rate = count / seconds;
        double responseTimeAvg = (responseTime / (double) count) / 1000000.0;
        System.out.println(System.currentTimeMillis() + "," + i + "," + responseTimeAvg + "," + rate + "," + avgRate + "," + resultCount + "," + getCount(client, tableName));
        s = now;
        responseTime = 0;
        count = 0;
        resultCount = 0;
      }

      builder.setLength(0);
      String query = generateQuery(builder, random, sampleOfTerms, numberOfTermsPerQuery);
      final BlurQuery blurQuery = new BlurQuery();
      blurQuery.query = new Query();
      blurQuery.query.query = query;
      blurQuery.cacheResult = false;
      blurQuery.selector = new Selector();
      long qs = System.nanoTime();

      BlurResults results = client.query(tableName, blurQuery);
      long qe = System.nanoTime();
      resultCount += results.totalResults;
      responseTime += (qe - qs);
      count++;
    }
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.