Save This Page
Home » hadoop-0.14.4 » org.apache » hadoop » fs » [javadoc | source]
org.apache.hadoop.fs
public class: FilterFileSystem [javadoc | source]
java.lang.Object
   org.apache.hadoop.conf.Configured
      org.apache.hadoop.fs.FileSystem
         org.apache.hadoop.fs.FilterFileSystem

All Implemented Interfaces:
    Configurable

Direct Known Subclasses:
    PhasedFileSystem, InMemoryFileSystem, ChecksumFileSystem, LocalFileSystem, ChecksumDistributedFileSystem

A FilterFileSystem contains some other file system, which it uses as its basic file system, possibly transforming the data along the way or providing additional functionality. The class FilterFileSystem itself simply overrides all methods of FileSystem with versions that pass all requests to the contained file system. Subclasses of FilterFileSystem may further override some of these methods and may also provide additional methods and fields.
Field Summary
protected  FileSystem fs     
Fields inherited from org.apache.hadoop.fs.FileSystem:
LOG
Constructor:
 public FilterFileSystem(FileSystem fs) 
Method from org.apache.hadoop.fs.FilterFileSystem Summary:
checkPath,   close,   completeLocalOutput,   copyFromLocalFile,   copyToLocalFile,   create,   delete,   exists,   getConf,   getDefaultBlockSize,   getDefaultReplication,   getFileCacheHints,   getFileStatus,   getName,   getUri,   getWorkingDirectory,   initialize,   listPaths,   lock,   makeQualified,   mkdirs,   open,   release,   rename,   setReplication,   setWorkingDirectory,   startLocalOutput
Methods from org.apache.hadoop.fs.FileSystem:
checkPath,   close,   closeAll,   completeLocalOutput,   copyFromLocalFile,   copyFromLocalFile,   copyToLocalFile,   copyToLocalFile,   create,   create,   create,   create,   create,   create,   create,   create,   createNewFile,   delete,   exists,   get,   get,   getBlockSize,   getContentLength,   getDefaultBlockSize,   getDefaultReplication,   getFileCacheHints,   getFileStatus,   getLength,   getLocal,   getName,   getNamed,   getReplication,   getUri,   getUsed,   getWorkingDirectory,   globPaths,   globPaths,   initialize,   isDirectory,   isFile,   listPaths,   listPaths,   listPaths,   listPaths,   lock,   makeQualified,   mkdirs,   moveFromLocalFile,   moveToLocalFile,   open,   open,   parseArgs,   release,   rename,   setReplication,   setWorkingDirectory,   startLocalOutput
Methods from org.apache.hadoop.conf.Configured:
getConf,   setConf
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.hadoop.fs.FilterFileSystem Detail:
 protected  void checkPath(Path path) 
    Check that a Path belongs to this FileSystem.
 public  void close() throws IOException 
 public  void completeLocalOutput(Path fsOutputFile,
    Path tmpLocalFile) throws IOException 
    Called when we're all done writing to the target. A local FS will do nothing, because we've written to exactly the right place. A remote FS will copy the contents of tmpLocalFile to the correct target at fsOutputFile.
 public  void copyFromLocalFile(boolean delSrc,
    Path src,
    Path dst) throws IOException 
    The src file is on the local disk. Add it to FS at the given dst name. delSrc indicates if the source should be removed
 public  void copyToLocalFile(boolean delSrc,
    Path src,
    Path dst) throws IOException 
    The src file is under FS, and the dst is on the local disk. Copy it from FS control to the local dst name. delSrc indicates if the src will be removed or not.
 public FSDataOutputStream create(Path f,
    boolean overwrite,
    int bufferSize,
    short replication,
    long blockSize,
    Progressable progress) throws IOException 
    Opens an FSDataOutputStream at the indicated Path with write-progress reporting.
 public boolean delete(Path f) throws IOException 
    Delete a file
 public boolean exists(Path f) throws IOException 
    Check if exists.
 public Configuration getConf() 
 public long getDefaultBlockSize() 
    Return the number of bytes that large input files should be optimally be split into to minimize i/o time.
 public short getDefaultReplication() 
    Get the default replication.
 public String[][] getFileCacheHints(Path f,
    long start,
    long len) throws IOException 
    Return a 2D array of size 1x1 or greater, containing hostnames where portions of the given file can be found. For a nonexistent file or regions, null will be returned. This call is most helpful with DFS, where it returns hostnames of machines that contain the given file. The FileSystem will simply return an elt containing 'localhost'.
 public FileStatus getFileStatus(Path f) throws IOException 
    Get file status.
 public String getName() 
Deprecated! call - #getUri() instead.

 public URI getUri() 
    Returns a URI whose scheme and authority identify this FileSystem.
 public Path getWorkingDirectory() 
    Get the current working directory for the given file system
 public  void initialize(URI name,
    Configuration conf) throws IOException 
    Called after a new FileSystem instance is constructed.
 public Path[] listPaths(Path f) throws IOException 
    List files in a directory.
 public  void lock(Path f,
    boolean shared) throws IOException 
Deprecated! FS - does not support file locks anymore.

    Obtain a lock on the given Path
 public Path makeQualified(Path path) 
    Make sure that a path specifies a FileSystem.
 public boolean mkdirs(Path f) throws IOException 
    Make the given file and all non-existent parents into directories. Has the semantics of Unix 'mkdir -p'. Existence of the directory hierarchy is not an error.
 public FSDataInputStream open(Path f,
    int bufferSize) throws IOException 
    Opens an FSDataInputStream at the indicated Path.
 public  void release(Path f) throws IOException 
Deprecated! FS - does not support file locks anymore.

    Release the lock
 public boolean rename(Path src,
    Path dst) throws IOException 
    Renames Path src to Path dst. Can take place on local fs or remote DFS.
 public boolean setReplication(Path src,
    short replication) throws IOException 
    Set replication for an existing file.
 public  void setWorkingDirectory(Path newDir) 
    Set the current working directory for the given file system. All relative paths will be resolved relative to it.
 public Path startLocalOutput(Path fsOutputFile,
    Path tmpLocalFile) throws IOException 
    Returns a local File that the user can write output to. The caller provides both the eventual FS target name and the local working file. If the FS is local, we write directly into the target. If the FS is remote, we write into the tmp local area.