public class Cube extends AbstractBaseTable implements CubeInterface
Constructor and Description |
---|
Cube(String name,
Set<CubeMeasure> measures,
Set<CubeDimAttribute> dimensions) |
Cube(String name,
Set<CubeMeasure> measures,
Set<CubeDimAttribute> dimensions,
Map<String,String> properties) |
Cube(String name,
Set<CubeMeasure> measures,
Set<CubeDimAttribute> dimensions,
Map<String,String> properties,
double weight) |
Cube(String name,
Set<CubeMeasure> measures,
Set<CubeDimAttribute> dimensions,
Set<ExprColumn> expressions,
Set<JoinChain> joinChains,
Map<String,String> properties,
double weight) |
Cube(org.apache.hadoop.hive.ql.metadata.Table tbl) |
Modifier and Type | Method and Description |
---|---|
void |
addProperties() |
void |
addTimedDimension(String timedDimension)
Adds the timed dimension
|
boolean |
allFieldsQueriable()
Whether all the fields of cube can be queried.
|
void |
alterDimension(CubeDimAttribute dimension)
Alters the dimension if already existing or just adds if it is new dimension
|
void |
alterMeasure(CubeMeasure measure)
Alters the measure if already existing or just adds if it is new measure.
|
boolean |
equals(Object obj) |
Set<String> |
getAllFieldNames()
Get all field names reachable from cube
|
CubeColumn |
getColumnByName(String column)
Get cube column given by column name.
|
CubeDimAttribute |
getDimAttributeByName(String dimension)
Get dimension attribute given by name
|
Set<String> |
getDimAttributeNames()
Get all dimension attribute names
|
Set<CubeDimAttribute> |
getDimAttributes()
Get all dimension attributes of the cube
|
static Set<CubeDimAttribute> |
getDimensions(String name,
Map<String,String> props) |
CubeMeasure |
getMeasureByName(String measure)
Get measure by given by name
|
Set<String> |
getMeasureNames()
Get all measure names
|
Set<CubeMeasure> |
getMeasures()
Get all measures of the cube
|
static Set<CubeMeasure> |
getMeasures(String name,
Map<String,String> props) |
String |
getPartitionColumnOfTimeDim(String timeDimName) |
CubeTableType |
getTableType() |
Set<String> |
getTimedDimensions()
Get all timed dimensions of cube
|
String |
getTimeDimOfPartitionColumn(String partCol) |
int |
hashCode() |
boolean |
isDerivedCube()
Is the cube a derived cube or base cube
|
void |
removeDimension(String dimName)
Remove the attribute with name specified
|
boolean |
removeJoinChain(String chainName)
Remove the joinchain with name specified
|
void |
removeMeasure(String msrName)
Remove the measure with name specified
|
void |
removeTimedDimension(String timedDimension)
Removes the timed dimension
|
alterExpression, alterJoinChain, getChainByName, getChainMap, getExpressionByName, getExpressionNames, getExpressions, getExprMap, getJoinChainNames, getJoinChains, getStorages, removeExpression, setJoinChainProperties
addProperties, alterWeight, getColumns, getName, getProperties, getWeight, removeProperty, toString, weight
getChainByName, getExpressionByName, getExpressionNames, getExpressions, getJoinChainNames, getJoinChains
public Cube(String name, Set<CubeMeasure> measures, Set<CubeDimAttribute> dimensions)
public Cube(String name, Set<CubeMeasure> measures, Set<CubeDimAttribute> dimensions, Map<String,String> properties)
public Cube(String name, Set<CubeMeasure> measures, Set<CubeDimAttribute> dimensions, Map<String,String> properties, double weight)
public Cube(String name, Set<CubeMeasure> measures, Set<CubeDimAttribute> dimensions, Set<ExprColumn> expressions, Set<JoinChain> joinChains, Map<String,String> properties, double weight)
public Cube(org.apache.hadoop.hive.ql.metadata.Table tbl)
public Set<CubeMeasure> getMeasures()
CubeInterface
getMeasures
in interface CubeInterface
CubeMeasure
public Set<CubeDimAttribute> getDimAttributes()
CubeInterface
getDimAttributes
in interface CubeInterface
CubeDimAttribute
public Set<String> getTimedDimensions()
CubeInterface
getTimedDimensions
in interface CubeInterface
public CubeTableType getTableType()
getTableType
in class AbstractCubeTable
public void addProperties()
addProperties
in class AbstractBaseTable
public static Set<CubeDimAttribute> getDimensions(String name, Map<String,String> props)
public int hashCode()
hashCode
in class AbstractBaseTable
public boolean equals(Object obj)
equals
in class AbstractBaseTable
public CubeDimAttribute getDimAttributeByName(String dimension)
CubeInterface
getDimAttributeByName
in interface CubeInterface
dimension
- dimension attribute nameCubeDimAttribute
objectpublic CubeMeasure getMeasureByName(String measure)
CubeInterface
getMeasureByName
in interface CubeInterface
measure
- Measure nameCubeMeasure
objectpublic CubeColumn getColumnByName(String column)
CubeInterface
getColumnByName
in interface CubeInterface
getColumnByName
in class AbstractBaseTable
column
- Column nameCubeColumn
objectpublic void alterMeasure(@NonNull CubeMeasure measure)
measure
- new measure definitionpublic boolean removeJoinChain(@NonNull String chainName)
removeJoinChain
in class AbstractBaseTable
chainName
- chain namepublic void alterDimension(@NonNull CubeDimAttribute dimension)
dimension
- the dim attributepublic void removeDimension(@NonNull String dimName)
dimName
- attribute namepublic void removeMeasure(@NonNull String msrName)
msrName
- measure namepublic void addTimedDimension(@NonNull String timedDimension)
timedDimension
- time dimensionpublic void removeTimedDimension(@NonNull String timedDimension)
timedDimension
- time dimensionpublic boolean isDerivedCube()
CubeInterface
isDerivedCube
in interface CubeInterface
public Set<String> getMeasureNames()
CubeInterface
getMeasureNames
in interface CubeInterface
public Set<String> getDimAttributeNames()
CubeInterface
getDimAttributeNames
in interface CubeInterface
public boolean allFieldsQueriable()
CubeInterface
allFieldsQueriable
in interface CubeInterface
public Set<String> getAllFieldNames()
CubeInterface
getAllFieldNames
in interface CubeInterface
getAllFieldNames
in class AbstractBaseTable
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.