public final class CubeFactTable extends AbstractCubeTable
Constructor and Description |
---|
CubeFactTable(String cubeName,
String factName,
List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns,
Map<String,Set<UpdatePeriod>> storageUpdatePeriods) |
CubeFactTable(String cubeName,
String factName,
List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns,
Map<String,Set<UpdatePeriod>> storageUpdatePeriods,
double weight) |
CubeFactTable(String cubeName,
String factName,
List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns,
Map<String,Set<UpdatePeriod>> storageUpdatePeriods,
double weight,
Map<String,String> properties) |
CubeFactTable(org.apache.hadoop.hive.ql.metadata.Table hiveTable) |
Modifier and Type | Method and Description |
---|---|
void |
addColumns(Collection<org.apache.hadoop.hive.metastore.api.FieldSchema> columns)
Adds or alters the columns passed
|
void |
addUpdatePeriod(String storage,
UpdatePeriod period)
Add update period to storage
|
void |
alterColumn(org.apache.hadoop.hive.metastore.api.FieldSchema column)
Alters the column if already existing or just adds it if it is new column
|
void |
alterCubeName(String cubeName)
Alter the cubeName to which this fact belongs
|
void |
alterStorage(String storage,
Set<UpdatePeriod> updatePeriods)
Alter a storage with specified update periods
|
boolean |
equals(Object obj) |
Date |
getAbsoluteEndTime() |
Date |
getAbsoluteStartTime() |
String |
getCubeName() |
Date |
getEndTime() |
List<String> |
getPartitions(Date fromDate,
Date toDate,
UpdatePeriod interval)
Get partition value strings for given range, for the specified updateInterval
|
Date |
getRelativeStartTime() |
Date |
getStartTime() |
Set<String> |
getStorages() |
CubeTableType |
getTableType() |
Map<String,Set<UpdatePeriod>> |
getUpdatePeriods() |
List<String> |
getValidColumns()
Return valid columns of the fact, which can be specified by property MetastoreUtil.getValidColumnsKey(getName())
|
int |
hashCode() |
boolean |
isAggregated() |
static UpdatePeriod |
maxIntervalInRange(Date from,
Date to,
Set<UpdatePeriod> updatePeriods)
Get the max update period for the given range and available update periods
|
void |
removeUpdatePeriod(String storage,
UpdatePeriod period)
Remove update period from storage
|
void |
setAggregated(boolean isAggregated) |
addProperties, alterWeight, getAllFieldNames, getColumns, getName, getProperties, getWeight, removeProperty, toString, weight
public CubeFactTable(org.apache.hadoop.hive.ql.metadata.Table hiveTable)
public CubeFactTable(String cubeName, String factName, List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns, Map<String,Set<UpdatePeriod>> storageUpdatePeriods)
public CubeFactTable(String cubeName, String factName, List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns, Map<String,Set<UpdatePeriod>> storageUpdatePeriods, double weight)
public Map<String,Set<UpdatePeriod>> getUpdatePeriods()
public int hashCode()
hashCode
in class AbstractCubeTable
public boolean equals(Object obj)
equals
in class AbstractCubeTable
public CubeTableType getTableType()
getTableType
in class AbstractCubeTable
public List<String> getPartitions(Date fromDate, Date toDate, UpdatePeriod interval)
fromDate
- toDate
- interval
- public static UpdatePeriod maxIntervalInRange(Date from, Date to, Set<UpdatePeriod> updatePeriods)
from
- to
- updatePeriods
- public Set<String> getStorages()
getStorages
in class AbstractCubeTable
public String getCubeName()
public List<String> getValidColumns()
public void addUpdatePeriod(String storage, UpdatePeriod period)
storage
- period
- public void removeUpdatePeriod(String storage, UpdatePeriod period)
storage
- period
- public void alterStorage(String storage, Set<UpdatePeriod> updatePeriods) throws org.apache.hadoop.hive.ql.metadata.HiveException
storage
- updatePeriods
- org.apache.hadoop.hive.ql.metadata.HiveException
public void alterColumn(org.apache.hadoop.hive.metastore.api.FieldSchema column) throws org.apache.hadoop.hive.ql.metadata.HiveException
AbstractCubeTable
org.apache.hadoop.hive.ql.metadata.HiveException
public void addColumns(Collection<org.apache.hadoop.hive.metastore.api.FieldSchema> columns) throws org.apache.hadoop.hive.ql.metadata.HiveException
AbstractCubeTable
org.apache.hadoop.hive.ql.metadata.HiveException
public void alterCubeName(String cubeName)
cubeName
- public boolean isAggregated()
public void setAggregated(boolean isAggregated)
public Date getAbsoluteStartTime()
public Date getRelativeStartTime()
public Date getStartTime()
public Date getAbsoluteEndTime()
public Date getEndTime()
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.