Search in sources :

Example 1 with StreamStoreDefinition

use of com.palantir.atlasdb.schema.stream.StreamStoreDefinition in project atlasdb by palantir.

the class Benchmarks method createStreamingTable.

private static void createStreamingTable(KeyValueService kvs, TableReference parentTable, String columnName) {
    StreamStoreDefinition ssd = new StreamStoreDefinitionBuilder(columnName, "Value", ValueType.VAR_LONG).inMemoryThreshold(1024 * 1024).build();
    ssd.getTables().forEach((tableName, tableDefinition) -> {
        TableReference streamingTable = TableReference.create(parentTable.getNamespace(), tableName);
        kvs.createTable(streamingTable, tableDefinition.toTableMetadata().persistToBytes());
    });
}
Also used : StreamStoreDefinition(com.palantir.atlasdb.schema.stream.StreamStoreDefinition) TableReference(com.palantir.atlasdb.keyvalue.api.TableReference) StreamStoreDefinitionBuilder(com.palantir.atlasdb.schema.stream.StreamStoreDefinitionBuilder)

Aggregations

TableReference (com.palantir.atlasdb.keyvalue.api.TableReference)1 StreamStoreDefinition (com.palantir.atlasdb.schema.stream.StreamStoreDefinition)1 StreamStoreDefinitionBuilder (com.palantir.atlasdb.schema.stream.StreamStoreDefinitionBuilder)1