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:
- Configurable
public class LocalFileSystem
- extends ChecksumFileSystem
Implement the FileSystem API for the checksumed local filesystem.
- Author:
- Mike Cafarella
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, getRawFileSystem, isChecksumFile, listPaths, listPaths, lock, mkdirs, open, release, rename, setReplication, startLocalOutput |
Methods inherited from class org.apache.hadoop.fs.FilterFileSystem |
checkPath, close, exists, getBlockSize, getConf, getDefaultBlockSize, getDefaultReplication, getFileCacheHints, getLength, getName, getReplication, getUri, getWorkingDirectory, initialize, isDirectory, makeQualified, setWorkingDirectory |
Methods inherited from class org.apache.hadoop.fs.FileSystem |
closeAll, copyFromLocalFile, copyToLocalFile, create, create, create, create, create, create, create, createNewFile, get, get, getContentLength, getLocal, getNamed, getUsed, globPaths, globPaths, isFile, listPaths, listPaths, moveFromLocalFile, moveToLocalFile, open, parseArgs |
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 © 2006 The Apache Software Foundation