|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.metastore.FileStore
public class FileStore
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
LOG
|
Constructor Summary | |
---|---|
FileStore(org.apache.hadoop.conf.Configuration conf)
|
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 |
dbExists(String dbName)
dbExists |
void |
drop(DB db,
String tableName)
|
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()
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)
|
ArrayList<String> |
getTablesByPattern(DB parent,
String tablePattern)
getTablesByPattern Looks at metastore directories |
Type |
getType(String typeName)
|
List<String> |
listPartitionNames(String db_name,
String tbl_name,
short max_parts)
|
protected Properties |
load(DB parent,
String tableName)
|
boolean |
openTransaction()
Opens a new one or the one already created Every call of this function must have corresponding commit or rollback function call |
protected void |
rename(DB parent,
String tableName,
DB newParent,
String newTableName)
|
void |
rollbackTransaction()
Rolls back the current transaction if it is active |
void |
setConf(org.apache.hadoop.conf.Configuration conf)
|
void |
shutdown()
|
protected void |
store(DB parent,
String tableName,
Properties schema,
boolean overwrite)
|
boolean |
tableExists(String dbName,
String tableName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log LOG
Constructor Detail |
---|
public FileStore(org.apache.hadoop.conf.Configuration conf)
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 boolean createDatabase(Database db) throws MetaException
createDatabase
in interface RawStore
MetaException
public boolean createDatabase(String name) throws MetaException
createDatabase
in interface RawStore
MetaException
protected Properties load(DB parent, String tableName) throws MetaException, UnknownTableException
MetaException
UnknownTableException
protected void store(DB parent, String tableName, Properties schema, boolean overwrite) throws MetaException
MetaException
protected void rename(DB parent, String tableName, DB newParent, String newTableName) throws MetaException
MetaException
public void drop(DB db, String tableName) throws IOException
IOException
public ArrayList<String> getTablesByPattern(DB parent, String tablePattern) throws MetaException
parent
- tablePattern
-
MetaException
public List<String> getTables(String dbName, String pattern) throws MetaException
getTables
in interface RawStore
MetaException
public boolean dbExists(String dbName) throws MetaException
MetaException
- (for future use possibly)
NOTE - there is no strict version of this now. Strict meaning no extraneous .table.field1.field11...public boolean dropDatabase(String dbname)
dropDatabase
in interface RawStore
public Database getDatabase(String name) throws NoSuchObjectException
getDatabase
in interface RawStore
NoSuchObjectException
public List<String> getDatabases() throws MetaException
getDatabases
in interface RawStore
MetaException
- Assuming 1 level here - bugbugpublic boolean tableExists(String dbName, String tableName)
public void alterTable(String dbname, String name, Table newTable) throws InvalidObjectException, MetaException
alterTable
in interface RawStore
InvalidObjectException
MetaException
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 boolean createType(Type type)
createType
in interface RawStore
public boolean dropType(String typeName)
dropType
in interface RawStore
public boolean addPartition(Partition part) throws InvalidObjectException, MetaException
addPartition
in interface RawStore
InvalidObjectException
MetaException
public boolean dropPartition(String dbName, String tableName, List<String> part_vals) throws MetaException
dropPartition
in interface RawStore
MetaException
public Partition getPartition(String dbName, String tableName, List<String> part_vals) throws MetaException
getPartition
in interface RawStore
MetaException
public List<Partition> getPartitions(String dbName, String tableName, int max) throws MetaException
getPartitions
in interface RawStore
MetaException
public Type getType(String typeName)
getType
in interface RawStore
public boolean openTransaction()
RawStore
openTransaction
in interface RawStore
public void rollbackTransaction()
RawStore
rollbackTransaction
in interface RawStore
public boolean commitTransaction()
RawStore
commitTransaction
in interface RawStore
public void shutdown()
shutdown
in interface RawStore
public List<String> listPartitionNames(String db_name, String tbl_name, short max_parts) throws MetaException
listPartitionNames
in interface RawStore
MetaException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |