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

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


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

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


    TableDescriptor td = new TableDescriptor();
    td.setTableUri(MiniCluster.getFileSystemUri() + "/blur-tables/test");
    td.setName("test");
    td.setShardCount(1);

    blurConnection.createTable(td);
   
    BlurQuery query = new BlurQuery();
    query.setQuery(new Query("test.col:*", true, ScoreType.SUPER, null, null));
    query.setUuid("12345");
    blurConnection.query("test", query);
View Full Code Here

    tableDescriptor.setName(tableName);
    tableDescriptor.setShardCount(5);
    tableDescriptor.setTableUri(MiniCluster.getFileSystemUri().toString() + "/blur/" + tableName);

    for (int i = 0; i < 3; i++) {
      client.createTable(tableDescriptor);
      client.disableTable(tableName);
      client.removeTable(tableName, true);
    }

    assertFalse(client.tableList().contains(tableName));
View Full Code Here

    tableDescriptor.setShardCount(1);
    tableDescriptor.setTableUri(tableUri);
    tableDescriptor.setName(tableName);

    Iface client = getClient();
    client.createTable(tableDescriptor);

    BlurOutputFormat.setupJob(job, tableDescriptor);
    Path tablePath = new Path(tableUri);
    Path shardPath = new Path(tablePath, BlurUtil.getShardName(0));
    FileStatus[] listStatus = fileSystem.listStatus(shardPath);
View Full Code Here

          LOG.info("Disabling table [" + table + "]");
          client.disableTable(table);
          LOG.info("Removing table [" + table + "]");
          client.removeTable(table, true);
          LOG.info("Creating table [" + table + "]");
          client.createTable(describe);
        }
      }
    } catch (BlurException e) {
      throw new PermanentStorageException("Unknown error while trying to clear storage.", e);
    } catch (TException e) {
View Full Code Here

    tableDescriptor.setShardCount(1);
    tableDescriptor.setTableUri(tableUri);
    tableDescriptor.setName(tableName);

    Iface client = getClient();
    client.createTable(tableDescriptor);

    BlurOutputFormat.setupJob(job, tableDescriptor);
    Path tablePath = new Path(tableUri);
    Path shardPath = new Path(tablePath, BlurUtil.getShardName(0));
    FileStatus[] listStatus = fileSystem.listStatus(shardPath);
View Full Code Here

    td.setShardCount(11);
    td.setTableUri("file://" + TABLE_PATH + "/tableUnitTable");
    td.setCluster("default");
    td.setName("tableUnitTable");
    td.setEnabled(true);
    client.createTable(td);

    Map<String, List> data = TableUtil.getTableSummaries();

    assertEquals(1, data.get("tables").size());
    assertEquals(0l, ((Map<String, Object>) data.get("tables").get(0)).get("rows"));
View Full Code Here

      td.setShardCount(11);
      td.setTableUri("file://" + TABLE_PATH + "/queryUnitTable");
      td.setCluster("default");
      td.setName("queryUnitTable");
      td.setEnabled(true);
      client.createTable(td);

      Record record = new Record("abcd", "fam0", Arrays.asList(new Column[]{new Column("col0", "testvalue")}));
      RecordMutation recordMutation = new RecordMutation(RecordMutationType.REPLACE_ENTIRE_RECORD, record);
      RowMutation rowMutation = new RowMutation("queryUnitTable", "12345", RowMutationType.REPLACE_ROW, Arrays.asList(new RecordMutation[]{recordMutation}));
      client.mutate(rowMutation);
View Full Code Here

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

    Iface client = BlurClient.getClient(connectionStr);
    client.createTable(tableDescriptor);
    ColumnDefinition columnDefinition = new ColumnDefinition();
    columnDefinition.setColumnName("col1");
    columnDefinition.setFamily("fam1");
    columnDefinition.setFieldLessIndexed(false);
    columnDefinition.setSortable(true);
View Full Code Here

    tableDescriptor.setName(tableName);
    tableDescriptor.setShardCount(5);
    tableDescriptor.setTableUri(miniCluster.getFileSystemUri().toString() + "/blur/" + tableName);

    for (int i = 0; i < 3; i++) {
      client.createTable(tableDescriptor);
      client.disableTable(tableName);
      client.removeTable(tableName, true);
    }

    assertFalse(client.tableList().contains(tableName));
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.