public class CubeFactTable extends AbstractCubeTable implements FactTable
| 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(String cubeName,
String factName,
List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns,
Map<String,Set<UpdatePeriod>> storageUpdatePeriods,
double weight,
Map<String,String> properties,
Map<String,Map<UpdatePeriod,String>> storagePrefixUpdatePeriodMap) |
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()
Absolute end time of the fact
|
Date |
getAbsoluteStartTime()
Absolute start time of the fact
|
String |
getCubeName()
Cube to which this fact belongs to
|
String |
getDataCompletenessTag()
tag for checking data completeness
|
Date |
getEndTime()
End time of the fact
|
List<String> |
getPartitions(Date fromDate,
Date toDate,
UpdatePeriod interval)
Get partition value strings for given range, for the specified updateInterval
|
Date |
getRelativeEndTime()
Relative End time of the Fact
|
Date |
getRelativeStartTime()
Relative start time of the fact
|
String |
getSourceFactName()
Storage name of the fact
|
Date |
getStartTime()
Start time of the fact
|
Map<String,Map<UpdatePeriod,String>> |
getStoragePrefixUpdatePeriodMap() |
Set<String> |
getStorages()
The set of Storage names
|
String |
getTablePrefix(String storage,
UpdatePeriod updatePeriod) |
CubeTableType |
getTableType()
The type of the fact
|
Map<String,Set<UpdatePeriod>> |
getUpdatePeriods()
Get map of storage to update period mapping
|
Set<String> |
getValidColumns()
Return valid columns of the fact, which can be specified by property MetastoreUtil.getValidColumnsKey(getName())
|
boolean |
hasColumn(String column) |
int |
hashCode() |
boolean |
isAggregated()
Is Aggregated Fact
|
boolean |
isVirtualFact()
Is Virtual Fact
|
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, now, removeProperty, toString, weightgetAllFieldNames, getColumns, getProperties, weightpublic 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 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)
public boolean hasColumn(String column)
public Map<String,Set<UpdatePeriod>> getUpdatePeriods()
FactTablegetUpdatePeriods in interface FactTablepublic int hashCode()
hashCode in class AbstractCubeTablepublic boolean equals(Object obj)
equals in class AbstractCubeTablepublic CubeTableType getTableType()
FactTablegetTableType in interface FactTablegetTableType in class AbstractCubeTableCubeTableTypepublic 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()
FactTablegetStorages in interface FactTablegetStorages in class AbstractCubeTablepublic String getCubeName()
FactTablegetCubeName in interface FactTablepublic Set<String> getValidColumns()
getValidColumns in interface FactTablepublic 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 LensException
storage - updatePeriods - LensExceptionpublic void alterColumn(org.apache.hadoop.hive.metastore.api.FieldSchema column)
AbstractCubeTablecolumn - The column spec as FieldSchema - name, type and a commentpublic void addColumns(Collection<org.apache.hadoop.hive.metastore.api.FieldSchema> columns)
AbstractCubeTablecolumns - The collection of columnspublic void alterCubeName(String cubeName)
cubeName - public String getDataCompletenessTag()
FactTablegetDataCompletenessTag in interface FactTablepublic boolean isAggregated()
FactTableisAggregated in interface FactTablepublic void setAggregated(boolean isAggregated)
public boolean isVirtualFact()
FactTableisVirtualFact in interface FactTablepublic String getSourceFactName()
FactTablegetSourceFactName in interface FactTablepublic String getTablePrefix(String storage, UpdatePeriod updatePeriod)
public Date getAbsoluteStartTime()
FactTablegetAbsoluteStartTime in interface FactTableDatepublic Date getRelativeStartTime()
FactTablegetRelativeStartTime in interface FactTableDatepublic Date getStartTime()
FactTablegetStartTime in interface FactTableDatepublic Date getAbsoluteEndTime()
FactTablegetAbsoluteEndTime in interface FactTableDatepublic Date getRelativeEndTime()
FactTablegetRelativeEndTime in interface FactTableDatepublic Date getEndTime()
FactTablegetEndTime in interface FactTableDate@Generated(value="lombok") public Map<String,Map<UpdatePeriod,String>> getStoragePrefixUpdatePeriodMap()
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.