This project has retired. For details please refer to its Attic page.
MetastoreUtil (Lens 2.0.1-beta-incubating API)

org.apache.lens.cube.metadata
Class MetastoreUtil

java.lang.Object
  extended by org.apache.lens.cube.metadata.MetastoreUtil
All Implemented Interfaces:
MetastoreConstants

public class MetastoreUtil
extends Object
implements MetastoreConstants


Field Summary
 
Fields inherited from interface org.apache.lens.cube.metadata.MetastoreConstants
AGGR_SFX, ATTRIBUTES_LIST_SFX, BASE_KEY_PFX, BASE64_SFX, CHAIN_NAME_SFX, CHAIN_REF_COLUMN_SFX, CLASS_SFX, COL_PFX, COST_SFX, CUBE_ALL_FIELDS_QUERIABLE, CUBE_KEY_PFX, CUBE_NAME_SFX, CUBE_TABLE_PFX, DESC_SFX, DIM_KEY_PFX, DIM_NAME_SFX, DIM_REFERS_SFX, DIM_TBL_PFX, DIMENSION_PFX, DIMENSIONS_LIST_SFX, DISPLAY_SFX, DUMP_PERIOD_SFX, END_TIME_SFX, EXPR_SFX, EXPRESSIONS_LIST_SFX, FACT_AGGREGATED_PROPERTY, FACT_KEY_PFX, FORMATSTRING_SFX, FULL_CHAIN_KEY, HIERARCHY_SFX, INLINE_SIZE_SFX, INLINE_VALUES_SFX, IS_JOIN_KEY_SFX, JOIN_CHAIN_KEY, JOIN_CHAIN_LIST_SFX, LATEST_PART_TIMESTAMP_SFX, MAX_SFX, MEASURE_KEY_PFX, MEASURES_LIST_SFX, METASTORE_ENABLE_CACHING, MIN_SFX, NUM_CHAINS_SFX, PARENT_CUBE_SFX, PARTITION_UPDATE_PERIOD, PARTITION_UPDATE_PERIOD_SFX, START_TIME_SFX, STORAGE_ENTITY_PFX, STORAGE_LIST_SFX, STORAGE_PFX, TABLE_COLUMN_SEPERATOR, TABLE_TYPE_KEY, TIME_PART_COLUMNS, TIMED_DIMENSION_SFX, TIMED_DIMENSIONS_LIST_SFX, TIMEDIM_TO_PART_MAPPING_PFX, TYPE_SFX, UNIT_SFX, UPDATE_PERIOD_SFX, VALID_COLUMNS_SFX, WEIGHT_KEY_SFX
 
Constructor Summary
MetastoreUtil()
           
 
Method Summary
static void addColumnNames(CubeDimAttribute dim, Set<String> cols)
           
static
<E extends Named>
void
addNameStrings(Map<String,String> props, String key, Collection<E> set)
           
static String getBasePrefix(String base)
           
static String getColumnKeyPrefix(String colName)
           
static Set<String> getColumnNames(AbstractCubeTable table)
           
static String getCubeColCostPropertyKey(String colName)
           
static String getCubeColDescriptionKey(String colName)
           
static String getCubeColDisplayKey(String colName)
           
static String getCubeColEndTimePropertyKey(String colName)
           
static String getCubeColStartTimePropertyKey(String colName)
           
static String getCubeDimensionListKey(String cubeName)
           
static String getCubeJoinChainDescriptionKey(String colName)
           
static String getCubeJoinChainDisplayKey(String colName)
           
static String getCubeJoinChainFullChainKey(String colName, int index)
           
static String getCubeJoinChainKey(String colName)
           
static String getCubeJoinChainListKey(String cubeName)
           
static String getCubeJoinChainNumChainsKey(String colName)
           
static String getCubeMeasureListKey(String cubeName)
           
static String getCubePrefix(String cubeName)
           
static String getCubeTableKeyPrefix(String tableName)
           
static String getCubeTableWeightKey(String name)
           
static String getCubeTimedDimensionListKey(String cubeName)
           
static String getDimAttributeListKey(String dimName)
           
static String getDimensionClassPropertyKey(String dimName)
           
static String getDimensionDestReference(String tableName, String columnName)
           
static String getDimensionDumpPeriodKey(String dimTblName, String storage)
           
static String getDimensionJoinChainDescriptionKey(String colName)
           
static String getDimensionJoinChainDisplayKey(String colName)
           
static String getDimensionJoinChainFullChainKey(String colName, int index)
           
static String getDimensionJoinChainKey(String colName)
           
static String getDimensionJoinChainListKey(String dimName)
           
static String getDimensionJoinChainNumChainsKey(String colName)
           
static String getDimensionKeyPrefix(String dimName)
           
