This project has retired. For details please refer to its Attic page.
DBStorage (Lens 2.0.1-beta-incubating API)

org.apache.lens.storage.db
Class DBStorage

java.lang.Object
  extended by org.apache.lens.cube.metadata.AbstractCubeTable
      extended by org.apache.lens.cube.metadata.Storage
          extended by org.apache.lens.storage.db.DBStorage
All Implemented Interfaces:
Named, PartitionMetahook

public class DBStorage
extends Storage

The Class DBStorage.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lens.cube.metadata.Storage
Storage.LatestInfo, Storage.LatestPartColumnInfo
 
Field Summary
static String DB_URL
          The Constant DB_URL.
 
Fields inherited from class org.apache.lens.cube.metadata.AbstractCubeTable
LOG
 
Constructor Summary
DBStorage(String name)
          Instantiates a new DB storage.
DBStorage(org.apache.hadoop.hive.ql.metadata.Table hiveTable)
          Instantiates a new DB storage.
 
Method Summary
 void commitAddPartition(StoragePartitionDesc arg0)
          Called after successfully adding the partition
 void commitDropPartition(String arg0, List<String> arg1)
          Called after successfully droping the partition
 String getDbUrl()
           
 void preAddPartition(StoragePartitionDesc arg0)
          Called before calling add partition
 void preDropPartition(String arg0, List<String> arg1)
          Called before calling drop partition
 void rollbackAddPartition(StoragePartitionDesc arg0)
          Called if add partition fails.
 void rollbackDropPartition(String arg0, List<String> arg1)
          Called if drop partition fails.
 
Methods inherited from class org.apache.lens.cube.metadata.Storage
addPartition, dropPartition, getPrefix, getPrefix, getStorages, getStorageTable, 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
 

Field Detail

DB_URL

public static final String DB_URL
The Constant DB_URL.

See Also:
Constant Field Values
Constructor Detail

DBStorage

public DBStorage(String name)
Instantiates a new DB storage.

Parameters:
name - the name

DBStorage

public DBStorage(org.apache.hadoop.hive.ql.metadata.Table hiveTable)
Instantiates a new DB storage.

Parameters:
hiveTable - the hive table
Method Detail

getDbUrl

public String getDbUrl()

commitAddPartition

public void commitAddPartition(StoragePartitionDesc arg0)
                        throws org.apache.hadoop.hive.ql.metadata.HiveException
Description copied from interface: PartitionMetahook
Called after successfully adding the partition

Throws:
org.apache.hadoop.hive.ql.metadata.HiveException

commitDropPartition

public void commitDropPartition(String arg0,
                                List<String> arg1)
                         throws org.apache.hadoop.hive.ql.metadata.HiveException
Description copied from interface: PartitionMetahook
Called after successfully droping the partition

Throws:
org.apache.hadoop.hive.ql.metadata.HiveException

preAddPartition

public void preAddPartition(StoragePartitionDesc arg0)
                     throws org.apache.hadoop.hive.ql.metadata.HiveException
Description copied from interface: PartitionMetahook
Called before calling add partition

Throws:
org.apache.hadoop.hive.ql.metadata.HiveException

preDropPartition

public void preDropPartition(String arg0,
                             List<String> arg1)
                      throws org.apache.hadoop.hive.ql.metadata.HiveException
Description copied from interface: PartitionMetahook
Called before calling drop partition

Throws:
org.apache.hadoop.hive.ql.metadata.HiveException

rollbackAddPartition

public void rollbackAddPartition(StoragePartitionDesc arg0)
                          throws org.apache.hadoop.hive.ql.metadata.HiveException
Description copied from interface: PartitionMetahook
Called if add partition fails.

Throws:
org.apache.hadoop.hive.ql.metadata.HiveException

rollbackDropPartition

public void rollbackDropPartition(String arg0,
                                  List<String> arg1)
                           throws org.apache.hadoop.hive.ql.metadata.HiveException
Description copied from interface: PartitionMetahook
Called if drop partition fails.

Throws:
org.apache.hadoop.hive.ql.metadata.HiveException


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.