public class LocalFileSystem extends ChecksumFileSystem
FileSystem.Statistics
fs
LOG, statistics
Constructor and Description |
---|
LocalFileSystem() |
LocalFileSystem(FileSystem rawLocalFileSystem) |
Modifier and Type | Method and Description |
---|---|
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.
|
FileSystem |
getRaw() |
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.
|
append, completeLocalOutput, copyToLocalFile, create, delete, getApproxChkSumLength, getBytesPerSum, getChecksumFile, getChecksumFileLength, getChecksumLength, getRawFileSystem, isChecksumFile, listStatus, mkdirs, open, rename, setConf, setReplication, setVerifyChecksum, startLocalOutput
checkPath, close, delete, getConf, getDefaultBlockSize, getDefaultReplication, getFileBlockLocations, getFileChecksum, getFileStatus, getHomeDirectory, getName, getUri, getWorkingDirectory, initialize, makeQualified, mkdirs, setOwner, setPermission, setWorkingDirectory
append, append, clearStatistics, closeAll, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, createNewFile, deleteOnExit, exists, get, get, getAllStatistics, getBlockSize, getContentSummary, getDefaultUri, getLength, getLocal, getNamed, getReplication, getStatistics, getStatistics, getUsed, globStatus, globStatus, isDirectory, isFile, listStatus, listStatus, listStatus, mkdirs, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, open, printStatistics, processDeleteOnExit, setDefaultUri, setDefaultUri, setTimes
public LocalFileSystem()
public LocalFileSystem(FileSystem rawLocalFileSystem)
public FileSystem getRaw()
public void copyFromLocalFile(boolean delSrc, Path src, Path dst) throws IOException
FilterFileSystem
copyFromLocalFile
in class ChecksumFileSystem
IOException
public void copyToLocalFile(boolean delSrc, Path src, Path dst) throws IOException
ChecksumFileSystem
copyToLocalFile
in class ChecksumFileSystem
IOException
public boolean reportChecksumFailure(Path p, FSDataInputStream in, long inPos, FSDataInputStream sums, long sumsPos)
reportChecksumFailure
in class ChecksumFileSystem
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 fileCopyright © 2010 The Apache Software Foundation