public class CubeMetastoreClient extends Object
Modifier and Type | Method and Description |
---|---|
static Map<String,String> |
addFactColStartTimePropertyToFactProperties(XFactTable fact) |
List<org.apache.hadoop.hive.ql.metadata.Partition> |
addPartition(StoragePartitionDesc partSpec,
String storageName,
CubeTableType type)
Add a partition specified by the storage partition desc on the storage passed.
|
List<org.apache.hadoop.hive.ql.metadata.Partition> |
addPartitions(List<StoragePartitionDesc> storagePartitionDescs,
String storageName,
CubeTableType type)
batch addition
|
void |
addStorage(CubeDimensionTable dim,
String storage,
UpdatePeriod dumpPeriod,
StorageTableDesc storageTableDesc)
Adds storage to dimension and creates corresponding storage table
|
void |
addStorage(CubeFactTable fact,
String storage,
Set<UpdatePeriod> updatePeriods,
Map<String,StorageTableDesc> storageTableDescs,
Map<UpdatePeriod,String> updatePeriodStoragePrefix)
Adds storage to fact and creates corresponding storage table
|
void |
alterCube(String cubeName,
CubeInterface cube)
Alter cube specified by the name to new definition
|
void |
alterCube(XCube cube) |
void |
alterCubeDimensionTable(String dimTableName,
CubeDimensionTable cubeDimensionTable,
Map<String,StorageTableDesc> storageTableDescs)
Alter dimension table with new dimension definition and underlying storage tables as well
|
void |
alterCubeDimensionTable(XDimensionTable dimensionTable) |
void |
alterCubeFactTable(String factTableName,
FactTable cubeFactTable,
Map<String,StorageTableDesc> storageTableDescs,
Map<String,String> props)
Alter a cubefact with new definition and alter underlying storage tables as well.
|
void |
alterCubeFactTable(XFact fact) |
void |
alterDimension(String dimName,
Dimension newDim) |
void |
alterDimension(XDimension newDim)
Alter dimension specified by the dimension name to new definition
|
void |
alterHiveTable(String table,
org.apache.hadoop.hive.ql.metadata.Table hiveTable) |
void |
alterSegmentation(String segName,
Segmentation seg) |
void |
alterSegmentation(XSegmentation cubeSeg) |
void |
alterStorage(String storageName,
Storage storage) |
void |
alterStorage(XStorage storage)
Alter storage specified by the name to new definition
|
void |
alterVirtualCubeFactTable(CubeVirtualFactTable cubeVirtualFactTable)
Alter a virtual cube fact with new definition
|
void |
clearHiveTableCache()
clear hive table cache
|
static void |
close()
Close the current metastore client
|
void |
createCube(CubeInterface cube)
Create cube in metastore defined by
Cube or DerivedCube object |
void |
createCube(String name,
Set<CubeMeasure> measures,
Set<CubeDimAttribute> dimensions)
Create cube defined by measures and dimensions
|
void |
createCube(String name,
Set<CubeMeasure> measures,
Set<CubeDimAttribute> dimensions,
Map<String,String> properties)
Create cube defined by measures, dimensions and properties
|
void |
createCube(String name,
Set<CubeMeasure> measures,
Set<CubeDimAttribute> dimensions,
Set<ExprColumn> expressions,
Map<String,String> properties)
Create cube defined by measures, dimensions and properties
|
void |
createCube(String name,
Set<CubeMeasure> measures,
Set<CubeDimAttribute> dimensions,
Set<ExprColumn> expressions,
Set<JoinChain> chains,
Map<String,String> properties)
Create cube defined by measures, dimensions and properties
|
void |
createCube(XCube cube) |
void |
createCubeDimensionTable(String dimName,
String dimTblName,
List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns,
double weight,
Map<String,UpdatePeriod> dumpPeriods,
Map<String,String> properties,
Map<String,StorageTableDesc> storageTableDescs)
Create a cube dimension table
|
void |
createCubeDimensionTable(String dimName,
String dimTblName,
List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns,
double weight,
Set<String> storageNames,
Map<String,String> properties,
Map<String,StorageTableDesc> storageTableDescs)
Create a cube dimension table
|
void |
createCubeDimensionTable(XDimensionTable xDimTable) |
void |
createCubeFactTable(String cubeName,
String factName,
List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns,
Map<String,Set<UpdatePeriod>> storageAggregatePeriods,
double weight,
Map<String,String> properties,
Map<String,StorageTableDesc> storageTableDescs)
Create a cube fact table
|
void |
createCubeFactTable(String cubeName,
String factName,
List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns,
Map<String,Set<UpdatePeriod>> storageAggregatePeriods,
double weight,
Map<String,String> properties,
Map<String,StorageTableDesc> storageTableDescs,
Map<String,Map<UpdatePeriod,String>> storageUpdatePeriodMap) |
void |
createCubeTable(AbstractCubeTable cubeTable,
Map<String,StorageTableDesc> storageTableDescs)
Create cube table defined and create all the corresponding storage tables
|
void |
createDerivedCube(String parent,
String name,
Set<String> measures,
Set<String> dimensions,
Map<String,String> properties,
double weight)
Create derived cube defined by measures, dimensions and properties
|
void |
createDimension(Dimension dim)
Create dimension in metastore defined by
Dimension object |
void |
createDimension(String name,
Set<CubeDimAttribute> attributes,
Map<String,String> properties,
double weight)
Create dimension defined by attributes and properties
|
void |
createDimension(XDimension dim) |
<T extends org.jvnet.jaxb2_commons.lang.Equals & org.jvnet.jaxb2_commons.lang.HashCode & org.jvnet.jaxb2_commons.lang.ToString> |
createEntity(T entity) |
void |
createFactTable(XFact fact) |
void |
createSegmentation(Segmentation cubeSeg) |
void |
createSegmentation(String baseCubeName,
String segmentationName,
Set<Segment> segments,
double weight,
Map<String,String> properties) |
void |
createSegmentation(XSegmentation cubeSeg) |
void |
createStorage(Storage storage) |
void |
createStorage(XStorage storage) |
void |
createVirtualFactTable(String cubeName,
String virtualFactName,
String sourceFactName,
Double weight,
Map<String,String> properties) |
boolean |
dimTableLatestPartitionExists(String storageTableName) |
void |
dropCube(String cubeName)
Drop a cube
|
void |
dropDimension(String dimName)
Drop a dimension
|
void |
dropDimensionTable(String dimTblName,
boolean cascade)
Drop the dimension table
|
void |
dropFact(String factName,
boolean cascade)
Drop a fact with cascade flag
|
void |
dropHiveTable(String table) |
void |
dropPartition(String cubeTableName,
String storageName,
Map<String,Date> timePartSpec,
Map<String,String> nonTimePartSpec,
UpdatePeriod updatePeriod)
Add a partition specified by the storage partition desc on the storage passed.
|
void |
dropSegmentation(String segName) |
void |
dropStorage(String storageName)
Drop a storage
|
void |
dropStorageFromDim(String dimTblName,
String storage)
Drop a storage from dimension
|
void |
dropStorageFromFact(String factName,
String storage)
Drop a storage from fact
|
void |
dropVirtualFact(String virtualFactName)
Drop a virtual fact
|
boolean |
factPartitionExists(FactTable fact,
FactPartition part,
String storageTableName)
extract storage name and check in timeline cache for existance
|
boolean |
factPartitionExists(String factName,
String storageName,
UpdatePeriod updatePeriod,
Map<String,Date> partitionTimestamp,
Map<String,String> partSpec) |
Collection<CubeInterface> |
getAllCubes()
Get all cubes in metastore
|
List<DerivedCube> |
getAllDerivedQueryableCubes(CubeInterface cube)
Get all derived cubes of the cube, that have all fields queryable together
|
Collection<Dimension> |
getAllDimensions()
Get all cubes in metastore
|
Collection<CubeDimensionTable> |
getAllDimensionTables()
Get all dimension tables in metastore
|
List<CubeDimensionTable> |
getAllDimensionTables(Dimension dim)
Get all dimension tables of the dimension.
|
Collection<FactTable> |
getAllFacts()
Get all facts in metastore
|
Collection<FactTable> |
getAllFacts(boolean includeVirtualFacts)
Get all facts in metastore (virtual facts optional)
|
List<FactTable> |
getAllFacts(CubeInterface cube)
Get all fact tables of the cube.
|
List<FactTable> |
getAllFacts(CubeInterface cube,
boolean includeVirtualFacts)
Get all facts of cube (optional virtual facts)
|
List<org.apache.hadoop.hive.ql.metadata.Partition> |
getAllParts(String storageTableName) |
Collection<Segmentation> |
getAllSegmentations()
Get all segmentations in metastore
|
List<Segmentation> |
getAllSegmentations(CubeInterface cube) |
Collection<Storage> |
getAllStorages()
Get all storages in metastore
|
DataCompletenessChecker |
getCompletenessChecker() |
org.apache.hadoop.hive.conf.HiveConf |
getConf()
Get cube metastore client conf
|
CubeInterface |
getCube(String tableName)
Get
Cube object corresponding to the name |
CubeFactTable |
getCubeFactTable(String factName) |
CubeVirtualFactTable |
getCubeVirtualFactTable(String factName) |
Dimension |
getDimension(String tableName)
Get
Cube object corresponding to the name |
CubeDimensionTable |
getDimensionTable(String tableName)
Get
CubeDimensionTable object corresponding to the name |
FactTable |
getFactTable(String tableName)
Get
Cube object corresponding to the name |
org.apache.hadoop.hive.ql.metadata.Table |
getHiveTable(String tableName)
Get the hive
Table corresponding to the name |
static CubeMetastoreClient |
getInstance(org.apache.hadoop.hive.conf.HiveConf conf)
Get the instance of
CubeMetastoreClient corresponding to HiveConf |
Date |
getLatestDateOfCube(Cube cube,
String timeDimension)
get latest date for timeDimension from all fact-storage tables belonging to the given cube having timeDimension,
return the most recent of all.
|
org.apache.hadoop.hive.ql.metadata.Partition |
getPartitionByFilter(String storageTableName,
String filter) |
List<org.apache.hadoop.hive.ql.metadata.Partition> |
getPartitionsByFilter(String storageTableName,
String filter) |
Segmentation |
getSegmentation(String segName) |
Segmentation |
getSegmentation(String segName,
boolean throwException) |
Segmentation |
getSegmentationTable(String tableName) |
Storage |
getStorage(String storageName)
Get
Storage object corresponding to the name |
Storage |
getStorage(String storageName,
boolean throwException) |
Date |
getStorageTableEndDate(String storageTable,
FactTable factTableName) |
String |
getStorageTableName(String factOrDimTableName,
String storage,
UpdatePeriod updatePeriod) |
Set<String> |
getStorageTables(FactTable factTable,
String storage)
Returns storage table names for a storage.
|
Date |
getStorageTableStartDate(String storageTable,
FactTable factTableName) |
org.apache.hadoop.hive.ql.metadata.Table |
getTable(String tableName) |
org.apache.hadoop.hive.ql.metadata.Table |
getTable(String tableName,
boolean throwException) |
org.apache.hadoop.hive.ql.metadata.Table |
getTableWithType(String tableName,
CubeTableType type,
boolean throwException) |
org.apache.hadoop.hive.ql.metadata.Table |
getTableWithTypeFailFast(String tableName,
CubeTableType type) |
List<PartitionTimeline> |
getTimelines(String factName,
String storage,
String updatePeriodStr,
String timeDimension) |
List<String> |
getTimePartColNamesOfTable(String storageTableName) |
List<String> |
getTimePartColNamesOfTable(org.apache.hadoop.hive.ql.metadata.Table table)
extract from table properties
|
XDimensionTable |
getXDimensionTable(CubeDimensionTable dimTable) |
XDimensionTable |
getXDimensionTable(String dimTable) |
XFact |
getXFactTable(FactTable ft) |
XFact |
getXFactTable(String tableName) |
boolean |
isCube(String tableName)
Is the table name passed a cube?
|
boolean |
isDataCompletenessCheckEnabled() |
boolean |
isDimension(String tableName)
Is the table name passed a dimension?
|
boolean |
isDimensionTable(String tableName)
Is the table name passed a dimension table?
|
boolean |
isFactTable(String tableName)
Is the table name passed a fact table?
|
boolean |
isLensQueryableTable(String tableName) |
boolean |
isStorageTableCandidateForRange(String storageTableName,
Date fromDate,
Date toDate) |
boolean |
isStorageTableCandidateForRange(String storageTableName,
String fromDate,
String toDate) |
boolean |
isStorageTablePartitionACandidate(String storageTableName,
Date partDate) |
boolean |
isVirtualFactTable(String virtualTableName)
Is the table name passed a virtual fact table?
|
boolean |
partColExists(FactTable factTable,
String storage,
String partCol) |
boolean |
partitionExists(String storageTableName,
UpdatePeriod updatePeriod,
Map<String,Date> partitionTimestamps) |
boolean |
partitionExistsByFilter(String storageTableName,
String filter) |
boolean |
partitionExistsByFilter(String cubeTableName,
String storageName,
UpdatePeriod updatePeriod,
String filter) |
void |
pushHiveTable(org.apache.hadoop.hive.ql.metadata.Table hiveTable) |
boolean |
tableExists(String tblName) |
<T extends org.jvnet.jaxb2_commons.lang.Equals & org.jvnet.jaxb2_commons.lang.HashCode & org.jvnet.jaxb2_commons.lang.ToString> |
updateEntity(String name,
T entity) |
void |
updatePartition(String fact,
String storageName,
org.apache.hadoop.hive.ql.metadata.Partition partition,
UpdatePeriod updatePeriod) |
void |
updatePartitions(String factOrDimtableName,
String storageName,
Map<UpdatePeriod,List<org.apache.hadoop.hive.ql.metadata.Partition>> partitions) |
void |
verifyStorageExists(AbstractCubeTable cdt,
String storage) |
public DataCompletenessChecker getCompletenessChecker()
public boolean isDataCompletenessCheckEnabled()
public Date getLatestDateOfCube(Cube cube, String timeDimension) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
cube
- Cube to get latest date oftimeDimension
- time dimensionorg.apache.hadoop.hive.ql.metadata.HiveException
LensException
public void clearHiveTableCache()
public List<PartitionTimeline> getTimelines(String factName, String storage, String updatePeriodStr, String timeDimension) throws LensException, org.apache.hadoop.hive.ql.metadata.HiveException
LensException
org.apache.hadoop.hive.ql.metadata.HiveException
public void updatePartition(String fact, String storageName, org.apache.hadoop.hive.ql.metadata.Partition partition, UpdatePeriod updatePeriod) throws org.apache.hadoop.hive.ql.metadata.HiveException, org.apache.hadoop.hive.metastore.api.InvalidOperationException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
org.apache.hadoop.hive.metastore.api.InvalidOperationException
LensException
public void updatePartitions(String factOrDimtableName, String storageName, Map<UpdatePeriod,List<org.apache.hadoop.hive.ql.metadata.Partition>> partitions) throws org.apache.hadoop.hive.ql.metadata.HiveException, org.apache.hadoop.hive.metastore.api.InvalidOperationException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
org.apache.hadoop.hive.metastore.api.InvalidOperationException
LensException
public boolean isLensQueryableTable(String tableName)
public void verifyStorageExists(AbstractCubeTable cdt, String storage) throws LensException
LensException
public void createCubeFactTable(String cubeName, String factName, List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns, Map<String,Set<UpdatePeriod>> storageAggregatePeriods, double weight, Map<String,String> properties, Map<String,StorageTableDesc> storageTableDescs, Map<String,Map<UpdatePeriod,String>> storageUpdatePeriodMap) throws LensException
LensException
public <T extends org.jvnet.jaxb2_commons.lang.Equals & org.jvnet.jaxb2_commons.lang.HashCode & org.jvnet.jaxb2_commons.lang.ToString> void createEntity(T entity) throws LensException
LensException
public <T extends org.jvnet.jaxb2_commons.lang.Equals & org.jvnet.jaxb2_commons.lang.HashCode & org.jvnet.jaxb2_commons.lang.ToString> void updateEntity(String name, T entity) throws LensException, org.apache.hadoop.hive.ql.metadata.HiveException
LensException
org.apache.hadoop.hive.ql.metadata.HiveException
public static Map<String,String> addFactColStartTimePropertyToFactProperties(XFactTable fact)
public void createFactTable(XFact fact) throws LensException
LensException
public void createVirtualFactTable(String cubeName, String virtualFactName, String sourceFactName, Double weight, Map<String,String> properties) throws LensException
LensException
public static CubeMetastoreClient getInstance(org.apache.hadoop.hive.conf.HiveConf conf) throws org.apache.hadoop.hive.ql.metadata.HiveException
CubeMetastoreClient
corresponding to HiveConf
conf
- conforg.apache.hadoop.hive.ql.metadata.HiveException
public org.apache.hadoop.hive.conf.HiveConf getConf()
public static void close()
public void createStorage(XStorage storage) throws LensException
LensException
public void createStorage(Storage storage) throws LensException
LensException
public void createCube(XCube cube) throws LensException
LensException
public void createCube(CubeInterface cube) throws LensException
Cube
or DerivedCube
objectcube
- the Cube
object.LensException
public void createCube(String name, Set<CubeMeasure> measures, Set<CubeDimAttribute> dimensions) throws LensException
name
- Name of the cubemeasures
- Measures of the cubedimensions
- Dimensions of the cubeLensException
public void createCube(String name, Set<CubeMeasure> measures, Set<CubeDimAttribute> dimensions, Map<String,String> properties) throws LensException
name
- Name of the cubemeasures
- Measures of the cubedimensions
- Dimensions of the cubeproperties
- Properties of the cubeLensException
public void createCube(String name, Set<CubeMeasure> measures, Set<CubeDimAttribute> dimensions, Set<ExprColumn> expressions, Map<String,String> properties) throws LensException
name
- Name of the cubemeasures
- Measures of the cubedimensions
- Dimensions of the cubeproperties
- Properties of the cubeLensException
public void createCube(String name, Set<CubeMeasure> measures, Set<CubeDimAttribute> dimensions, Set<ExprColumn> expressions, Set<JoinChain> chains, Map<String,String> properties) throws LensException
name
- Name of the cubemeasures
- Measures of the cubedimensions
- Dimensions of the cubeexpressions
- Expressions of the cubechains
- JoinChains of the cubeproperties
- Properties of the cubeLensException
public void createDimension(String name, Set<CubeDimAttribute> attributes, Map<String,String> properties, double weight) throws LensException
name
- Name of the dimensionattributes
- Attributes of the dimensionproperties
- Properties of the dimensionweight
- Weight of the dimensionLensException
public void createDimension(XDimension dim) throws LensException
LensException
public void createDimension(Dimension dim) throws LensException
Dimension
objectdim
- the Dimension
object.LensException
public void createDerivedCube(String parent, String name, Set<String> measures, Set<String> dimensions, Map<String,String> properties, double weight) throws LensException
parent
- Name of the parent cubename
- Name of the derived cubemeasures
- Measures of the derived cubedimensions
- Dimensions of the derived cubeproperties
- Properties of the derived cubeweight
- Weight of the derived cubeLensException
public void createCubeFactTable(String cubeName, String factName, List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns, Map<String,Set<UpdatePeriod>> storageAggregatePeriods, double weight, Map<String,String> properties, Map<String,StorageTableDesc> storageTableDescs) throws LensException
cubeName
- The cube name to which fact belongs to.factName
- The fact namecolumns
- The columns of fact tablestorageAggregatePeriods
- Aggregate periods for the storagesweight
- Weight of the cubeproperties
- Properties of fact tablestorageTableDescs
- Map of storage table prefix to its storage table descriptionLensException
public void createSegmentation(String baseCubeName, String segmentationName, Set<Segment> segments, double weight, Map<String,String> properties) throws LensException
baseCubeName
- The cube name ot which segmentation belong tosegmentationName
- The segmentation namesegments
- Participating cube segementsweight
- Weight of segmentationproperties
- Properties of segmentationLensException
public void createCubeDimensionTable(XDimensionTable xDimTable) throws LensException
LensException
public void createCubeDimensionTable(String dimName, String dimTblName, List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns, double weight, Set<String> storageNames, Map<String,String> properties, Map<String,StorageTableDesc> storageTableDescs) throws LensException
dimName
- The dimension name to which the dim-table belongs todimTblName
- dimension table namecolumns
- Columns of the dimension tableweight
- Weight of the dimension tablestorageNames
- Storages on which dimension is available without any dumpsproperties
- Properties of dimension tablestorageTableDescs
- Map of storage to its storage table descriptionLensException
public void createCubeDimensionTable(String dimName, String dimTblName, List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns, double weight, Map<String,UpdatePeriod> dumpPeriods, Map<String,String> properties, Map<String,StorageTableDesc> storageTableDescs) throws LensException
dimName
- The dimension name to which the dim-table belongs todimTblName
- dimension table namecolumns
- Columns of the dimension tableweight
- Weight of the dimension tabledumpPeriods
- Storage names and their dump periods on which dimension is availableproperties
- properties of dimension tablestorageTableDescs
- Map of storage to its storage table descriptionLensException
public void createCubeTable(AbstractCubeTable cubeTable, Map<String,StorageTableDesc> storageTableDescs) throws LensException
cubeTable
- Can be fact or dimension tablestorageTableDescs
- Map of storage tableName prefix to its storage table descriptionLensException
public void createSegmentation(XSegmentation cubeSeg) throws LensException
LensException
public void createSegmentation(Segmentation cubeSeg) throws LensException
LensException
public void addStorage(CubeFactTable fact, String storage, Set<UpdatePeriod> updatePeriods, Map<String,StorageTableDesc> storageTableDescs, Map<UpdatePeriod,String> updatePeriodStoragePrefix) throws LensException
fact
- The CubeFactTablestorage
- The storageupdatePeriods
- Update periods of the fact on the storagestorageTableDescs
- The storage table descriptionLensException
public void addStorage(CubeDimensionTable dim, String storage, UpdatePeriod dumpPeriod, StorageTableDesc storageTableDesc) throws LensException
dim
- The CubeDimensionTablestorage
- The storagedumpPeriod
- The dumpPeriod if any, null otherwisestorageTableDesc
- The storage table descriptionLensException
public List<org.apache.hadoop.hive.ql.metadata.Partition> addPartition(StoragePartitionDesc partSpec, String storageName, CubeTableType type) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
partSpec
- The storage partition descriptionstorageName
- The storage objecttype
- org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public List<org.apache.hadoop.hive.ql.metadata.Partition> addPartitions(List<StoragePartitionDesc> storagePartitionDescs, String storageName, CubeTableType type) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public Date getStorageTableStartDate(String storageTable, FactTable factTableName) throws LensException
LensException
public Date getStorageTableEndDate(String storageTable, FactTable factTableName) throws LensException
LensException
public void dropPartition(String cubeTableName, String storageName, Map<String,Date> timePartSpec, Map<String,String> nonTimePartSpec, UpdatePeriod updatePeriod) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
cubeTableName
- cube fact/dimension table namestorageName
- storage nametimePartSpec
- time partitionsnonTimePartSpec
- non time partitionsupdatePeriod
- update period of the partitionorg.apache.hadoop.hive.ql.metadata.HiveException
LensException
public boolean tableExists(String tblName) throws org.apache.hadoop.hive.ql.metadata.HiveException
org.apache.hadoop.hive.ql.metadata.HiveException
public boolean factPartitionExists(FactTable fact, FactPartition part, String storageTableName) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public boolean factPartitionExists(String factName, String storageName, UpdatePeriod updatePeriod, Map<String,Date> partitionTimestamp, Map<String,String> partSpec) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public boolean partitionExists(String storageTableName, UpdatePeriod updatePeriod, Map<String,Date> partitionTimestamps) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public boolean partitionExistsByFilter(String cubeTableName, String storageName, UpdatePeriod updatePeriod, String filter) throws LensException
LensException
public boolean partitionExistsByFilter(String storageTableName, String filter) throws LensException
LensException
public List<org.apache.hadoop.hive.ql.metadata.Partition> getAllParts(String storageTableName) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public org.apache.hadoop.hive.ql.metadata.Partition getPartitionByFilter(String storageTableName, String filter) throws org.apache.hadoop.hive.ql.metadata.HiveException
org.apache.hadoop.hive.ql.metadata.HiveException
public List<org.apache.hadoop.hive.ql.metadata.Partition> getPartitionsByFilter(String storageTableName, String filter) throws org.apache.hadoop.hive.ql.metadata.HiveException
org.apache.hadoop.hive.ql.metadata.HiveException
public boolean dimTableLatestPartitionExists(String storageTableName)
public org.apache.hadoop.hive.ql.metadata.Table getHiveTable(String tableName) throws LensException
Table
corresponding to the nametableName
- table nameTable
object corresponding to the nameLensException
public List<String> getTimePartColNamesOfTable(String storageTableName) throws LensException
LensException
public List<String> getTimePartColNamesOfTable(org.apache.hadoop.hive.ql.metadata.Table table)
public org.apache.hadoop.hive.ql.metadata.Table getTableWithTypeFailFast(String tableName, CubeTableType type) throws LensException
LensException
public org.apache.hadoop.hive.ql.metadata.Table getTableWithType(String tableName, CubeTableType type, boolean throwException) throws LensException
LensException
public org.apache.hadoop.hive.ql.metadata.Table getTable(String tableName) throws LensException
LensException
public org.apache.hadoop.hive.ql.metadata.Table getTable(String tableName, boolean throwException) throws LensException
LensException
public void dropHiveTable(String table) throws LensException
LensException
public boolean isFactTable(String tableName) throws LensException
tableName
- table nameorg.apache.hadoop.hive.ql.metadata.HiveException
LensException
public boolean isVirtualFactTable(String virtualTableName) throws LensException
virtualTableName
- table nameorg.apache.hadoop.hive.ql.metadata.HiveException
LensException
public boolean isDimensionTable(String tableName) throws LensException
tableName
- table nameLensException
public boolean isCube(String tableName) throws LensException
tableName
- table nameLensException
public boolean isDimension(String tableName) throws LensException
tableName
- table nameLensException
public XFact getXFactTable(String tableName) throws LensException
LensException
public XFact getXFactTable(FactTable ft) throws LensException
LensException
public Segmentation getSegmentationTable(String tableName) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public XDimensionTable getXDimensionTable(String dimTable) throws LensException
LensException
public XDimensionTable getXDimensionTable(CubeDimensionTable dimTable) throws LensException
LensException
public CubeDimensionTable getDimensionTable(String tableName) throws LensException
CubeDimensionTable
object corresponding to the nametableName
- The cube dimension nameLensException
- if there is no dimension table with the namepublic Storage getStorage(String storageName) throws LensException
Storage
object corresponding to the namestorageName
- The storage nameLensException
- if there is no storage by the namepublic Storage getStorage(String storageName, boolean throwException) throws LensException
LensException
public CubeInterface getCube(String tableName) throws LensException
Cube
object corresponding to the nametableName
- The cube nameLensException
- when the table name does not correspond to a cubepublic Dimension getDimension(String tableName) throws LensException
Cube
object corresponding to the nametableName
- The cube nameLensException
- if the table name passed is not a Dimensionpublic FactTable getFactTable(String tableName) throws LensException
Cube
object corresponding to the nametableName
- The cube nameLensException
- if there is no cube by the namepublic Segmentation getSegmentation(String segName) throws LensException
LensException
public Segmentation getSegmentation(String segName, boolean throwException) throws LensException
LensException
public Collection<CubeDimensionTable> getAllDimensionTables() throws LensException
LensException
public Collection<Storage> getAllStorages() throws LensException
LensException
public Collection<CubeInterface> getAllCubes() throws LensException
LensException
public Collection<Dimension> getAllDimensions() throws LensException
LensException
public Collection<FactTable> getAllFacts() throws LensException
LensException
public Collection<FactTable> getAllFacts(boolean includeVirtualFacts) throws LensException
includeVirtualFacts
- set true for including virtual factsLensException
public Collection<Segmentation> getAllSegmentations() throws LensException
LensException
public List<FactTable> getAllFacts(CubeInterface cube) throws LensException
cube
- Cube objectLensException
public List<FactTable> getAllFacts(CubeInterface cube, boolean includeVirtualFacts) throws LensException
cube
- Cube objectincludeVirtualFacts
- set true for virtual factsLensException
public List<Segmentation> getAllSegmentations(CubeInterface cube) throws LensException
LensException
public List<DerivedCube> getAllDerivedQueryableCubes(CubeInterface cube) throws LensException
cube
- Cube objectLensException
public List<CubeDimensionTable> getAllDimensionTables(Dimension dim) throws LensException
dim
- Dimension objectLensException
public boolean partColExists(FactTable factTable, String storage, String partCol) throws LensException
LensException
public Set<String> getStorageTables(FactTable factTable, String storage) throws LensException
factTable
- storage
- LensException
public void pushHiveTable(org.apache.hadoop.hive.ql.metadata.Table hiveTable) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public void alterHiveTable(String table, org.apache.hadoop.hive.ql.metadata.Table hiveTable) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public void alterCube(XCube cube) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public void alterCube(String cubeName, CubeInterface cube) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
cubeName
- The cube name to be alteredcube
- The new cube definition Cube
or DerivedCube
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public void alterDimension(XDimension newDim) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
newDim
- The new dimension definitionorg.apache.hadoop.hive.ql.metadata.HiveException
LensException
public void alterDimension(String dimName, Dimension newDim) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public void alterStorage(XStorage storage) throws LensException, org.apache.hadoop.hive.ql.metadata.HiveException
storage
- The new storage definitionLensException
org.apache.hadoop.hive.ql.metadata.HiveException
public void alterStorage(String storageName, Storage storage) throws LensException, org.apache.hadoop.hive.ql.metadata.HiveException
LensException
org.apache.hadoop.hive.ql.metadata.HiveException
public void dropStorage(String storageName) throws LensException
storageName
- storage nameLensException
public void dropCube(String cubeName) throws LensException
cubeName
- cube nameLensException
public void dropDimension(String dimName) throws LensException
dimName
- dimension name to be droppedLensException
public void dropFact(String factName, boolean cascade) throws LensException
factName
- fact namecascade
- If true, will drop all the storages of the factLensException
public void dropVirtualFact(String virtualFactName) throws LensException
virtualFactName
- virtual fact nameLensException
public void dropSegmentation(String segName) throws LensException
LensException
public void dropStorageFromFact(String factName, String storage) throws LensException
factName
- fact namestorage
- storage nameLensException
public void dropStorageFromDim(String dimTblName, String storage) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
dimTblName
- dim table namestorage
- storageorg.apache.hadoop.hive.ql.metadata.HiveException
LensException
public void dropDimensionTable(String dimTblName, boolean cascade) throws LensException
dimTblName
- dim table namecascade
- If true, will drop all the dimension storagesorg.apache.hadoop.hive.ql.metadata.HiveException
LensException
public void alterCubeFactTable(XFact fact) throws LensException, org.apache.hadoop.hive.ql.metadata.HiveException
LensException
org.apache.hadoop.hive.ql.metadata.HiveException
public void alterCubeFactTable(String factTableName, FactTable cubeFactTable, Map<String,StorageTableDesc> storageTableDescs, Map<String,String> props) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
factTableName
- fact table namecubeFactTable
- cube fact tablestorageTableDescs
- storage table desc objectsorg.apache.hadoop.hive.ql.metadata.HiveException
LensException
public void alterSegmentation(XSegmentation cubeSeg) throws LensException, org.apache.hadoop.hive.ql.metadata.HiveException
LensException
org.apache.hadoop.hive.ql.metadata.HiveException
public void alterVirtualCubeFactTable(CubeVirtualFactTable cubeVirtualFactTable) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
cubeVirtualFactTable
- cube virtual fact tableorg.apache.hadoop.hive.ql.metadata.HiveException
LensException
public void alterSegmentation(String segName, Segmentation seg) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public CubeFactTable getCubeFactTable(String factName) throws LensException
LensException
public CubeVirtualFactTable getCubeVirtualFactTable(String factName) throws LensException
LensException
public void alterCubeDimensionTable(XDimensionTable dimensionTable) throws LensException, org.apache.hadoop.hive.ql.metadata.HiveException
LensException
org.apache.hadoop.hive.ql.metadata.HiveException
public void alterCubeDimensionTable(String dimTableName, CubeDimensionTable cubeDimensionTable, Map<String,StorageTableDesc> storageTableDescs) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
dimTableName
- dim table namecubeDimensionTable
- cube dimention tableorg.apache.hadoop.hive.ql.metadata.HiveException
LensException
public boolean isStorageTableCandidateForRange(String storageTableName, Date fromDate, Date toDate) throws LensException
LensException
public boolean isStorageTablePartitionACandidate(String storageTableName, Date partDate) throws LensException
LensException
public boolean isStorageTableCandidateForRange(String storageTableName, String fromDate, String toDate) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
LensException
public String getStorageTableName(String factOrDimTableName, String storage, UpdatePeriod updatePeriod) throws LensException
LensException
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.