|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.metastore.ObjectStore
public class ObjectStore
This class is the interface between the application logic and the database store that contains the objects. Refrain putting any logic in mode.M* objects or in this file as former could be auto generated and this class would need to be made into a interface that can read both from a database and a filestore.
Constructor Summary | |
---|---|
ObjectStore()
|
Method Summary | |
---|---|
boolean |
addPartition(Partition part)
|
void |
alterPartition(String dbname,
String name,
Partition newPart)
|
void |
alterTable(String dbname,
String name,
Table newTable)
|
boolean |
commitTransaction()
if this is the commit of the first open call then an actual commit is called. |
void |
createDatabase(Database db)
|
void |
createTable(Table tbl)
|
boolean |
createType(Type type)
|
boolean |
dropDatabase(String dbname)
|
boolean |
dropPartition(String dbName,
String tableName,
List<String> part_vals)
|
boolean |
dropTable(String dbName,
String tableName)
|
boolean |
dropType(String typeName)
|
List<String> |
getAllDatabases()
|
List<String> |
getAllTables(String dbName)
|
org.apache.hadoop.conf.Configuration |
getConf()
|
Database |
getDatabase(String name)
|
List<String> |
getDatabases(String pattern)
|
Partition |
getPartition(String dbName,
String tableName,
List<String> part_vals)
|
List<Partition> |
getPartitions(String dbName,
String tableName,
int max)
|
Table |
getTable(String dbName,
String tableName)
|
List<String> |
getTables(String dbName,
String pattern)
|
Type |
getType(String typeName)
|
boolean |
isActiveTransaction()
|
List<String> |
listPartitionNames(String dbName,
String tableName,
short max)
|
boolean |
openTransaction()
Opens a new one or the one already created Every call of this function must have corresponding commit or rollback function call |
void |
rollbackTransaction()
Rolls back the current transaction if it is active |
void |
setConf(org.apache.hadoop.conf.Configuration conf)
Called whenever this object is instantiated using ReflectionUils, and also on connection retries. |
void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectStore()
Method Detail |
---|
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public void shutdown()
shutdown
in interface RawStore
public boolean openTransaction()
openTransaction
in interface RawStore
public boolean commitTransaction()
commitTransaction
in interface RawStore
public boolean isActiveTransaction()
public void rollbackTransaction()
rollbackTransaction
in interface RawStore
public void createDatabase(Database db) throws InvalidObjectException, MetaException
createDatabase
in interface RawStore
InvalidObjectException
MetaException
public Database getDatabase(String name) throws NoSuchObjectException
getDatabase
in interface RawStore
NoSuchObjectException
public boolean dropDatabase(String dbname) throws NoSuchObjectException, MetaException
dropDatabase
in interface RawStore
NoSuchObjectException
MetaException
public List<String> getDatabases(String pattern) throws MetaException
getDatabases
in interface RawStore
MetaException
public List<String> getAllDatabases() throws MetaException
getAllDatabases
in interface RawStore
MetaException
public boolean createType(Type type)
createType
in interface RawStore
public Type getType(String typeName)
getType
in interface RawStore
public boolean dropType(String typeName)
dropType
in interface RawStore
public void createTable(Table tbl) throws InvalidObjectException, MetaException
createTable
in interface RawStore
InvalidObjectException
MetaException
public boolean dropTable(String dbName, String tableName) throws MetaException
dropTable
in interface RawStore
MetaException
public Table getTable(String dbName, String tableName) throws MetaException
getTable
in interface RawStore
MetaException
public List<String> getTables(String dbName, String pattern) throws MetaException
getTables
in interface RawStore
MetaException
public List<String> getAllTables(String dbName) throws MetaException
getAllTables
in interface RawStore
MetaException
public boolean addPartition(Partition part) throws InvalidObjectException, MetaException
addPartition
in interface RawStore
InvalidObjectException
MetaException
public Partition getPartition(String dbName, String tableName, List<String> part_vals) throws NoSuchObjectException, MetaException
getPartition
in interface RawStore
NoSuchObjectException
MetaException
public boolean dropPartition(String dbName, String tableName, List<String> part_vals) throws MetaException
dropPartition
in interface RawStore
MetaException
public List<Partition> getPartitions(String dbName, String tableName, int max) throws MetaException
getPartitions
in interface RawStore
MetaException
public List<String> listPartitionNames(String dbName, String tableName, short max) throws MetaException
listPartitionNames
in interface RawStore
MetaException
public void alterTable(String dbname, String name, Table newTable) throws InvalidObjectException, MetaException
alterTable
in interface RawStore
InvalidObjectException
MetaException
public void alterPartition(String dbname, String name, Partition newPart) throws InvalidObjectException, MetaException
alterPartition
in interface RawStore
InvalidObjectException
MetaException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |