|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.fs.FileUtil
public class FileUtil
A collection of file-processing util methods
Constructor Summary | |
---|---|
FileUtil()
|
Method Summary | |
---|---|
static boolean |
copy(File src,
FileSystem dstFS,
Path dst,
boolean deleteSource,
Configuration conf)
Copy local files to a FileSystem. |
static boolean |
copy(FileSystem srcFS,
Path src,
File dst,
boolean deleteSource,
Configuration conf)
Copy FileSystem files to local files. |
static boolean |
copy(FileSystem srcFS,
Path src,
FileSystem dstFS,
Path dst,
boolean deleteSource,
boolean copyCrc,
Configuration conf)
Copy files between FileSystems. |
static boolean |
copy(FileSystem srcFS,
Path src,
FileSystem dstFS,
Path dst,
boolean deleteSource,
Configuration conf)
Copy files between FileSystems. |
static boolean |
copyMerge(FileSystem srcFS,
Path srcDir,
FileSystem dstFS,
Path dstFile,
boolean deleteSource,
Configuration conf,
String addString)
Copy all files in a directory to one output file (merge). |
static boolean |
fullyDelete(File dir)
Delete a directory and all its contents. |
static long |
getDU(File dir)
Takes an input dir and returns the du on that local directory. |
static int |
symLink(String target,
String linkname)
Create a soft link between a src and destination only on a local disk. |
static void |
unZip(File inFile,
File unzipDir)
Given a File input it will unzip the file in a the unzip directory passed as the second parameter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtil()
Method Detail |
---|
public static boolean fullyDelete(File dir) throws IOException
IOException
public static boolean copy(FileSystem srcFS, Path src, FileSystem dstFS, Path dst, boolean deleteSource, Configuration conf) throws IOException
IOException
public static boolean copy(FileSystem srcFS, Path src, FileSystem dstFS, Path dst, boolean deleteSource, boolean copyCrc, Configuration conf) throws IOException
IOException
public static boolean copyMerge(FileSystem srcFS, Path srcDir, FileSystem dstFS, Path dstFile, boolean deleteSource, Configuration conf, String addString) throws IOException
IOException
public static boolean copy(File src, FileSystem dstFS, Path dst, boolean deleteSource, Configuration conf) throws IOException
IOException
public static boolean copy(FileSystem srcFS, Path src, File dst, boolean deleteSource, Configuration conf) throws IOException
IOException
public static long getDU(File dir)
dir
- The input dir to get the disk space of this local dir
public static void unZip(File inFile, File unzipDir) throws IOException
inFile
- The zip file as inputunzipDir
- The unzip directory where to unzip the zip file.
IOException
public static int symLink(String target, String linkname) throws IOException
target
- the target for symlinklinkname
- the symlink
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |