org.apache.hadoop.fs
Class LocalFileSystem
java.lang.Object
  
org.apache.hadoop.conf.Configured
      
org.apache.hadoop.fs.FileSystem
          
org.apache.hadoop.fs.FilterFileSystem
              
org.apache.hadoop.fs.ChecksumFileSystem
                  
org.apache.hadoop.fs.LocalFileSystem
- All Implemented Interfaces: 
 - Closeable, Configurable
 
public class LocalFileSystem
- extends ChecksumFileSystem
 
Implement the FileSystem API for the checksumed local filesystem.
 
 
 
 
 
 
| 
Method Summary | 
 void | 
copyFromLocalFile(boolean delSrc,
                  Path src,
                  Path dst)
 
          The src file is on the local disk. | 
 void | 
copyToLocalFile(boolean delSrc,
                Path src,
                Path dst)
 
          The src file is under FS, and the dst is on the local disk. | 
 File | 
pathToFile(Path path)
 
          Convert a path to a File. | 
 boolean | 
reportChecksumFailure(Path p,
                      FSDataInputStream in,
                      long inPos,
                      FSDataInputStream sums,
                      long sumsPos)
 
          Moves files to a bad file directory on the same device, so that their
 storage will not be reused. | 
 
| Methods inherited from class org.apache.hadoop.fs.ChecksumFileSystem | 
completeLocalOutput, copyToLocalFile, create, delete, getApproxChkSumLength, getBytesPerSum, getChecksumFile, getChecksumFileLength, getChecksumLength, getRawFileSystem, isChecksumFile, listStatus, mkdirs, open, rename, setConf, setReplication, startLocalOutput | 
 
| Methods inherited from class org.apache.hadoop.fs.FilterFileSystem | 
append, checkPath, close, create, delete, getConf, getDefaultBlockSize, getDefaultReplication, getFileBlockLocations, getFileBlockLocations, getFileStatus, getHomeDirectory, getName, getUri, getWorkingDirectory, initialize, makeQualified, mkdirs, setOwner, setPermission, setWorkingDirectory | 
 
| Methods inherited from class org.apache.hadoop.fs.FileSystem | 
append, append, closeAll, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, createNewFile, deleteOnExit, exists, get, get, getBlockSize, getContentSummary, getDefaultUri, getLength, getLocal, getNamed, getReplication, getStatistics, getUsed, globStatus, globStatus, isDirectory, isFile, listStatus, listStatus, listStatus, mkdirs, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, open, parseArgs, printStatistics, processDeleteOnExit, setDefaultUri, setDefaultUri | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
LocalFileSystem
public LocalFileSystem()
LocalFileSystem
public LocalFileSystem(FileSystem rawLocalFileSystem)
pathToFile
public File pathToFile(Path path)
- Convert a path to a File.
 
 
copyFromLocalFile
public void copyFromLocalFile(boolean delSrc,
                              Path src,
                              Path dst)
                       throws IOException
- Description copied from class: 
FilterFileSystem 
- 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
- Overrides:
 copyFromLocalFile in class ChecksumFileSystem
 
- Throws:
 IOException
 
 
copyToLocalFile
public void copyToLocalFile(boolean delSrc,
                            Path src,
                            Path dst)
                     throws IOException
- Description copied from class: 
ChecksumFileSystem 
- The src file is under FS, and the dst is on the local disk.
 Copy it from FS control to the local dst name.
- Overrides:
 copyToLocalFile in class ChecksumFileSystem
 
- Throws:
 IOException
 
 
reportChecksumFailure
public boolean reportChecksumFailure(Path p,
                                     FSDataInputStream in,
                                     long inPos,
                                     FSDataInputStream sums,
                                     long sumsPos)
- Moves files to a bad file directory on the same device, so that their
 storage will not be reused.
- Overrides:
 reportChecksumFailure in class ChecksumFileSystem
 
- Parameters:
 p - the file name containing the errorin - the stream open on the fileinPos - the position of the beginning of the bad data in the filesums - the stream open on the checksum filesumsPos - the position of the beginning of the bad data in the checksum file
- Returns:
 - if retry is neccessary
 
 
 
Copyright © 2008 The Apache Software Foundation