org.apache.lens.cube.metadata
Class AbstractBaseTable

java.lang.Object
  extended by org.apache.lens.cube.metadata.AbstractCubeTable
      extended by org.apache.lens.cube.metadata.AbstractBaseTable
All Implemented Interfaces:
Named
Direct Known Subclasses:
Cube, Dimension

public abstract class AbstractBaseTable
extends AbstractCubeTable

Abstract table with expressions


Field Summary
 
Fields inherited from class org.apache.lens.cube.metadata.AbstractCubeTable
LOG
 
Constructor Summary
AbstractBaseTable(String name, Set<ExprColumn> exprs, Set<JoinChain> joinChains, Map<String,String> properties, double weight)
           
AbstractBaseTable(org.apache.hadoop.hive.ql.metadata.Table tbl)
           
 
Method Summary
 void addProperties()
           
 void alterExpression(ExprColumn expr)
          Alters the expression if already existing or just adds if it is new expression.
 void alterJoinChain(JoinChain joinchain)
          Alters the joinchain if already existing or just adds if it is new chain
 boolean equals(Object obj)
           
 Set<String> getAllFieldNames()
           
 JoinChain getChainByName(String name)
           
 CubeColumn getColumnByName(String column)
           
 ExprColumn getExpressionByName(String exprName)
           
 Set<String> getExpressionNames()
           
 Set<ExprColumn> getExpressions()
           
 Set<String> getJoinChainNames()
           
 Set<JoinChain> getJoinChains()
          Get join chains from properties
 Set<String> getStorages()
           
 int hashCode()
           
 void removeExpression(String exprName)
          Remove the measure with name specified
 boolean removeJoinChain(String chainName)
          Remove the joinchain with name specified
 void setJoinChainProperties(Set<JoinChain> chains)
           
 
Methods inherited from class org.apache.lens.cube.metadata.AbstractCubeTable
addProperties, alterWeight, getColumns, getName, getProperties, getTableType, getWeight, removeProperty, toString, weight
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractBaseTable

public AbstractBaseTable(String name,
                         Set<ExprColumn> exprs,
                         Set<JoinChain> joinChains,
                         Map<String,String> properties,
                         double weight)

AbstractBaseTable

public AbstractBaseTable(org.apache.hadoop.hive.ql.metadata.Table tbl)
Method Detail

getStorages

public Set<String> getStorages()
Specified by:
getStorages in class AbstractCubeTable

addProperties

public void addProperties()

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractCubeTable

equals

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

getExpressionByName

public ExprColumn getExpressionByName(String exprName)

getColumnByName

public CubeColumn getColumnByName(String column)

alterExpression

public void alterExpression(ExprColumn expr)
                     throws org.apache.hadoop.hive.ql.metadata.HiveException
Alters the expression if already existing or just adds if it is new expression.

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

removeExpression

public void removeExpression(String exprName)
Remove the measure with name specified

Parameters:
exprName -

getExpressionNames

public Set<String> getExpressionNames()

getExpressions

public Set<ExprColumn> getExpressions()
Returns:
the expressions

getAllFieldNames

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

setJoinChainProperties

public void setJoinChainProperties(Set<JoinChain> chains)

alterJoinChain

public void alterJoinChain(JoinChain joinchain)
                    throws org.apache.hadoop.hive.ql.metadata.HiveException
Alters the joinchain if already existing or just adds if it is new chain

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

getChainByName

public JoinChain getChainByName(String name)

getJoinChains

public Set<JoinChain> getJoinChains()
Get join chains from properties

Returns:

getJoinChainNames

public Set<String> getJoinChainNames()

removeJoinChain

public boolean removeJoinChain(String chainName)
Remove the joinchain with name specified

Parameters:
chainName -


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