org.apache.lens.cube.metadata
Class Dimension

java.lang.Object
  extended by org.apache.lens.cube.metadata.AbstractCubeTable
      extended by org.apache.lens.cube.metadata.AbstractBaseTable
          extended by org.apache.lens.cube.metadata.Dimension
All Implemented Interfaces:
Named

public class Dimension
extends AbstractBaseTable


Field Summary
 
Fields inherited from class org.apache.lens.cube.metadata.AbstractCubeTable
LOG
 
Constructor Summary
Dimension(String name, Set<CubeDimAttribute> attributes)
           
Dimension(String name, Set<CubeDimAttribute> attributes, Map<String,String> properties, double weight)
           
Dimension(String name, Set<CubeDimAttribute> attributes, Set<ExprColumn> exprs, Map<String,String> dimProps, long weight)
           
Dimension(String name, Set<CubeDimAttribute> attributes, Set<ExprColumn> expressions, Set<JoinChain> joinChains, Map<String,String> properties, double weight)
           
Dimension(org.apache.hadoop.hive.ql.metadata.Table tbl)
           
 
Method Summary
 void addProperties()
           
 void alterAttribute(CubeDimAttribute attribute)
          Alters the attribute if already existing or just adds if it is new attribute
 boolean equals(Object obj)
           
 Set<String> getAllFieldNames()
           
 CubeDimAttribute getAttributeByName(String attr)
           
 Set<String> getAttributeNames()
           
 Set<CubeDimAttribute> getAttributes()
           
static Set<CubeDimAttribute> getAttributes(String name, Map<String,String> props)
           
 CubeColumn getColumnByName(String column)
           
 Set<String> getStorages()
           
 CubeTableType getTableType()
           
 String getTimedDimension()
           
 int hashCode()
           
 void removeAttribute(String attrName)
          Remove the dimension with name specified
 
Methods inherited from class org.apache.lens.cube.metadata.AbstractBaseTable
alterExpression, alterJoinChain, getChainByName, getExpressionByName, getExpressionNames, getExpressions, getJoinChainNames, getJoinChains, removeExpression, removeJoinChain, setJoinChainProperties
 
Methods inherited from class org.apache.lens.cube.metadata.AbstractCubeTable
addProperties, alterWeight, getColumns, getName, getProperties, getWeight, removeProperty, toString, weight
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Dimension

public Dimension(String name,
                 Set<CubeDimAttribute> attributes)

Dimension

public Dimension(String name,
                 Set<CubeDimAttribute> attributes,
                 Map<String,String> properties,
                 double weight)

Dimension

public Dimension(String name,
                 Set<CubeDimAttribute> attributes,
                 Set<ExprColumn> expressions,
                 Set<JoinChain> joinChains,
                 Map<String,String> properties,
                 double weight)

Dimension

public Dimension(org.apache.hadoop.hive.ql.metadata.Table tbl)

Dimension

public Dimension(String name,
                 Set<CubeDimAttribute> attributes,
                 Set<ExprColumn> exprs,
                 Map<String,String> dimProps,
                 long weight)
Method Detail

getAttributes

public Set<CubeDimAttribute> getAttributes()

getTableType

public CubeTableType getTableType()
Specified by:
getTableType in class AbstractCubeTable

getStorages

public Set<String> getStorages()
Overrides:
getStorages in class AbstractBaseTable

addProperties

public void addProperties()
Overrides:
addProperties in class AbstractBaseTable

getAttributes

public static Set<CubeDimAttribute> getAttributes(String name,
                                                  Map<String,String> props)

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractBaseTable

equals

public boolean equals(Object obj)
Overrides:
equals in class AbstractBaseTable

getAttributeByName

public CubeDimAttribute getAttributeByName(String attr)

getColumnByName

public CubeColumn getColumnByName(String column)
Overrides:
getColumnByName in class AbstractBaseTable

alterAttribute

public void alterAttribute(CubeDimAttribute attribute)
                    throws org.apache.hadoop.hive.ql.metadata.HiveException
Alters the attribute if already existing or just adds if it is new attribute

Parameters:
attribute -
Throws:
org.apache.hadoop.hive.ql.metadata.HiveException

removeAttribute

public void removeAttribute(String attrName)
Remove the dimension with name specified

Parameters:
attrName -

getTimedDimension

public String getTimedDimension()
Returns:
the timedDimension

getAttributeNames

public Set<String> getAttributeNames()

getAllFieldNames

public Set<String> getAllFieldNames()
Overrides:
getAllFieldNames in class AbstractBaseTable


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.