@InterfaceAudience.Public @InterfaceStability.Stable public class LocalFileSystem extends ChecksumFileSystem
fs, swapScheme
DEFAULT_FS, FS_DEFAULT_NAME_KEY, LOG, SHUTDOWN_HOOK_PRIORITY, 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() |
void |
initialize(URI name,
Configuration conf)
Called after a new FileSystem instance is constructed.
|
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, listLocatedStatus, listStatus, mkdirs, open, rename, setConf, setReplication, setVerifyChecksum, setWriteChecksum, startLocalOutput
checkPath, close, copyFromLocalFile, copyFromLocalFile, getCanonicalUri, getChildFileSystems, getConf, getContentSummary, getDefaultBlockSize, getDefaultBlockSize, getDefaultReplication, getDefaultReplication, getFileBlockLocations, getFileChecksum, getFileStatus, getHomeDirectory, getInitialWorkingDirectory, getServerDefaults, getServerDefaults, getStatus, getUri, getUsed, getWorkingDirectory, listCorruptFileBlocks, makeQualified, mkdirs, primitiveCreate, primitiveMkdir, resolvePath, setOwner, setPermission, setTimes, setWorkingDirectory
append, append, cancelDeleteOnExit, clearStatistics, closeAll, closeAllForUGI, copyFromLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, createNewFile, createNonRecursive, delete, deleteOnExit, exists, get, get, get, getAllStatistics, getBlockSize, getDefaultPort, getDefaultUri, getFileBlockLocations, getLength, getLocal, getName, getNamed, getReplication, getStatistics, getStatistics, getStatus, globStatus, globStatus, isDirectory, isFile, listFiles, listLocatedStatus, listStatus, listStatus, listStatus, mkdirs, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, primitiveMkdir, printStatistics, processDeleteOnExit, rename, setDefaultUri, setDefaultUri
public LocalFileSystem()
public LocalFileSystem(FileSystem rawLocalFileSystem)
public void initialize(URI name, Configuration conf) throws IOException
FilterFileSystem
initialize
in class FilterFileSystem
name
- a uri whose authority section names the host, port, etc.
for this FileSystemconf
- the configurationIOException
public FileSystem getRaw()
public File pathToFile(Path path)
public void copyFromLocalFile(boolean delSrc, Path src, Path dst) throws IOException
FilterFileSystem
copyFromLocalFile
in class ChecksumFileSystem
delSrc
- whether to delete the srcsrc
- pathdst
- pathIOException
public void copyToLocalFile(boolean delSrc, Path src, Path dst) throws IOException
ChecksumFileSystem
copyToLocalFile
in class ChecksumFileSystem
delSrc
- whether to delete the srcsrc
- pathdst
- pathIOException
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 © 2014 Apache Software Foundation. All Rights Reserved.