Package org.apache.blur.thrift.generated.Blur

Examples of org.apache.blur.thrift.generated.Blur.Iface.terms()


      IOException {
    Iface client = BlurClient.getClient(connectionStr);
    String[] split = field.split("\\.");
    String columnFamily = split[0];
    String columnName = split[1];
    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);
View Full Code Here


      IOException {
    Iface client = BlurClient.getClient(connectionStr);
    String[] split = field.split("\\.");
    String columnFamily = split[0];
    String columnName = split[1];
    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);
View Full Code Here

  }

  @Test
  public void testTermsList() throws BlurException, TException {
    Iface client = getClient();
    List<String> terms = client.terms("test", "test", "test", null, (short) 10);
    List<String> list = new ArrayList<String>();
    list.add("value");
    assertEquals(list, terms);
  }
View Full Code Here

  }

  public static List<String> getTerms(String table, String family, String column, String startWith) throws IOException, TException {
    Iface client = BlurClient.getClient(Config.getConnectionString());

    return client.terms(table, family, column, startWith, (short) 10);
  }

  public static void disableTable(String table) throws TException, IOException {
    Iface client = BlurClient.getClient(Config.getConnectionString());
View Full Code Here

  public void testBatchFetch() throws BlurException, TException, InterruptedException, IOException {
    String tableName = "testBatchFetch";
    createTable(tableName);
    loadTable(tableName);
    final Iface client = getClient();
    List<String> terms = client.terms(tableName, null, "rowid", "", (short) 100);

    List<Selector> selectors = new ArrayList<Selector>();
    for (String s : terms) {
      Selector selector = new Selector();
      selector.setRowId(s);
View Full Code Here

      assertEquals(blurException.getErrorType(), ErrorType.QUERY_CANCEL);
    } finally {
      IndexManager.DEBUG_RUN_SLOW.set(false);
    }
    // Tests that the exitable reader was reset.
    client.terms(tableName, "test", "facet", null, (short) 100);
  }

  // @Test
  public void testBackPressureViaQuery() throws BlurException, TException, InterruptedException, IOException {
    // This will make each collect in the collectors pause 250 ms per collect
View Full Code Here

  public void testTermsList() throws BlurException, TException, IOException, InterruptedException {
    final String tableName = "testTermsList";
    createTable(tableName);
    loadTable(tableName);
    Iface client = getClient();
    List<String> terms = client.terms(tableName, "test", "test", null, (short) 10);
    List<String> list = new ArrayList<String>();
    list.add("value");
    assertEquals(list, terms);
  }
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.