org.apache.hadoop.hive.metastore
Class DB

java.lang.Object
  extended by org.apache.hadoop.hive.metastore.DB

public class DB
extends Object


Field Summary
protected static org.apache.commons.logging.Log LOG
           
protected  org.apache.hadoop.fs.Path whRoot_
           
 
Constructor Summary
DB(String dbName, org.apache.hadoop.conf.Configuration conf)
           
 
Method Summary
static DB createDB(String name, org.apache.hadoop.conf.Configuration conf)
           
 org.apache.hadoop.fs.Path getDefaultTablePath(String tableName)
           
static org.apache.hadoop.fs.Path getDefaultTablePath(String tableName, org.apache.hadoop.conf.Configuration conf)
           
 org.apache.hadoop.fs.Path getDefaultTablePath(String tableName, String partition)
           
 String getName()
           
 org.apache.hadoop.fs.Path getPath()
           
 Table getTable(String tableName, boolean o_rdonly)
           
 ArrayList<String> getTables(String tablePattern)
          getTables Looks at metastore directories
 boolean tableExists(String tableName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

whRoot_

protected org.apache.hadoop.fs.Path whRoot_

LOG

protected static final org.apache.commons.logging.Log LOG
Constructor Detail

DB

public DB(String dbName,
          org.apache.hadoop.conf.Configuration conf)
   throws UnknownDBException,
          MetaException
Throws:
UnknownDBException
MetaException
Method Detail

getPath

public org.apache.hadoop.fs.Path getPath()

getDefaultTablePath

public org.apache.hadoop.fs.Path getDefaultTablePath(String tableName)

getDefaultTablePath

public static org.apache.hadoop.fs.Path getDefaultTablePath(String tableName,
                                                            org.apache.hadoop.conf.Configuration conf)

getName

public String getName()

getDefaultTablePath

public org.apache.hadoop.fs.Path getDefaultTablePath(String tableName,
                                                     String partition)

getTables

public ArrayList<String> getTables(String tablePattern)
                            throws MetaException
getTables Looks at metastore directories

Parameters:
tablePattern -
Returns:
the list of tables
Throws:
MetaException

getTable

public Table getTable(String tableName,
                      boolean o_rdonly)
               throws MetaException,
                      UnknownTableException
Throws:
MetaException
UnknownTableException

tableExists

public boolean tableExists(String tableName)
                    throws MetaException
Throws:
MetaException

createDB

public static DB createDB(String name,
                          org.apache.hadoop.conf.Configuration conf)
                   throws MetaException
Throws:
MetaException


Copyright © 2009 The Apache Software Foundation