static String getDimensionSrcReferenceKey(String dimName)
           
static String getDimensionStorageListKey(String dimTblName)
           
static String getDimensionTablePrefix(String dimTblName)
           
static String getDimNameKey(String dimTblName)
           
static String getDimPrefix(String dimName)
           
static String getDimRefChainColumnKey(String dimName)
           
static String getDimRefChainNameKey(String dimName)
           
static String getDimStorageTableName(String dimName, String storageName)
           
static String getDimTimedDimensionKey(String dimName)
           
static String getDimTypePropertyKey(String dimName)
           
static String getDimUseAsJoinKey(String dimName)
           
static String getExprColumnKey(String colName)
           
static String getExprEncodingPropertyKey(String colName)
           
static String getExpressionListKey(String name)
           
static String getExprTypePropertyKey(String colName)
           
static String getFactCubeNameKey(String name)
           
static String getFactKeyPrefix(String factName)
           
static String getFactStorageListKey(String name)
           
static String getFactStorageTableName(String factName, String storageName)
           
static String getFactUpdatePeriodKey(String name, String storage)
           
static Integer getHierachyElementIndex(String dimName, String param)
           
static String getHierachyElementKeyName(String dimName, int index)
           
static String getHierachyElementKeyPFX(String dimName)
           
static String getInlineDimensionSizeKey(String name)
           
static String getInlineDimensionValuesKey(String name)
           
static String getLatestPartTimestampKey(String partCol)
           
static String getMeasureAggrPropertyKey(String measureName)
           
static String getMeasureClassPropertyKey(String measureName)
           
static String getMeasureFormatPropertyKey(String measureName)
           
static String getMeasureMaxPropertyKey(String measureName)
           
static String getMeasureMinPropertyKey(String measureName)
           
static String getMeasurePrefix(String measureName)
           
static String getMeasureTypePropertyKey(String measureName)
           
static String getMeasureUnitPropertyKey(String measureName)
           
static
<E extends Named>
String
getNamedStr(Collection<E> set)
           
static String getNamedStringValue(Map<String,String> props, String key)
           
static String getObjectStr(Collection<?> set)
           
static String getParentCubeNameKey(String cubeName)
           
static String getReferencesString(List<TableReference> references)
           
static String getStorageClassKey(String name)
           
static String getStorageEntityPrefix(String storageName)
           
static String getStorageTableName(String cubeTableName, String storagePrefix)
           
static String getStr(Collection<String> set)
           
static String getValidColumnsKey(String name)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetastoreUtil

public MetastoreUtil()
Method Detail

getFactStorageTableName

public static final String getFactStorageTableName(String factName,
                                                   String storageName)

getDimStorageTableName

public static final String getDimStorageTableName(String dimName,
                                                  String storageName)

getStorageTableName

public static final String getStorageTableName(String cubeTableName,
                                               String storagePrefix)

getStorageClassKey

public static String getStorageClassKey(String name)

getStorageEntityPrefix

public static final String getStorageEntityPrefix(String storageName)

getDimPrefix

public static final String getDimPrefix(String dimName)

getDimAttributeListKey

public static final String getDimAttributeListKey(String dimName)

getDimTimedDimensionKey

public static final String getDimTimedDimensionKey(String dimName)

getDimensionKeyPrefix

public static String getDimensionKeyPrefix(String dimName)

getDimensionClassPropertyKey

public static final String getDimensionClassPropertyKey(String dimName)

getInlineDimensionSizeKey

public static String getInlineDimensionSizeKey(String name)

getInlineDimensionValuesKey

public static String getInlineDimensionValuesKey(String name)

getDimTypePropertyKey

public static final String getDimTypePropertyKey(String dimName)

getHierachyElementKeyPFX

public static String getHierachyElementKeyPFX(String dimName)

getHierachyElementKeyName

public static String getHierachyElementKeyName(String dimName,
                                               int index)

getHierachyElementIndex

public static Integer getHierachyElementIndex(String dimName,
                                              String param)

getDimensionSrcReferenceKey

public static final String getDimensionSrcReferenceKey(String dimName)

getDimRefChainNameKey

public static final String getDimRefChainNameKey(String dimName)

getDimRefChainColumnKey

public static final String getDimRefChainColumnKey(String dimName)

getDimUseAsJoinKey

public static String getDimUseAsJoinKey(String dimName)

getDimensionDestReference

public static final String getDimensionDestReference(String tableName,
                                                     String columnName)

getReferencesString

public static final String getReferencesString(List<TableReference> references)

getColumnKeyPrefix

public static String getColumnKeyPrefix(String colName)

getCubeColStartTimePropertyKey

public static String getCubeColStartTimePropertyKey(String colName)

getCubeColEndTimePropertyKey

