|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.metastore.Warehouse
public class Warehouse
This class represents a warehouse where data of Hive tables is stored
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
LOG
|
Constructor Summary | |
---|---|
Warehouse(org.apache.hadoop.conf.Configuration conf)
|
Method Summary | |
---|---|
static void |
closeFs(org.apache.hadoop.fs.FileSystem fs)
|
boolean |
deleteDir(org.apache.hadoop.fs.Path f,
boolean recursive)
|
org.apache.hadoop.fs.Path |
getDatabasePath(Database db)
|
org.apache.hadoop.fs.Path |
getDefaultDatabasePath(String dbName)
|
org.apache.hadoop.fs.Path |
getDnsPath(org.apache.hadoop.fs.Path path)
Hadoop File System reverse lookups paths with raw ip addresses The File System URI always contains the canonical DNS name of the Namenode. |
org.apache.hadoop.fs.FileSystem |
getFs(org.apache.hadoop.fs.Path f)
Helper functions to convert IOException to MetaException |
org.apache.hadoop.fs.Path |
getPartitionPath(Database db,
String tableName,
LinkedHashMap<String,String> pm)
|
org.apache.hadoop.fs.Path |
getPartitionPath(org.apache.hadoop.fs.Path tblPath,
LinkedHashMap<String,String> pm)
|
static List<String> |
getPartValuesFromPartName(String partName)
|
org.apache.hadoop.fs.Path |
getTablePath(Database db,
String tableName)
|
org.apache.hadoop.fs.Path |
getTablePath(String whRootString,
String tableName)
|
org.apache.hadoop.fs.Path |
getWhRoot()
Resolve the configured warehouse root dir with respect to the configuration This involves opening the FileSystem corresponding to the warehouse root dir (but that should be ok given that this is only called during DDL statements for non-external tables). |
boolean |
isDir(org.apache.hadoop.fs.Path f)
|
boolean |
isWritable(org.apache.hadoop.fs.Path path)
|
static String |
makeDynamicPartName(Map<String,String> spec)
Given a dynamic partition specification, return the path corresponding to the static part of partition specification. |
static Map<String,String> |
makeEscSpecFromName(String name)
|
static String |
makePartName(List<FieldSchema> partCols,
List<String> vals)
|
static String |
makePartName(List<FieldSchema> partCols,
List<String> vals,
String defaultStr)
Makes a valid partition name. |
static String |
makePartName(Map<String,String> spec,
boolean addTrailingSeperator)
Makes a partition name from a specification |
static String |
makePartPath(Map<String,String> spec)
Given a partition specification, return the path corresponding to the partition spec. |
static void |
makeSpecFromName(Map<String,String> partSpec,
org.apache.hadoop.fs.Path currPath)
|
static LinkedHashMap<String,String> |
makeSpecFromName(String name)
|
boolean |
mkdirs(org.apache.hadoop.fs.Path f)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
Constructor Detail |
---|
public Warehouse(org.apache.hadoop.conf.Configuration conf) throws MetaException
MetaException
Method Detail |
---|
public org.apache.hadoop.fs.FileSystem getFs(org.apache.hadoop.fs.Path f) throws MetaException
MetaException
public static void closeFs(org.apache.hadoop.fs.FileSystem fs) throws MetaException
MetaException
public org.apache.hadoop.fs.Path getDnsPath(org.apache.hadoop.fs.Path path) throws MetaException
path
- Path to be canonicalized
MetaException
public org.apache.hadoop.fs.Path getWhRoot() throws MetaException
MetaException
public org.apache.hadoop.fs.Path getTablePath(String whRootString, String tableName) throws MetaException
MetaException
public org.apache.hadoop.fs.Path getDatabasePath(Database db) throws MetaException
MetaException
public org.apache.hadoop.fs.Path getDefaultDatabasePath(String dbName) throws MetaException
MetaException
public org.apache.hadoop.fs.Path getTablePath(Database db, String tableName) throws MetaException
MetaException
public boolean mkdirs(org.apache.hadoop.fs.Path f) throws MetaException
MetaException
public boolean deleteDir(org.apache.hadoop.fs.Path f, boolean recursive) throws MetaException
MetaException
public boolean isWritable(org.apache.hadoop.fs.Path path) throws IOException
IOException
public static String makePartPath(Map<String,String> spec) throws MetaException
spec
-
MetaException
public static String makePartName(Map<String,String> spec, boolean addTrailingSeperator) throws MetaException
spec
- addTrailingSeperator
- if true, adds a trailing separator e.g. 'ds=1/'
MetaException
public static String makeDynamicPartName(Map<String,String> spec)
spec
-
public static LinkedHashMap<String,String> makeSpecFromName(String name) throws MetaException
MetaException
public static void makeSpecFromName(Map<String,String> partSpec, org.apache.hadoop.fs.Path currPath)
public static Map<String,String> makeEscSpecFromName(String name) throws MetaException
MetaException
public org.apache.hadoop.fs.Path getPartitionPath(Database db, String tableName, LinkedHashMap<String,String> pm) throws MetaException
MetaException
public org.apache.hadoop.fs.Path getPartitionPath(org.apache.hadoop.fs.Path tblPath, LinkedHashMap<String,String> pm) throws MetaException
MetaException
public boolean isDir(org.apache.hadoop.fs.Path f) throws MetaException
MetaException
public static String makePartName(List<FieldSchema> partCols, List<String> vals) throws MetaException
MetaException
public static String makePartName(List<FieldSchema> partCols, List<String> vals, String defaultStr) throws MetaException
partCols
- The partition columnsvals
- The partition valuesdefaultStr
- The default name given to a partition value if the respective value is empty or null.
MetaException
public static List<String> getPartValuesFromPartName(String partName) throws MetaException
MetaException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |