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.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) 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, 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 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(Storage storage) 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(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 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(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 to its storage table descriptionLensException
public void createSegmentation(Segmentation cubeSeg) throws LensException
LensException
public 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 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 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(CubeFactTable 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, 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 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 CubeFactTable getFactTable(String tableName) throws LensException
CubeFactTable
object corresponding to the nametableName
- The cube fact nameLensException
public Segmentation getSegmentationTable(String tableName) throws org.apache.hadoop.hive.ql.metadata.HiveException, LensException
org.apache.hadoop.hive.ql.metadata.HiveException
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 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
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<CubeFactTable> getAllFacts() throws LensException
LensException
public Collection<Segmentation> getAllSegmentations() throws LensException
LensException
public List<CubeFactTable> getAllFacts(CubeInterface cube) throws LensException
cube
- Cube objectLensException
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(String tableName, String partCol) throws LensException
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(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(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.HiveException
LensException
public 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 definitionLensException
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 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(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.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 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
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.