use of co.cask.cdap.api.dataset.DatasetProperties in project cdap by caskdata.
the class CubeDatasetDefinition method reconfigure.
@Override
public DatasetSpecification reconfigure(String instanceName, DatasetProperties newProps, DatasetSpecification currentSpec) throws IncompatibleUpdateException {
DatasetProperties factTableProperties = computeFactTableProperties(newProps);
List<DatasetSpecification> datasetSpecs = Lists.newArrayList();
// Configuring table that hold mappings of tag names and values and such
datasetSpecs.add(reconfigure(metricsTableDef, "entity", newProps, currentSpec.getSpecification("entity")));
for (int resolution : getResolutions(newProps.getProperties())) {
String factTableName = String.valueOf(resolution);
DatasetSpecification existing = currentSpec.getSpecification(factTableName);
DatasetSpecification factTableSpec = existing == null ? tableDef.configure(factTableName, factTableProperties) : reconfigure(tableDef, factTableName, factTableProperties, existing);
datasetSpecs.add(factTableSpec);
}
return DatasetSpecification.builder(instanceName, getName()).properties(newProps.getProperties()).datasets(datasetSpecs).build();
}
use of co.cask.cdap.api.dataset.DatasetProperties in project cdap by caskdata.
the class AppWithCube method configure.
@Override
public void configure() {
DatasetProperties props = DatasetProperties.builder().add("dataset.cube.resolutions", "1,60").add("dataset.cube.aggregation.agg1.dimensions", "user,action").add("dataset.cube.aggregation.agg1.requiredDimensions", "user,action").build();
createDataset(CUBE_NAME, Cube.class, props);
addService(SERVICE_NAME, new CubeHandler());
}
use of co.cask.cdap.api.dataset.DatasetProperties in project cdap by caskdata.
the class HBaseMetricsTableTest method getTable.
@Override
protected MetricsTable getTable(String name) throws Exception {
// add v3 so that all the tests are performed for v3 table
DatasetId metricsDatasetInstanceId = getDatasetId(name);
DatasetProperties props = TableProperties.builder().setReadlessIncrementSupport(true).build();
return DatasetsUtil.getOrCreateDataset(dsFramework, metricsDatasetInstanceId, MetricsTable.class.getName(), props, null);
}
Aggregations