public static String getCubeColEndTimePropertyKey(String colName)

getCubeColCostPropertyKey

public static String getCubeColCostPropertyKey(String colName)

getCubeColDescriptionKey

public static String getCubeColDescriptionKey(String colName)

getCubeColDisplayKey

public static String getCubeColDisplayKey(String colName)

getExprColumnKey

public static final String getExprColumnKey(String colName)

getExprTypePropertyKey

public static final String getExprTypePropertyKey(String colName)

getExprEncodingPropertyKey

public static final String getExprEncodingPropertyKey(String colName)

getCubeJoinChainKey

public static String getCubeJoinChainKey(String colName)

getCubeJoinChainNumChainsKey

public static String getCubeJoinChainNumChainsKey(String colName)

getCubeJoinChainFullChainKey

public static String getCubeJoinChainFullChainKey(String colName,
                                                  int index)

getCubeJoinChainDescriptionKey

public static String getCubeJoinChainDescriptionKey(String colName)

getCubeJoinChainDisplayKey

public static String getCubeJoinChainDisplayKey(String colName)

getDimensionJoinChainKey

public static String getDimensionJoinChainKey(String colName)

getDimensionJoinChainNumChainsKey

public static String getDimensionJoinChainNumChainsKey(String colName)

getDimensionJoinChainFullChainKey

public static String getDimensionJoinChainFullChainKey(String colName,
                                                       int index)

getDimensionJoinChainDescriptionKey

public static String getDimensionJoinChainDescriptionKey(String colName)

getDimensionJoinChainDisplayKey

public static String getDimensionJoinChainDisplayKey(String colName)

getDimensionTablePrefix

public static String getDimensionTablePrefix(String dimTblName)

getDimensionDumpPeriodKey

public static String getDimensionDumpPeriodKey(String dimTblName,
                                               String storage)

getDimensionStorageListKey

public static String getDimensionStorageListKey(String dimTblName)

getDimNameKey

public static String getDimNameKey(String dimTblName)

getMeasurePrefix

public static final String getMeasurePrefix(String measureName)

getMeasureClassPropertyKey

public static final String getMeasureClassPropertyKey(String measureName)

getMeasureUnitPropertyKey

public static final String getMeasureUnitPropertyKey(String measureName)

getMeasureTypePropertyKey

public static final String getMeasureTypePropertyKey(String measureName)

getMeasureFormatPropertyKey

public static final String getMeasureFormatPropertyKey(String measureName)

getMeasureAggrPropertyKey

public static final String getMeasureAggrPropertyKey(String measureName)

getMeasureMinPropertyKey

public static final String getMeasureMinPropertyKey(String measureName)

getMeasureMaxPropertyKey

public static final String getMeasureMaxPropertyKey(String measureName)

getExpressionListKey

public static final String getExpressionListKey(String name)

getBasePrefix

public static final String getBasePrefix(String base)

getCubePrefix

public static final String getCubePrefix(String cubeName)

getCubeMeasureListKey

public static final String getCubeMeasureListKey(String cubeName)

getCubeDimensionListKey

public static final String getCubeDimensionListKey(String cubeName)

getCubeTimedDimensionListKey

public static final String getCubeTimedDimensionListKey(String cubeName)

getCubeJoinChainListKey

public static final String getCubeJoinChainListKey(String cubeName)

getDimensionJoinChainListKey

public static final String getDimensionJoinChainListKey(String dimName)

getParentCubeNameKey

public static final String getParentCubeNameKey(String cubeName)

getCubeTableKeyPrefix

public static final String getCubeTableKeyPrefix(String tableName)

getFactStorageListKey

public static String getFactStorageListKey(String name)

getFactKeyPrefix

public static String getFactKeyPrefix(String factName)

getFactUpdatePeriodKey

public static String getFactUpdatePeriodKey(String name,
                                            String storage)

getFactCubeNameKey

public static String getFactCubeNameKey(String name)

getValidColumnsKey

public static String getValidColumnsKey(String name)

getCubeTableWeightKey

public static String getCubeTableWeightKey(String name)

getLatestPartTimestampKey

public static String getLatestPartTimestampKey(String partCol)

getNamedStr

public static <E extends Named> String getNamedStr(Collection<E> set)

addNameStrings

public static <E extends Named> void addNameStrings(Map<String,String> props,
                                                    String key,
                                                    Collection<E> set)

getNamedStringValue

public static String getNamedStringValue(Map<String,String> props,
                                         String key)

getObjectStr

public static String getObjectStr(Collection<?> set)

getStr

public static String getStr(Collection<String> set)

getColumnNames

public static Set<String> getColumnNames(AbstractCubeTable table)

addColumnNames

public static void addColumnNames(CubeDimAttribute dim,
                                  Set<String> cols)


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