|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.common.FileUtils
public final class FileUtils
Collection of file manipulation utilities common across Hive.
Method Summary | |
---|---|
static String |
escapePathName(String path)
|
static String |
escapePathName(String path,
String defaultPath)
Escapes a path name. |
static void |
listStatusRecursively(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.FileStatus fileStatus,
List<org.apache.hadoop.fs.FileStatus> results)
Recursively lists status for all files starting from a particular directory (or individual file as base case). |
static String |
makeDefaultListBucketingDirName(List<String> skewedCols,
org.apache.hadoop.conf.Configuration hconf)
default directory will have the same depth as number of skewed columns this will make future operation easy like DML merge, concatenate merge |
static String |
makePartName(List<String> partCols,
List<String> vals)
|
static String |
makePartName(List<String> partCols,
List<String> vals,
String defaultStr)
Makes a valid partition name. |
static org.apache.hadoop.fs.Path |
makeQualified(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf)
Variant of Path.makeQualified that qualifies the input path against the default file system indicated by the configuration This does not require a FileSystem handle in most cases - only requires the Filesystem URI. |
static String |
unescapePathName(String path)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.apache.hadoop.fs.Path makeQualified(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) throws IOException
path
- path to be fully qualifiedconf
- Configuration file
IOException
public static String makePartName(List<String> partCols, List<String> vals)
public static String makePartName(List<String> partCols, List<String> vals, String defaultStr)
partCols
- The partition keys' namesvals
- The partition valuesdefaultStr
- The default name given to a partition value if the respective value is empty or null.
public static String escapePathName(String path)
public static String escapePathName(String path, String defaultPath)
path
- The path to escape.defaultPath
- The default name for the path, if the given path is empty or null.
public static String unescapePathName(String path)
public static void listStatusRecursively(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.FileStatus fileStatus, List<org.apache.hadoop.fs.FileStatus> results) throws IOException
fs
- file systemfileStatus
- starting point in file systemresults
- receives enumeration of all files found
IOException
public static String makeDefaultListBucketingDirName(List<String> skewedCols, org.apache.hadoop.conf.Configuration hconf)
skewedCols
- hconf
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |