public class LocalFileSystem extends ChecksumFileSystem
FileSystem.Statistics
fs
FS_DEFAULT_NAME_KEY, LOG, statistics
构造器和说明 |
---|
LocalFileSystem() |
LocalFileSystem(FileSystem rawLocalFileSystem) |
限定符和类型 | 方法和说明 |
---|---|
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.
|
boolean |
exists(Path f)
Get file status.
|
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, createNonRecursive, delete, getApproxChkSumLength, getBytesPerSum, getChecksumFile, getChecksumFileLength, getChecksumLength, getRawFileSystem, isChecksumFile, listStatus, mkdirs, open, rename, setConf, setReplication, setVerifyChecksum, startLocalOutput
checkPath, close, concat, delete, getCanonicalServiceName, getConf, getDefaultBlockSize, getDefaultReplication, getFileBlockLocations, getFileChecksum, getFileStatus, getHomeDirectory, getName, getUri, getWorkingDirectory, initialize, makeQualified, mkdirs, setOwner, setPermission, setWorkingDirectory
addFileSystemForTesting, append, append, clearStatistics, closeAll, closeAllForUGI, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, createNewFile, createNonRecursive, deleteOnExit, get, get, get, getAllStatistics, getBlockSize, getCacheSize, getCanonicalUri, getContentSummary, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultUri, getDelegationToken, 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 boolean exists(Path f) throws IOException
exists
在类中 FileSystem
f
- source fileIOException
public void copyFromLocalFile(boolean delSrc, Path src, Path dst) throws IOException
FilterFileSystem
copyFromLocalFile
在类中 ChecksumFileSystem
IOException
public void copyToLocalFile(boolean delSrc, Path src, Path dst) throws IOException
ChecksumFileSystem
copyToLocalFile
在类中 ChecksumFileSystem
IOException
public boolean reportChecksumFailure(Path p, FSDataInputStream in, long inPos, FSDataInputStream sums, long sumsPos)
reportChecksumFailure
在类中 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 © 2009 The Apache Software Foundation