|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lens.cube.metadata.AbstractCubeTable org.apache.lens.cube.metadata.Storage
public abstract class Storage
Storage is Named Interface which would represent the underlying storage of the data.
Nested Class Summary | |
---|---|
static class |
Storage.LatestInfo
|
static class |
Storage.LatestPartColumnInfo
|
Field Summary |
---|
Fields inherited from class org.apache.lens.cube.metadata.AbstractCubeTable |
---|
LOG |
Constructor Summary | |
---|---|
Storage(org.apache.hadoop.hive.ql.metadata.Table hiveTable)
|
Method Summary | |
---|---|
void |
addPartition(org.apache.hadoop.hive.ql.metadata.Hive client,
StoragePartitionDesc addPartitionDesc,
Storage.LatestInfo latestInfo)
Add single partition to storage. |
void |
addPartitions(org.apache.hadoop.hive.ql.metadata.Hive client,
String factOrDimTable,
UpdatePeriod updatePeriod,
List<StoragePartitionDesc> storagePartitionDescs,
Map<Map<String,String>,Storage.LatestInfo> latestInfos)
Add given partitions in the underlying hive table and update latest partition links |
void |
dropPartition(org.apache.hadoop.hive.ql.metadata.Hive client,
String storageTableName,
List<String> partVals,
Map<String,Storage.LatestInfo> updateLatestInfo,
Map<String,String> nonTimePartSpec)
Drop the partition in the underlying hive table and update latest partition link |
String |
getPrefix()
Get the name prefix of the storage |
static String |
getPrefix(String name)
Get the name prefix of the storage |
Set<String> |
getStorages()
|
org.apache.hadoop.hive.ql.metadata.Table |
getStorageTable(org.apache.hadoop.hive.ql.metadata.Hive client,
org.apache.hadoop.hive.ql.metadata.Table parent,
StorageTableDesc crtTbl)
Get the storage table descriptor for the given parent table. |
CubeTableType |
getTableType()
|
Methods inherited from class org.apache.lens.cube.metadata.AbstractCubeTable |
---|
addProperties, alterWeight, equals, getAllFieldNames, getColumns, getName, getProperties, getWeight, hashCode, removeProperty, toString, weight |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.lens.cube.metadata.PartitionMetahook |
---|
commitAddPartitions, commitDropPartition, preAddPartitions, preDropPartition, rollbackAddPartitions, rollbackDropPartition |
Constructor Detail |
---|
public Storage(org.apache.hadoop.hive.ql.metadata.Table hiveTable)
Method Detail |
---|
public String getPrefix()
public CubeTableType getTableType()
getTableType
in class AbstractCubeTable
public Set<String> getStorages()
getStorages
in class AbstractCubeTable
public static String getPrefix(String name)
name
- Name of the storage
public org.apache.hadoop.hive.ql.metadata.Table getStorageTable(org.apache.hadoop.hive.ql.metadata.Hive client, org.apache.hadoop.hive.ql.metadata.Table parent, StorageTableDesc crtTbl) throws org.apache.hadoop.hive.ql.metadata.HiveException
client
- The metastore clientparent
- Is either Fact or Dimension tablecrtTbl
- Create table info
org.apache.hadoop.hive.ql.metadata.HiveException
public void addPartition(org.apache.hadoop.hive.ql.metadata.Hive client, StoragePartitionDesc addPartitionDesc, Storage.LatestInfo latestInfo) throws org.apache.hadoop.hive.ql.metadata.HiveException
client
- addPartitionDesc
- latestInfo
-
org.apache.hadoop.hive.ql.metadata.HiveException
public void addPartitions(org.apache.hadoop.hive.ql.metadata.Hive client, String factOrDimTable, UpdatePeriod updatePeriod, List<StoragePartitionDesc> storagePartitionDescs, Map<Map<String,String>,Storage.LatestInfo> latestInfos) throws org.apache.hadoop.hive.ql.metadata.HiveException
client
- hive client instancefactOrDimTable
- fact or dim nameupdatePeriod
- update period of partitions.storagePartitionDescs
- all partitions to be addedlatestInfos
- new latest info. atleast one partition for the latest value exists for each part
column
org.apache.hadoop.hive.ql.metadata.HiveException
public void dropPartition(org.apache.hadoop.hive.ql.metadata.Hive client, String storageTableName, List<String> partVals, Map<String,Storage.LatestInfo> updateLatestInfo, Map<String,String> nonTimePartSpec) throws org.apache.hadoop.hive.ql.metadata.HiveException
client
- The metastore clientstorageTableName
- TableNamepartVals
- Partition specificationupdateLatestInfo
- The latest partition info if it needs update, null if latest should not be updatednonTimePartSpec
-
org.apache.hadoop.hive.ql.metadata.HiveException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |