use of co.cask.cdap.api.dataset.DatasetSpecification in project cdap by caskdata.
the class ProgramScheduleStoreDefinition method configure.
@Override
public DatasetSpecification configure(String name, DatasetProperties properties) {
TableProperties.Builder indexProps = TableProperties.builder();
indexProps.addAll(properties.getProperties());
indexProps.add(IndexedTable.INDEX_COLUMNS_CONF_KEY, ProgramScheduleStoreDataset.INDEX_COLUMNS);
indexProps.setConflictDetection(ConflictDetection.COLUMN);
DatasetSpecification indexSpec = getDelegate(ProgramScheduleStoreDataset.EMBEDDED_TABLE_NAME).configure(ProgramScheduleStoreDataset.EMBEDDED_TABLE_NAME, indexProps.build());
return DatasetSpecification.builder(name, getName()).datasets(indexSpec).build();
}
use of co.cask.cdap.api.dataset.DatasetSpecification in project cdap by caskdata.
the class JobQueueDatasetDefinition method configure.
@Override
public DatasetSpecification configure(String instanceName, DatasetProperties properties) {
TableProperties.Builder tableProps = TableProperties.builder();
tableProps.addAll(properties.getProperties());
tableProps.setConflictDetection(ConflictDetection.COLUMN);
DatasetSpecification tableSpec = super.getDelegate(JobQueueDataset.EMBEDDED_TABLE_NAME).configure(JobQueueDataset.EMBEDDED_TABLE_NAME, tableProps.build());
return DatasetSpecification.builder(instanceName, getName()).properties(properties.getProperties()).datasets(Collections.singletonList(tableSpec)).build();
}
Aggregations