Search in sources :

Example 1 with LevelDBTableDefinition

use of co.cask.cdap.data2.dataset2.lib.table.leveldb.LevelDBTableDefinition in project cdap by caskdata.

the class LevelDBTableModule method register.

@Override
public void register(DatasetDefinitionRegistry registry) {
    registry.add(new LevelDBTableDefinition("table"));
    registry.add(new LevelDBTableDefinition(Table.class.getName()));
}
Also used : LevelDBTableDefinition(co.cask.cdap.data2.dataset2.lib.table.leveldb.LevelDBTableDefinition)

Example 2 with LevelDBTableDefinition

use of co.cask.cdap.data2.dataset2.lib.table.leveldb.LevelDBTableDefinition in project cdap by caskdata.

the class LevelDBStreamConsumerStateStoreFactory method getLevelDBTableAdmin.

private LevelDBTableAdmin getLevelDBTableAdmin(TableId tableId) throws IOException {
    DatasetProperties props = TableProperties.builder().setColumnFamily("t").build();
    LevelDBTableDefinition tableDefinition = new LevelDBTableDefinition("tableDefinition");
    DatasetSpecification spec = tableDefinition.configure(tableId.getTableName(), props);
    return new LevelDBTableAdmin(DatasetContext.from(tableId.getNamespace()), spec, tableService, cConf);
}
Also used : LevelDBTableAdmin(co.cask.cdap.data2.dataset2.lib.table.leveldb.LevelDBTableAdmin) LevelDBTableDefinition(co.cask.cdap.data2.dataset2.lib.table.leveldb.LevelDBTableDefinition) DatasetProperties(co.cask.cdap.api.dataset.DatasetProperties) DatasetSpecification(co.cask.cdap.api.dataset.DatasetSpecification)

Aggregations

LevelDBTableDefinition (co.cask.cdap.data2.dataset2.lib.table.leveldb.LevelDBTableDefinition)2 DatasetProperties (co.cask.cdap.api.dataset.DatasetProperties)1 DatasetSpecification (co.cask.cdap.api.dataset.DatasetSpecification)1 LevelDBTableAdmin (co.cask.cdap.data2.dataset2.lib.table.leveldb.LevelDBTableAdmin)1