public class CubeMetastoreClient extends Object
| Modifier and Type | Method and Description |
|---|---|
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,
StorageTableDesc storageTableDesc)
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 |
alterCubeDimensionTable(String dimTableName,
CubeDimensionTable cubeDimensionTable,
Map<String,StorageTableDesc> storageTableDescs)
Alter dimension table with new dimension definition and underlying storage tables as well
|
void |
alterCubeFactTable(String factTableName,
CubeFactTable cubeFactTable,
Map<String,StorageTableDesc> storageTableDescs)
Alter a cubefact with new definition and alter underlying storage tables as well.
|
void |
alterDimension(String dimName,
Dimension 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 |
alterStorage(String storageName,
Storage storage)
Alter storage specified by the name to 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 |
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 |
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 |
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 |
createSegmentation(Segmentation cubeSeg) |
void |
createSegmentation(String baseCubeName,
String segmentationName,
Set<Segment> segments,
double weight,
Map<String,String> properties) |
void |
createStorage(Storage storage) |
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
|
boolean |
factPartitionExists(CubeFactTable 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<CubeFactTable> |
getAllFacts()
Get all facts in metastore
|
List<CubeFactTable> |
getAllFacts(CubeInterface cube)
Get all fact tables of the cube.
|
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
|
org.apache.hadoop.hive.conf.HiveConf |
getConf()
Get cube metastore client conf
|
CubeInterface |
getCube(String tableName)
Get
Cube object corresponding to the name |
CubeFactTable |
getCubeFact(String tableName)
Get
Cube object corresponding to the name |
Dimension |
getDimension(String tableName)
Get
Cube object corresponding to the name |
CubeDimensionTable |
getDimensionTable(String tableName)
Get
CubeDimensionTable object corresponding to the name |
CubeFactTable |
getFactTable(String tableName)
Get
CubeFactTable 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) |
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
|
boolean |
isCube(String tableName)
Is the table name passed a cube?
|
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 |
partColExists(String tableName,
String partCol) |
boolean |
partitionExists(String storageTableName,
UpdatePeriod updatePeriod,
Map<String,Date> partitionTimestamps) |
boolean |
partitionExistsByFilter(String storageTableName,
String filter) |
boolean |
partitionExistsByFilter(String cubeTableName,
String storageName,
String filter) |
void |
pushHiveTable(org.apache.hadoop.hive.ql.metadata.Table hiveTable) |
boolean |
tableExists(String tblName) |
void |
updatePartition(String fact,
String storageName,
org.apache.hadoop.hive.ql.metadata.Partition partition) |
void |
updatePartitions(String factOrDimtableName,
String storageName,
List<org.apache.hadoop.hive.ql.metadata.Partition> partitions) |
void |
verifyStorageExists(AbstractCubeTable cdt,
String storage) |
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.HiveExceptionLensExceptionpublic void clearHiveTableCache()
public List<PartitionTimeline> getTimelines(String factName, String storage, String updatePeriodStr, String timeDimension) throws LensException, org.apache.hadoop.hive.ql.metadata.HiveException
LensExceptionorg.apache.hadoop.hive.ql.metadata.HiveExceptionpublic void updatePartition(String fact, String storageName, org.apache.hadoop.hive.ql.metadata.Partition partition) throws org.apache.hadoop.hive.ql.metadata.HiveException, org.apache.hadoop.hive.metastore.api.InvalidOperationException, LensException
org.apache.hadoop.hive.ql.metadata.HiveExceptionorg.apache.hadoop.hive.metastore.api.InvalidOperationExceptionLensExceptionpublic void updatePartitions(String factOrDimtableName, String storageName, 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.HiveExceptionorg.apache.hadoop.hive.metastore.api.InvalidOperationExceptionLensExceptionpublic boolean isLensQueryableTable(String tableName)
public void verifyStorageExists(AbstractCubeTable cdt, String storage) throws LensException
LensExceptionpublic static CubeMetastoreClient getInstance(org.apache.hadoop.hive.conf.HiveConf conf) throws org.apache.hadoop.hive.ql.metadata.HiveException
CubeMetastoreClient corresponding to HiveConfconf - conforg.apache.hadoop.hive.ql.metadata.HiveExceptionpublic org.apache.hadoop.hive.conf.HiveConf getConf()
public static void close()
public void createStorage(Storage storage) throws LensException
LensExceptionpublic void createCube(CubeInterface cube) throws LensException
Cube or DerivedCube objectcube - the Cube object.LensExceptionpublic void createCube(String name, Set<CubeMeasure> measures, Set<CubeDimAttribute> dimensions) throws LensException
name - Name of the cubemeasures - Measures of the cubedimensions - Dimensions of the cubeLensExceptionpublic 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 cubeLensExceptionpublic 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 cubeLensExceptionpublic 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 cubeLensExceptionpublic 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 dimensionLensExceptionpublic void createDimension(Dimension dim) throws LensException
Dimension objectdim - the Dimension object.LensExceptionpublic 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 cubeLensExceptionpublic 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 to its storage table descriptionLensExceptionpublic 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 segmentationLensExceptionpublic 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 descriptionLensExceptionpublic 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 descriptionLensExceptionpublic void createCubeTable(AbstractCubeTable cubeTable, Map<String,StorageTableDesc> storageTableDescs) throws LensException
cubeTable - Can be fact or dimension tablestorageTableDescs - Map of storage to its storage table descriptionLensExceptionpublic void createSegmentation(Segmentation cubeSeg) throws LensException
LensExceptionpublic void addStorage(CubeFactTable fact, String storage, Set<UpdatePeriod> updatePeriods, StorageTableDesc storageTableDesc) throws LensException
fact - The CubeFactTablestorage - The storageupdatePeriods - Update periods of the fact on the storagestorageTableDesc - The storage table descriptionLensExceptionpublic 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 descriptionLensExceptionpublic 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.HiveExceptionLensExceptionpublic 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.HiveExceptionLensExceptionpublic 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.HiveExceptionLensExceptionpublic boolean tableExists(String tblName) throws org.apache.hadoop.hive.ql.metadata.HiveException
org.apache.hadoop.hive.ql.metadata.HiveExceptionpublic boolean factPartitionExists(CubeFactTable fact, FactPartition part, String storageTableName) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveExceptionLensExceptionpublic 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.HiveExceptionLensExceptionpublic 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.HiveExceptionLensExceptionpublic boolean partitionExistsByFilter(String cubeTableName, String storageName, String filter) throws LensException
LensExceptionpublic boolean partitionExistsByFilter(String storageTableName, String filter) throws LensException
LensExceptionpublic 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.HiveExceptionLensExceptionpublic 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.HiveExceptionpublic 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.HiveExceptionpublic 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 nameLensExceptionpublic List<String> getTimePartColNamesOfTable(String storageTableName) throws LensException
LensExceptionpublic 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
LensExceptionpublic org.apache.hadoop.hive.ql.metadata.Table getTableWithType(String tableName, CubeTableType type, boolean throwException) throws LensException
LensExceptionpublic org.apache.hadoop.hive.ql.metadata.Table getTable(String tableName) throws LensException
LensExceptionpublic org.apache.hadoop.hive.ql.metadata.Table getTable(String tableName, boolean throwException) throws LensException
LensExceptionpublic void dropHiveTable(String table) throws LensException
LensExceptionpublic boolean isFactTable(String tableName) throws LensException
tableName - table nameorg.apache.hadoop.hive.ql.metadata.HiveExceptionLensExceptionpublic boolean isDimensionTable(String tableName) throws LensException
tableName - table nameLensExceptionpublic boolean isCube(String tableName) throws LensException
tableName - table nameLensExceptionpublic boolean isDimension(String tableName) throws LensException
tableName - table nameLensExceptionpublic CubeFactTable getFactTable(String tableName) throws LensException
CubeFactTable object corresponding to the nametableName - The cube fact nameLensExceptionpublic Segmentation getSegmentationTable(String tableName) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveExceptionLensExceptionpublic 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
LensExceptionpublic 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 CubeFactTable getCubeFact(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
LensExceptionpublic Segmentation getSegmentation(String segName, boolean throwException) throws LensException
LensExceptionpublic Collection<CubeDimensionTable> getAllDimensionTables() throws LensException
LensExceptionpublic Collection<Storage> getAllStorages() throws LensException
LensExceptionpublic Collection<CubeInterface> getAllCubes() throws LensException
LensExceptionpublic Collection<Dimension> getAllDimensions() throws LensException
LensExceptionpublic Collection<CubeFactTable> getAllFacts() throws LensException
LensExceptionpublic Collection<Segmentation> getAllSegmentations() throws LensException
LensExceptionpublic List<CubeFactTable> getAllFacts(CubeInterface cube) throws LensException
cube - Cube objectLensExceptionpublic List<Segmentation> getAllSegmentations(CubeInterface cube) throws LensException
LensExceptionpublic List<DerivedCube> getAllDerivedQueryableCubes(CubeInterface cube) throws LensException
cube - Cube objectLensExceptionpublic List<CubeDimensionTable> getAllDimensionTables(Dimension dim) throws LensException
dim - Dimension objectLensExceptionpublic boolean partColExists(String tableName, String partCol) throws LensException
LensExceptionpublic 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.HiveExceptionLensExceptionpublic 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.HiveExceptionLensExceptionpublic 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 DerivedCubeorg.apache.hadoop.hive.ql.metadata.HiveExceptionLensExceptionpublic void alterDimension(String dimName, Dimension newDim) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
dimName - The cube name to be alterednewDim - The new dimension definitionorg.apache.hadoop.hive.ql.metadata.HiveExceptionLensExceptionpublic void alterStorage(String storageName, Storage storage) throws LensException, org.apache.hadoop.hive.ql.metadata.HiveException
storageName - The storage name to be alteredstorage - The new storage definitionLensExceptionorg.apache.hadoop.hive.ql.metadata.HiveExceptionpublic void dropStorage(String storageName) throws LensException
storageName - storage nameLensExceptionpublic void dropCube(String cubeName) throws LensException
cubeName - cube nameLensExceptionpublic void dropDimension(String dimName) throws LensException
dimName - dimension name to be droppedLensExceptionpublic void dropFact(String factName, boolean cascade) throws LensException
factName - fact namecascade - If true, will drop all the storages of the factLensExceptionpublic void dropSegmentation(String segName) throws LensException
LensExceptionpublic void dropStorageFromFact(String factName, String storage) throws LensException
factName - fact namestorage - storage nameLensExceptionpublic 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.HiveExceptionLensExceptionpublic 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.HiveExceptionLensExceptionpublic void alterCubeFactTable(String factTableName, CubeFactTable cubeFactTable, Map<String,StorageTableDesc> storageTableDescs) 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.HiveExceptionLensExceptionpublic void alterSegmentation(String segName, Segmentation seg) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveExceptionLensExceptionpublic 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.HiveExceptionLensExceptionpublic boolean isStorageTableCandidateForRange(String storageTableName, Date fromDate, Date toDate) throws LensException
LensExceptionpublic boolean isStorageTablePartitionACandidate(String storageTableName, Date partDate) throws LensException
LensExceptionpublic boolean isStorageTableCandidateForRange(String storageTableName, String fromDate, String toDate) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveExceptionLensExceptionCopyright © 2014–2016 Apache Software Foundation. All rights reserved.