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

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


    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


    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

    blurQueryRecord.setQuery(queryRecord);
    BlurResults resultsRecord = client.query("test", blurQueryRecord);
    assertRecordResults(resultsRecord);
    assertEquals(length, resultsRecord.getTotalResults());

    Schema schema = client.schema("test");
    assertFalse(schema.getFamilies().isEmpty());
  }

  @Test
  public void testQueryCancel() throws BlurException, TException, InterruptedException {
View Full Code Here

        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", "?");
          tableInfo.put("records", "?");
          tableInfo.put("families", new ArrayList<String>());
View Full Code Here

  }

  public static Map<String, Map<String, Map<String, Object>>> getSchema(String table) throws IOException, TException {
    Iface client = BlurClient.getClient(Config.getConnectionString());

    Schema schema = client.schema(table);

    Map<String, Map<String, Map<String, Object>>> schemaInfo = new TreeMap<String, Map<String, Map<String, Object>>>();
    for (Map.Entry<String, Map<String, ColumnDefinition>> famEntry : schema.getFamilies().entrySet()) {
      Map<String, Map<String, Object>> columns = new TreeMap<String, Map<String, Object>>();
      for (Map.Entry<String, ColumnDefinition> colEntry : famEntry.getValue().entrySet()) {
View Full Code Here

    blurQueryRecord.setQuery(queryRecord);
    BlurResults resultsRecord = client.query(tableName, blurQueryRecord);
    assertRecordResults(resultsRecord);
    assertEquals(numberOfDocs * pass, resultsRecord.getTotalResults());

    Schema schema = client.schema(tableName);
    assertFalse(schema.getFamilies().isEmpty());
  }

  @Test
  public void testQueryWithSelector() throws BlurException, TException, IOException, InterruptedException {
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.