public class CubeDatasetDefinition extends co.cask.cdap.api.dataset.lib.AbstractDatasetDefinition<CubeDataset,co.cask.cdap.api.dataset.DatasetAdmin>
CubeDataset, the dataset that implements Cube
to store and query CubeFacts.
Cube dataset can be configured with aggregation resolutions and aggregations. E.g.
dataset.cube.resolutions=1,60
dataset.cube.aggregation.userPages.dimensions=user,page
dataset.cube.aggregation.userPages.requiredDimensions=page
dataset.cube.aggregation.userActions.dimensions=user,action
dataset.cube.aggregation.userActions.requiredDimensions=action
CubeFact measurement is aggregated within an aggregation
if it contains all required dimensions which non-null value.| Modifier and Type | Field and Description |
|---|---|
static int[] |
DEFAULT_RESOLUTIONS |
static String |
PROPERTY_AGGREGATION_PREFIX |
static String |
PROPERTY_DIMENSIONS |
static String |
PROPERTY_REQUIRED_DIMENSIONS |
| Constructor and Description |
|---|
CubeDatasetDefinition(String name,
co.cask.cdap.api.dataset.DatasetDefinition<? extends co.cask.cdap.api.dataset.table.Table,?> tableDef,
co.cask.cdap.api.dataset.DatasetDefinition<MetricsTable,? extends co.cask.cdap.api.dataset.DatasetAdmin> metricsTableDef)
Creates instance of
CubeDatasetDefinition. |
| Modifier and Type | Method and Description |
|---|---|
co.cask.cdap.api.dataset.DatasetSpecification |
configure(String instanceName,
co.cask.cdap.api.dataset.DatasetProperties properties) |
co.cask.cdap.api.dataset.DatasetAdmin |
getAdmin(co.cask.cdap.api.dataset.DatasetContext datasetContext,
co.cask.cdap.api.dataset.DatasetSpecification spec,
ClassLoader classLoader) |
CubeDataset |
getDataset(co.cask.cdap.api.dataset.DatasetContext datasetContext,
co.cask.cdap.api.dataset.DatasetSpecification spec,
Map<String,String> arguments,
ClassLoader classLoader) |
public static final String PROPERTY_AGGREGATION_PREFIX
public static final String PROPERTY_DIMENSIONS
public static final String PROPERTY_REQUIRED_DIMENSIONS
public static final int[] DEFAULT_RESOLUTIONS
public CubeDatasetDefinition(String name, co.cask.cdap.api.dataset.DatasetDefinition<? extends co.cask.cdap.api.dataset.table.Table,?> tableDef, co.cask.cdap.api.dataset.DatasetDefinition<MetricsTable,? extends co.cask.cdap.api.dataset.DatasetAdmin> metricsTableDef)
CubeDatasetDefinition.name - this dataset type nametableDef - Table dataset definition, used to create tables to store cube datametricsTableDef - MetricsTable dataset definition, used to create tables to store encoding mappings
(see "entity" table).
Has to be non-transactional: Cube dataset uses in-memory non-transactional cache in front
of it, so all writes must be durable independent on transaction completion.public co.cask.cdap.api.dataset.DatasetSpecification configure(String instanceName, co.cask.cdap.api.dataset.DatasetProperties properties)
public co.cask.cdap.api.dataset.DatasetAdmin getAdmin(co.cask.cdap.api.dataset.DatasetContext datasetContext,
co.cask.cdap.api.dataset.DatasetSpecification spec,
ClassLoader classLoader)
throws IOException
IOExceptionpublic CubeDataset getDataset(co.cask.cdap.api.dataset.DatasetContext datasetContext, co.cask.cdap.api.dataset.DatasetSpecification spec, Map<String,String> arguments, ClassLoader classLoader) throws IOException
IOExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.