public interface CubeMetastoreService extends LensService
Modifier and Type | Method and Description |
---|---|
void |
addDimTableStorage(LensSessionHandle sessionid,
String dimTblName,
XStorageTableElement storageTable)
Add a storage to dimension table
|
int |
addPartitionsToDimStorage(LensSessionHandle sessionid,
String dimTblName,
String storageName,
XPartitionList partitions)
Add partitions to dimension table on a storage.
|
int |
addPartitionsToFactStorage(LensSessionHandle sessionid,
String fact,
String storageName,
XPartitionList partitions)
Add partitions to fact on a storage
|
int |
addPartitionToDimStorage(LensSessionHandle sessionid,
String dimTblName,
String storageName,
XPartition partition)
Add partition to dimension table on a storage.
|
int |
addPartitionToFactStorage(LensSessionHandle sessionid,
String fact,
String storageName,
XPartition partition)
Add partition to fact on a storage
|
void |
addStorageToFact(LensSessionHandle sessionid,
String fact,
XStorageTableElement storageTable)
Add storage to fact table
|
void |
alterStorage(LensSessionHandle sessionid,
String storageName,
XStorage storage)
Alter storage specified by name, with new definition
|
void |
createCube(LensSessionHandle sessionid,
XCube cube)
Create a cube based on JAXB Cube object
|
void |
createDatabase(LensSessionHandle sessionid,
String database,
boolean ignore)
Create a database in the metastore
|
void |
createDimension(LensSessionHandle sessionid,
XDimension dimension)
Create a dimension based on JAXB Dimension object
|
void |
createDimensionTable(LensSessionHandle sessionid,
XDimensionTable xDimTable)
Create dimension table
|
void |
createFactTable(LensSessionHandle sessionid,
XFactTable fact)
Create fact table
|
void |
createStorage(LensSessionHandle sessionid,
XStorage storage)
Create a storage
|
void |
dropAllStoragesOfDimTable(LensSessionHandle sessionid,
String dimTblName)
Drop all storages of dimension table.
|
void |
dropAllStoragesOfFact(LensSessionHandle sessionid,
String factName)
Drop all storages of fact
|
void |
dropCube(LensSessionHandle sessionid,
String cubeName)
Drop a cube from the metastore in the currently deleted database.
|
void |
dropDatabase(LensSessionHandle sessionid,
String database,
boolean cascade)
Drop a database from cube metastore
|
void |
dropDimension(LensSessionHandle sessionid,
String dimName)
Drop a dimension from the metastore in the currently deleted database.
|
void |
dropDimensionTable(LensSessionHandle sessionid,
String dimTblName,
boolean cascade)
Drop a dimension table from the cube metastore
|
void |
dropFactTable(LensSessionHandle sessionid,
String fact,
boolean cascade)
Drop fact table.
|
void |
dropPartitionFromStorageByFilter(LensSessionHandle sessionid,
String cubeTableName,
String storageName,
String filter)
Drop partition from storage with spec specified by filter
|
void |
dropPartitionFromStorageByValues(LensSessionHandle sessionid,
String cubeTableName,
String storageName,
String values)
Drop partition from storage with spec specified as comma separated string
|
void |
dropStorage(LensSessionHandle sessionid,
String storageName)
Drop a storage specified by name
|
void |
dropStorageOfDimTable(LensSessionHandle sessionid,
String dimTblName,
String storage)
Drop storage of dimension table specified by name.
|
void |
dropStorageOfFact(LensSessionHandle sessionid,
String fact,
String storage)
Drop storage of fact specified by fact name, storage name
|
List<String> |
getAllBaseCubeNames(LensSessionHandle sessionid)
Get names of all base cube names in the current database
|
List<String> |
getAllCubeNames(LensSessionHandle sessionid)
Get names of all cubes in the current database, includes both base cubes and derived cubes
|
List<String> |
getAllDatabases(LensSessionHandle sessionid)
Get names of all databases in this metastore
|
List<String> |
getAllDerivedCubeNames(LensSessionHandle sessionid)
Get names of all derived cubes in the current database
|
List<String> |
getAllDimensionNames(LensSessionHandle sessionid)
Get all dimension names in the current session
|
List<String> |
getAllDimTableNames(LensSessionHandle sessionid,
String dimensionName)
Get all dimension tables.
|
List<String> |
getAllFactNames(LensSessionHandle sessionid,
String cubeName)
Get all fact names
|
XJoinChains |
getAllJoinChains(LensSessionHandle sessionid,
String table) |
List<String> |
getAllNativeTableNames(LensSessionHandle sessionid,
String dboption,
String dbName)
Get names of all native tables
|
XPartitionList |
getAllPartitionsOfDimTableStorage(LensSessionHandle sessionid,
String dimension,
String storageName,
String filter)
Get all partitions of a dimension table in a storage
|
XPartitionList |
getAllPartitionsOfFactStorage(LensSessionHandle sessionid,
String fact,
String storageName,
String filter)
Get all partitions of fact on a storage
|
List<String> |
getAllQueryableCubeNames(LensSessionHandle sessionid)
Get names of all cubes, which can be queried in the current database
|
List<String> |
getAllStorageNames(LensSessionHandle sessionid)
Get all storage names in current database
|
XCube |
getCube(LensSessionHandle sessionid,
String cubeName)
Get a cube from the metastore
|
String |
getCurrentDatabase(LensSessionHandle sessionid)
Get current database used by the CubeMetastoreClient
|
XDimension |
getDimension(LensSessionHandle sessionid,
String dimName)
Get a dimension from the metastore
|
XDimensionTable |
getDimensionTable(LensSessionHandle sessionid,
String dimTblName)
Get the dimension table from metastore
|
List<String> |
getDimTableStorages(LensSessionHandle sessionid,
String dimTblName)
Get all storages of dimension table
|
XFactTable |
getFactTable(LensSessionHandle sessionid,
String fact)
Get fact table given by name
|
XFlattenedColumns |
getFlattenedColumns(LensSessionHandle sessionHandle,
String tableName,
boolean addChains)
Get flattened columns - all columns of table + all reachable columns
|
Date |
getLatestDateOfCube(LensSessionHandle sessionid,
String cubeName,
String timeDimension)
Get the latest available date upto which data is available for the base cubes, for the time dimension
|
XNativeTable |
getNativeTable(LensSessionHandle sessionid,
String name)
Get native table for the given name
|
List<String> |
getPartitionTimelines(LensSessionHandle sessionid,
String factName,
String storage,
String updatePeriod,
String timeDimension) |
XStorage |
getStorage(LensSessionHandle sessionid,
String storageName)
Get Storage specified by name
|
XStorageTableElement |
getStorageOfDim(LensSessionHandle sessionid,
String dimTblName,
String storageName)
Get storage table element associated with dimension table for storage name specified
|
XStorageTableElement |
getStorageOfFact(LensSessionHandle sessionid,
String fact,
String storageName)
Get storage table of fact specifed by fact name, storage name
|
List<String> |
getStoragesOfFact(LensSessionHandle sessionid,
String fact)
Get all storages of fact
|
void |
setCurrentDatabase(LensSessionHandle sessionid,
String database)
Change the current database used by the CubeMetastoreClient
|
void |
updateCube(LensSessionHandle sessionid,
XCube cube)
Update an existing cube
|
void |
updateDimension(LensSessionHandle sessionid,
String dimName,
XDimension dimension)
Update an existing dimension
|
void |
updateDimensionTable(LensSessionHandle sessionid,
XDimensionTable dimensionTable)
Update/Alter the dimension table
|
void |
updateFactTable(LensSessionHandle sessionid,
XFactTable fact)
Update/Alter fact table
|
void |
updatePartition(LensSessionHandle sessionid,
String tblName,
String storageName,
XPartition partition) |
void |
updatePartitions(LensSessionHandle sessionid,
String tblName,
String storageName,
XPartitionList partitions) |
getHealthStatus
static final String NAME
String getCurrentDatabase(LensSessionHandle sessionid) throws LensException
LensException
void setCurrentDatabase(LensSessionHandle sessionid, String database) throws LensException
database
- LensException
void dropDatabase(LensSessionHandle sessionid, String database, boolean cascade) throws LensException
database
- database namecascade
- flag indicating if the tables in the database should be dropped as wellLensException
void createDatabase(LensSessionHandle sessionid, String database, boolean ignore) throws LensException
database
- database nameignore
- ignore if database already existsLensException
List<String> getAllDatabases(LensSessionHandle sessionid) throws LensException
LensException
void createStorage(LensSessionHandle sessionid, XStorage storage) throws LensException
sessionid
- storage
- LensException
void dropStorage(LensSessionHandle sessionid, String storageName) throws LensException
sessionid
- storageName
- LensException
void alterStorage(LensSessionHandle sessionid, String storageName, XStorage storage) throws LensException
sessionid
- storageName
- storage
- LensException
XStorage getStorage(LensSessionHandle sessionid, String storageName) throws LensException
sessionid
- storageName
- LensException
List<String> getAllStorageNames(LensSessionHandle sessionid) throws LensException
sessionid
- LensException
List<String> getAllCubeNames(LensSessionHandle sessionid) throws LensException
LensException
List<String> getAllBaseCubeNames(LensSessionHandle sessionid) throws LensException
LensException
List<String> getAllDerivedCubeNames(LensSessionHandle sessionid) throws LensException
LensException
List<String> getAllQueryableCubeNames(LensSessionHandle sessionid) throws LensException
sessionid
- session idLensException
XNativeTable getNativeTable(LensSessionHandle sessionid, String name) throws LensException
sessionid
- session idname
- The table nameXNativeTable
objectLensException
List<String> getAllNativeTableNames(LensSessionHandle sessionid, String dboption, String dbName) throws LensException
sessionid
- session iddboption
- To get from current or all, the option is ignored if dbname is passeddbName
- The db nameLensException
void createCube(LensSessionHandle sessionid, XCube cube) throws LensException
LensException
XCube getCube(LensSessionHandle sessionid, String cubeName) throws LensException
cubeName
- LensException
void dropCube(LensSessionHandle sessionid, String cubeName) throws LensException
cubeName
- LensException
void updateCube(LensSessionHandle sessionid, XCube cube) throws LensException
cube
- JAXB Cube objectLensException
void createDimension(LensSessionHandle sessionid, XDimension dimension) throws LensException
LensException
XDimension getDimension(LensSessionHandle sessionid, String dimName) throws LensException
dimName
- LensException
void dropDimension(LensSessionHandle sessionid, String dimName) throws LensException
sessionid,
- dimNameLensException
void updateDimension(LensSessionHandle sessionid, String dimName, XDimension dimension) throws LensException
sessionid
- dimName JAXB Dimension objectLensException
List<String> getAllDimensionNames(LensSessionHandle sessionid) throws LensException
sessionid
- LensException
void createDimensionTable(LensSessionHandle sessionid, XDimensionTable xDimTable) throws LensException
sessionid
- The sessionidxDimTable
- The dim table definitionLensException
void dropDimensionTable(LensSessionHandle sessionid, String dimTblName, boolean cascade) throws LensException
sessionid
- dimTblName
- cascade
- LensException
XDimensionTable getDimensionTable(LensSessionHandle sessionid, String dimTblName) throws LensException
dimTblName
- XDimensionTable
LensException
void updateDimensionTable(LensSessionHandle sessionid, XDimensionTable dimensionTable) throws LensException
sessionid
- The sessioniddimensionTable
- The new definition of dimension tableLensException
List<String> getDimTableStorages(LensSessionHandle sessionid, String dimTblName) throws LensException
sessionid
- The sessioniddimTblName
- The dimension table nameLensException
void addDimTableStorage(LensSessionHandle sessionid, String dimTblName, XStorageTableElement storageTable) throws LensException
sessionid
- The sessioniddimTblName
- The dimension table namestorageTable
- XStorageTableElement with storage name, table desc and dump period, if any.LensException
void dropAllStoragesOfDimTable(LensSessionHandle sessionid, String dimTblName) throws LensException
sessionid
- The sessioniddimTblName
- The dimension table nameLensException
XStorageTableElement getStorageOfDim(LensSessionHandle sessionid, String dimTblName, String storageName) throws LensException
sessionid
- The sessioniddimTblName
- The dimension table namestorageName
- The storage nameXStorageTableElement
LensException
void dropStorageOfDimTable(LensSessionHandle sessionid, String dimTblName, String storage) throws LensException
sessionid
- The sessioniddimTblName
- The dimension table namestorage
- The storage nameLensException
List<String> getAllDimTableNames(LensSessionHandle sessionid, String dimensionName) throws LensException
sessionid
- dimensionName
- dimension name to be filtered with. OptionalLensException
XPartitionList getAllPartitionsOfDimTableStorage(LensSessionHandle sessionid, String dimension, String storageName, String filter) throws LensException
sessionid
- The sessioniddimension
- The dimension table namestorageName
- The storage namefilter
- The filter for the list of partitionsXPartition
LensException
int addPartitionToDimStorage(LensSessionHandle sessionid, String dimTblName, String storageName, XPartition partition) throws LensException
sessionid
- The sessioniddimTblName
- The dimension table namestorageName
- The storage namepartition
- XPartition
LensException
int addPartitionsToDimStorage(LensSessionHandle sessionid, String dimTblName, String storageName, XPartitionList partitions) throws LensException
sessionid
- The sessioniddimTblName
- The dimension table namestorageName
- The storage namepartitions
- XPartitionList
LensException
XFactTable getFactTable(LensSessionHandle sessionid, String fact) throws LensException
sessionid
- The sessionidfact
- The fact table nameXFactTable
LensException
void createFactTable(LensSessionHandle sessionid, XFactTable fact) throws LensException
sessionid
- The sessionidfact
- The fact table definitionLensException
void updateFactTable(LensSessionHandle sessionid, XFactTable fact) throws LensException
sessionid
- The sessionidfact
- The fact table's new definitionLensException
void dropFactTable(LensSessionHandle sessionid, String fact, boolean cascade) throws LensException
sessionid
- The sessionidfact
- The fact table namecascade
- If true, underlying storage tables will also be dropped.LensException
List<String> getAllFactNames(LensSessionHandle sessionid, String cubeName) throws LensException
sessionid
- The sessionidcubeName
- optional filter filter facts by cube name.LensException
List<String> getStoragesOfFact(LensSessionHandle sessionid, String fact) throws LensException
sessionid
- The sessionidfact
- The fact table nameLensException
void dropAllStoragesOfFact(LensSessionHandle sessionid, String factName) throws LensException
sessionid
- The sessionidfactName
- The fact table nameLensException
XStorageTableElement getStorageOfFact(LensSessionHandle sessionid, String fact, String storageName) throws LensException
sessionid
- The sessionidfact
- The fact table namestorageName
- The storage nameLensException
void addStorageToFact(LensSessionHandle sessionid, String fact, XStorageTableElement storageTable) throws LensException
sessionid
- The sessionidfact
- The fact table namestorageTable
- XStorageTableElement containing storage name, update periods and table descriptionLensException
void dropStorageOfFact(LensSessionHandle sessionid, String fact, String storage) throws LensException
sessionid
- The sessionidfact
- The fact table namestorage
- The storage nameLensException
XPartitionList getAllPartitionsOfFactStorage(LensSessionHandle sessionid, String fact, String storageName, String filter) throws LensException
sessionid
- The sessionidfact
- The fact table namestorageName
- The storage namefilter
- The filter for partition listingXPartition
LensException
int addPartitionToFactStorage(LensSessionHandle sessionid, String fact, String storageName, XPartition partition) throws LensException
sessionid
- The sessionidfact
- The fact table namestorageName
- The storage namepartition
- XPartition
LensException
int addPartitionsToFactStorage(LensSessionHandle sessionid, String fact, String storageName, XPartitionList partitions) throws LensException
sessionid
- The sessionidfact
- The fact table namestorageName
- The storage namepartitions
- XPartitionList
LensException
void dropPartitionFromStorageByValues(LensSessionHandle sessionid, String cubeTableName, String storageName, String values) throws LensException
sessionid
- The sessionidcubeTableName
- The cube table name - fact/dimension table namestorageName
- The storage namevalues
- The comma separated values for all partition columnsLensException
void dropPartitionFromStorageByFilter(LensSessionHandle sessionid, String cubeTableName, String storageName, String filter) throws LensException
sessionid
- The sessionidcubeTableName
- The cube table name - fact/dimension table namestorageName
- The storage namefilter
- The partition filter - all partitions which obey the filter will be droppedLensException
XFlattenedColumns getFlattenedColumns(LensSessionHandle sessionHandle, String tableName, boolean addChains) throws LensException
sessionHandle
- The session handletableName
- The table name - cube name or dimension nameaddChains
- XFlattenedColumns
LensException
Date getLatestDateOfCube(LensSessionHandle sessionid, String cubeName, String timeDimension) throws LensException, org.apache.hadoop.hive.ql.metadata.HiveException
sessionid
- The session idtimeDimension
- time dimension namecubeName
- The base cube nameLensException
org.apache.hadoop.hive.ql.metadata.HiveException
List<String> getPartitionTimelines(LensSessionHandle sessionid, String factName, String storage, String updatePeriod, String timeDimension) throws LensException, org.apache.hadoop.hive.ql.metadata.HiveException
LensException
org.apache.hadoop.hive.ql.metadata.HiveException
XJoinChains getAllJoinChains(LensSessionHandle sessionid, String table) throws LensException
LensException
void updatePartition(LensSessionHandle sessionid, String tblName, String storageName, XPartition partition) throws LensException
LensException
void updatePartitions(LensSessionHandle sessionid, String tblName, String storageName, XPartitionList partitions) throws LensException
LensException
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.