|
||||||||||
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 |
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. |
boolean |
createDatabase(Database db)
|
boolean |
createDatabase(String name)
|
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)
|
org.apache.hadoop.conf.Configuration |
getConf()
|
Database |
getDatabase(String name)
|
List<String> |
getDatabases()
|
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)
|
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 boolean createDatabase(Database db)
createDatabase
in interface RawStore
public boolean createDatabase(String name)
createDatabase
in interface RawStore
public Database getDatabase(String name) throws NoSuchObjectException
getDatabase
in interface RawStore
NoSuchObjectException
public boolean dropDatabase(String dbname)
dropDatabase
in interface RawStore
public List<String> getDatabases()
getDatabases
in interface RawStore
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)
dropTable
in interface RawStore
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 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 MetaException
getPartition
in interface RawStore
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |