@InterfaceAudience.LimitedPrivate(value={"MapReduce","HBase"}) @InterfaceStability.Unstable public class DistributedFileSystem extends FileSystem
| Modifier and Type | Class and Description |
|---|---|
static class |
DistributedFileSystem.DiskStatus
Deprecated.
Use
FsStatus instead |
FileSystem.StatisticsDEFAULT_FS, FS_DEFAULT_NAME_KEY, LOG, SHUTDOWN_HOOK_PRIORITY, statistics| Constructor and Description |
|---|
DistributedFileSystem() |
DistributedFileSystem(InetSocketAddress namenode,
Configuration conf)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
allowSnapshot(Path path) |
FSDataOutputStream |
append(Path f,
int bufferSize,
Progressable progress)
Append to an existing file (optional operation).
|
void |
cancelDelegationToken(Token<DelegationTokenIdentifier> token)
Deprecated.
Use Token.cancel instead.
|
protected URI |
canonicalizeUri(URI uri)
Canonicalize the given URI.
|
void |
close()
No more filesystem operations are needed.
|
void |
concat(Path trg,
Path[] psrcs)
Move blocks from srcs to trg and delete srcs afterwards.
|
FSDataOutputStream |
create(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress)
Create an FSDataOutputStream at the indicated Path with write-progress
reporting.
|
HdfsDataOutputStream |
create(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
InetSocketAddress[] favoredNodes)
Same as
create(Path, FsPermission, boolean, int, short, long,
Progressable) with the addition of favoredNodes that is a hint to
where the namenode should place the file blocks. |
FSDataOutputStream |
create(Path f,
FsPermission permission,
EnumSet<CreateFlag> cflags,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
Options.ChecksumOpt checksumOpt)
Create an FSDataOutputStream at the indicated Path with a custom
checksum option
|
FSDataOutputStream |
createNonRecursive(Path f,
FsPermission permission,
EnumSet<CreateFlag> flag,
int bufferSize,
short replication,
long blockSize,
Progressable progress)
Same as create(), except fails if parent directory doesn't already exist.
|
Path |
createSnapshot(Path path,
String snapshotName)
Create a snapshot
|
void |
createSymlink(Path target,
Path link,
boolean createParent)
|
boolean |
delete(Path f,
boolean recursive)
Delete a file.
|
void |
deleteSnapshot(Path snapshotDir,
String snapshotName)
Delete a snapshot of a directory
|
void |
disallowSnapshot(Path path) |
void |
finalizeUpgrade()
Finalize previously upgraded files system state.
|
String |
getCanonicalServiceName()
Get a canonical service name for this file system.
|
DFSClient |
getClient() |
ContentSummary |
getContentSummary(Path f)
Return the
ContentSummary of a given Path. |
long |
getCorruptBlocksCount()
Returns count of blocks with at least one replica marked corrupt.
|
DatanodeInfo[] |
getDataNodeStats() |
DatanodeInfo[] |
getDataNodeStats(HdfsConstants.DatanodeReportType type) |
long |
getDefaultBlockSize()
Return the number of bytes that large input files should be optimally
be split into to minimize i/o time.
|
protected int |
getDefaultPort()
Get the default port for this file system.
|
short |
getDefaultReplication()
Get the default replication.
|
Token<DelegationTokenIdentifier> |
getDelegationToken(String renewer)
Get a new delegation token for this file system.
|
Token<DelegationTokenIdentifier> |
getDelegationToken(Text renewer)
Deprecated.
|
DistributedFileSystem.DiskStatus |
getDiskStatus()
Deprecated.
Use
FileSystem.getStatus()
instead |
BlockLocation[] |
getFileBlockLocations(FileStatus file,
long start,
long len)
Return an array containing hostnames, offset and size of
portions of the given file.
|
BlockLocation[] |
getFileBlockLocations(Path p,
long start,
long len)
Return an array containing hostnames, offset and size of
portions of the given file.
|
BlockStorageLocation[] |
getFileBlockStorageLocations(List<BlockLocation> blocks)
Used to query storage location information for a list of blocks.
|
FileChecksum |
getFileChecksum(Path f)
Get the checksum of a file.
|
FileStatus |
getFileLinkStatus(Path f)
|
FileStatus |
getFileStatus(Path f)
Returns the stat information about the file.
|
Path |
getHomeDirectory()
Return the current user's home directory in this filesystem.
|
Path |
getLinkTarget(Path f)
|
long |
getMissingBlocksCount()
Returns count of blocks with no good replicas left.
|
long |
getRawCapacity()
Deprecated.
Use
FileSystem.getStatus()
instead |
long |
getRawUsed()
Deprecated.
Use
FileSystem.getStatus()
instead |
String |
getScheme()
Return the protocol scheme for the FileSystem.
|
FsServerDefaults |
getServerDefaults()
Return a set of server default configuration values
|
SnapshotDiffReport |
getSnapshotDiffReport(Path snapshotDir,
String fromSnapshot,
String toSnapshot)
Get the difference between two snapshots, or between a snapshot and the
current tree of a directory.
|
SnapshottableDirectoryStatus[] |
getSnapshottableDirListing() |
FsStatus |
getStatus(Path p)
Returns a status object describing the use and capacity of the
file system.
|
long |
getUnderReplicatedBlocksCount()
Returns count of blocks with one of more replica missing.
|
URI |
getUri()
Returns a URI whose scheme and authority identify this FileSystem.
|
Path |
getWorkingDirectory()
Get the current working directory for the given file system
|
void |
initialize(URI uri,
Configuration conf)
Called after a new FileSystem instance is constructed.
|
boolean |
isFileClosed(Path src)
Get the close status of a file
|
boolean |
isInSafeMode()
Utility function that returns if the NameNode is in safemode or not.
|
RemoteIterator<Path> |
listCorruptFileBlocks(Path path) |
protected RemoteIterator<LocatedFileStatus> |
listLocatedStatus(Path p,
PathFilter filter)
Listing a directory
The returned results include its block location if it is a file
The results are filtered by the given path filter
|
FileStatus[] |
listStatus(Path p)
List all the entries of a directory
Note that this operation is not atomic for a large directory.
|
void |
metaSave(String pathname) |
boolean |
mkdir(Path f,
FsPermission permission)
Create a directory, only when the parent directories exist.
|
boolean |
mkdirs(Path f,
FsPermission permission)
Create a directory and its parent directories.
|
FSDataInputStream |
open(Path f,
int bufferSize)
Opens an FSDataInputStream at the indicated Path.
|
protected HdfsDataOutputStream |
primitiveCreate(Path f,
FsPermission absolutePermission,
EnumSet<CreateFlag> flag,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
Options.ChecksumOpt checksumOpt) |
protected boolean |
primitiveMkdir(Path f,
FsPermission absolutePermission)
This version of the mkdirs method assumes that the permission is absolute.
|
boolean |
recoverLease(Path f)
Start the lease recovery of a file
|
void |
refreshNodes()
Refreshes the list of hosts and excluded hosts from the configured
files.
|
boolean |
rename(Path src,
Path dst)
Renames Path src to Path dst.
|
void |
rename(Path src,
Path dst,
Options.Rename... options)
This rename operation is guaranteed to be atomic.
|
void |
renameSnapshot(Path path,
String snapshotOldName,
String snapshotNewName)
Rename a snapshot
|
long |
renewDelegationToken(Token<DelegationTokenIdentifier> token)
Deprecated.
Use Token.renew instead.
|
boolean |
reportChecksumFailure(Path f,
FSDataInputStream in,
long inPos,
FSDataInputStream sums,
long sumsPos)
Deprecated.
|
protected Path |
resolveLink(Path f)
|
boolean |
restoreFailedStorage(String arg)
enable/disable/check restoreFaileStorage
|
long |
rollEdits()
Rolls the edit log on the active NameNode.
|
void |
saveNamespace()
Save namespace image.
|
void |
setBalancerBandwidth(long bandwidth)
Requests the namenode to tell all datanodes to use a new, non-persistent
bandwidth value for dfs.balance.bandwidthPerSec.
|
void |
setOwner(Path p,
String username,
String groupname)
Set owner of a path (i.e.
|
void |
setPermission(Path p,
FsPermission permission)
Set permission of a path.
|
void |
setQuota(Path src,
long namespaceQuota,
long diskspaceQuota)
Set a directory's quotas
|
boolean |
setReplication(Path src,
short replication)
Set replication for an existing file.
|
boolean |
setSafeMode(HdfsConstants.SafeModeAction action)
Enter, leave or get safe mode.
|
boolean |
setSafeMode(HdfsConstants.SafeModeAction action,
boolean isChecked)
Enter, leave or get safe mode.
|
void |
setTimes(Path p,
long mtime,
long atime)
Set access time of a file
|
void |
setVerifyChecksum(boolean verifyChecksum)
Set the verify checksum flag.
|
void |
setWorkingDirectory(Path dir)
Set the current working directory for the given file system.
|
boolean |
supportsSymlinks()
|
String |
toString() |
addDelegationTokens, append, append, cancelDeleteOnExit, checkPath, clearStatistics, closeAll, closeAllForUGI, completeLocalOutput, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, createNewFile, createNonRecursive, createNonRecursive, createSnapshot, delete, deleteOnExit, enableSymlinks, exists, fixRelativePart, get, get, get, getAllStatistics, getBlockSize, getCanonicalUri, getChildFileSystems, getDefaultBlockSize, getDefaultReplication, getDefaultUri, getFileSystemClass, getFSofPath, getInitialWorkingDirectory, getLength, getLocal, getName, getNamed, getReplication, getServerDefaults, getStatistics, getStatistics, getStatus, getUsed, globStatus, globStatus, isDirectory, isFile, isSymlinksEnabled, listFiles, listLocatedStatus, listStatus, listStatus, listStatus, makeQualified, mkdirs, mkdirs, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, primitiveMkdir, printStatistics, processDeleteOnExit, resolvePath, setDefaultUri, setDefaultUri, setWriteChecksum, startLocalOutputgetConf, setConfpublic DistributedFileSystem()
@Deprecated public DistributedFileSystem(InetSocketAddress namenode, Configuration conf) throws IOException
IOExceptionpublic String getScheme()
getScheme in class FileSystemhdfspublic URI getUri()
FileSystemgetUri in class FileSystempublic void initialize(URI uri, Configuration conf) throws IOException
FileSysteminitialize in class FileSystemuri - a uri whose authority section names the host, port, etc.
for this FileSystemconf - the configurationIOExceptionpublic Path getWorkingDirectory()
FileSystemgetWorkingDirectory in class FileSystempublic long getDefaultBlockSize()
FileSystemgetDefaultBlockSize in class FileSystempublic short getDefaultReplication()
FileSystemgetDefaultReplication in class FileSystempublic void setWorkingDirectory(Path dir)
FileSystemsetWorkingDirectory in class FileSystempublic Path getHomeDirectory()
FileSystemgetHomeDirectory in class FileSystempublic BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException
FileSystemgetFileBlockLocations in class FileSystemfile - FilesStatus to get data fromstart - offset into the given filelen - length for which to get locations forIOExceptionpublic BlockLocation[] getFileBlockLocations(Path p, long start, long len) throws IOException
FileSystemgetFileBlockLocations in class FileSystemp - path is used to identify an FS since an FS could have
another FS that it could be delegating the call tostart - offset into the given filelen - length for which to get locations forIOException@InterfaceStability.Unstable public BlockStorageLocation[] getFileBlockStorageLocations(List<BlockLocation> blocks) throws IOException, UnsupportedOperationException, InvalidBlockTokenException
getFileBlockLocations(Path, long, long) to
get the blocks for ranges of a file.
The returned array of BlockStorageLocation augments
BlockLocation with a VolumeId per block replica. The
VolumeId specifies the volume on the datanode on which the replica resides.
The VolumeId has to be checked via VolumeId.isValid() before being
used because volume information can be unavailable if the corresponding
datanode is down or if the requested block is not found.
This API is unstable, and datanode-side support is disabled by default. It
can be enabled by setting "dfs.datanode.hdfs-blocks-metadata.enabled" to
true.blocks - List of target BlockLocations to query volume location informationBlockStorageLocations containing additional volume location
information for each replica of each block.IOExceptionUnsupportedOperationExceptionInvalidBlockTokenExceptionpublic void setVerifyChecksum(boolean verifyChecksum)
FileSystemsetVerifyChecksum in class FileSystempublic boolean recoverLease(Path f) throws IOException
f - a fileIOException - if an error occurspublic FSDataInputStream open(Path f, int bufferSize) throws IOException
FileSystemopen in class FileSystemf - the file name to openbufferSize - the size of the buffer to be used.IOExceptionpublic FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException
FileSystemappend in class FileSystemf - the existing file to be appended.bufferSize - the size of the buffer to be used.progress - for reporting progress if it is not null.IOExceptionpublic FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
FileSystemcreate in class FileSystemf - the file name to openoverwrite - if a file with this name already exists, then if true,
the file will be overwritten, and if false an error will be thrown.bufferSize - the size of the buffer to be used.replication - required block replication for the file.IOExceptionFileSystem.setPermission(Path, FsPermission)public HdfsDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress, InetSocketAddress[] favoredNodes) throws IOException
create(Path, FsPermission, boolean, int, short, long,
Progressable) with the addition of favoredNodes that is a hint to
where the namenode should place the file blocks.
The favored nodes hint is not persisted in HDFS. Hence it may be honored
at the creation time only. HDFS could move the blocks during balancing or
replication, to move the blocks from favored nodes. A value of null means
no favored nodes for this createIOExceptionpublic FSDataOutputStream create(Path f, FsPermission permission, EnumSet<CreateFlag> cflags, int bufferSize, short replication, long blockSize, Progressable progress, Options.ChecksumOpt checksumOpt) throws IOException
FileSystemcreate in class FileSystemf - the file name to opencflags - CreateFlags to use for this stream.bufferSize - the size of the buffer to be used.replication - required block replication for the file.checksumOpt - checksum parameter. If null, the values
found in conf will be used.IOExceptionFileSystem.setPermission(Path, FsPermission)protected HdfsDataOutputStream primitiveCreate(Path f, FsPermission absolutePermission, EnumSet<CreateFlag> flag, int bufferSize, short replication, long blockSize, Progressable progress, Options.ChecksumOpt checksumOpt) throws IOException
primitiveCreate in class FileSystemIOExceptionpublic FSDataOutputStream createNonRecursive(Path f, FsPermission permission, EnumSet<CreateFlag> flag, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
createNonRecursive in class FileSystemf - the file name to openflag - CreateFlags to use for this stream.bufferSize - the size of the buffer to be used.replication - required block replication for the file.IOExceptionFileSystem.setPermission(Path, FsPermission)public boolean setReplication(Path src, short replication) throws IOException
FileSystemsetReplication in class FileSystemsrc - file namereplication - new replicationIOExceptionpublic void concat(Path trg, Path[] psrcs) throws IOException
concat in class FileSystemtrg - existing file to append topsrcs - list of files (same block size, same replication)IOExceptionpublic boolean rename(Path src, Path dst) throws IOException
FileSystemrename in class FileSystemsrc - path to be renameddst - new path after renameIOException - on failurepublic void rename(Path src, Path dst, Options.Rename... options) throws IOException
rename in class FileSystemsrc - path to be renameddst - new path after renameIOException - on failurepublic boolean delete(Path f, boolean recursive) throws IOException
FileSystemdelete in class FileSystemf - the path to delete.recursive - if path is a directory and set to
true, the directory is deleted else throws an exception. In
case of a file the recursive can be set to either true or false.IOExceptionpublic ContentSummary getContentSummary(Path f) throws IOException
FileSystemContentSummary of a given Path.getContentSummary in class FileSystemf - path to useIOExceptionpublic void setQuota(Path src, long namespaceQuota, long diskspaceQuota) throws IOException
IOExceptionClientProtocol.setQuota(String, long, long)public FileStatus[] listStatus(Path p) throws IOException
listStatus in class FileSystemp - given pathFileNotFoundException - when the path does not exist;
IOException see specific implementationIOExceptionprotected RemoteIterator<LocatedFileStatus> listLocatedStatus(Path p, PathFilter filter) throws IOException
FileSystemlistLocatedStatus in class FileSystemp - a pathfilter - a path filterFileNotFoundException - if f does not existIOException - if any I/O error occurredpublic boolean mkdir(Path f, FsPermission permission) throws IOException
FsPermission.applyUMask(FsPermission) for details of how
the permission is applied.f - The path to createpermission - The permission. See FsPermission#applyUMask for
details about how this is used to calculate the
effective permission.IOExceptionpublic boolean mkdirs(Path f, FsPermission permission) throws IOException
FsPermission.applyUMask(FsPermission) for details of how
the permission is applied.mkdirs in class FileSystemf - The path to createpermission - The permission. See FsPermission#applyUMask for
details about how this is used to calculate the
effective permission.IOExceptionprotected boolean primitiveMkdir(Path f, FsPermission absolutePermission) throws IOException
FileSystemprimitiveMkdir in class FileSystemIOExceptionpublic void close()
throws IOException
FileSystemclose in interface Closeableclose in interface AutoCloseableclose in class FileSystemIOException@InterfaceAudience.Private public DFSClient getClient()
public FsStatus getStatus(Path p) throws IOException
FileSystemgetStatus in class FileSystemp - Path for which status should be obtained. null means
the default partition.IOException - see specific implementation@Deprecated public DistributedFileSystem.DiskStatus getDiskStatus() throws IOException
FileSystem.getStatus()
insteadIOException@Deprecated public long getRawCapacity() throws IOException
FileSystem.getStatus()
insteadIOException@Deprecated public long getRawUsed() throws IOException
FileSystem.getStatus()
insteadIOExceptionpublic long getMissingBlocksCount()
throws IOException
IOExceptionpublic long getUnderReplicatedBlocksCount()
throws IOException
IOExceptionpublic long getCorruptBlocksCount()
throws IOException
IOExceptionpublic RemoteIterator<Path> listCorruptFileBlocks(Path path) throws IOException
listCorruptFileBlocks in class FileSystemIOExceptionpublic DatanodeInfo[] getDataNodeStats() throws IOException
IOExceptionpublic DatanodeInfo[] getDataNodeStats(HdfsConstants.DatanodeReportType type) throws IOException
IOExceptionpublic boolean setSafeMode(HdfsConstants.SafeModeAction action) throws IOException
public boolean setSafeMode(HdfsConstants.SafeModeAction action, boolean isChecked) throws IOException
action - One of SafeModeAction.ENTER, SafeModeAction.LEAVE and
SafeModeAction.GETisChecked - If true check only for Active NNs status, else check first NN's
statusIOExceptionorg.apache.hadoop.hdfs.protocol.ClientProtocol#setSafeMode(SafeModeAction, boolean)public void saveNamespace()
throws AccessControlException,
IOException
AccessControlExceptionIOExceptionClientProtocol.saveNamespace()public long rollEdits()
throws AccessControlException,
IOException
AccessControlExceptionIOExceptionClientProtocol.rollEdits()public boolean restoreFailedStorage(String arg) throws AccessControlException, IOException
public void refreshNodes()
throws IOException
IOExceptionpublic void finalizeUpgrade()
throws IOException
IOExceptionpublic void metaSave(String pathname) throws IOException
IOExceptionpublic FsServerDefaults getServerDefaults() throws IOException
FileSystemgetServerDefaults in class FileSystemIOException@Deprecated public boolean reportChecksumFailure(Path f, FSDataInputStream in, long inPos, FSDataInputStream sums, long sumsPos)
public FileStatus getFileStatus(Path f) throws IOException
getFileStatus in class FileSystemf - The path we want information fromFileNotFoundException - if the file does not exist.IOExceptionpublic void createSymlink(Path target, Path link, boolean createParent) throws AccessControlException, FileAlreadyExistsException, FileNotFoundException, ParentNotDirectoryException, UnsupportedFileSystemException, IOException
FileSystempublic boolean supportsSymlinks()
FileSystemsupportsSymlinks in class FileSystempublic FileStatus getFileLinkStatus(Path f) throws AccessControlException, FileNotFoundException, UnsupportedFileSystemException, IOException
FileSystemgetFileLinkStatus in class FileSystemAccessControlExceptionFileNotFoundExceptionUnsupportedFileSystemExceptionIOExceptionpublic Path getLinkTarget(Path f) throws AccessControlException, FileNotFoundException, UnsupportedFileSystemException, IOException
FileSystemgetLinkTarget in class FileSystemAccessControlExceptionFileNotFoundExceptionUnsupportedFileSystemExceptionIOExceptionprotected Path resolveLink(Path f) throws IOException
FileSystemresolveLink in class FileSystemIOExceptionpublic FileChecksum getFileChecksum(Path f) throws IOException
FileSystemgetFileChecksum in class FileSystemf - The file pathIOExceptionpublic void setPermission(Path p, FsPermission permission) throws IOException
FileSystemsetPermission in class FileSystemIOExceptionpublic void setOwner(Path p, String username, String groupname) throws IOException
FileSystemsetOwner in class FileSystemp - The pathusername - If it is null, the original username remains unchanged.groupname - If it is null, the original groupname remains unchanged.IOExceptionpublic void setTimes(Path p, long mtime, long atime) throws IOException
FileSystemsetTimes in class FileSystemp - The pathmtime - Set the modification time of this file.
The number of milliseconds since Jan 1, 1970.
A value of -1 means that this call should not set modification time.atime - Set the access time of this file.
The number of milliseconds since Jan 1, 1970.
A value of -1 means that this call should not set access time.IOExceptionprotected int getDefaultPort()
FileSystemgetDefaultPort in class FileSystempublic Token<DelegationTokenIdentifier> getDelegationToken(String renewer) throws IOException
FileSystemFileSystem.addDelegationTokens(String, Credentials)getDelegationToken in class FileSystemrenewer - the account name that is allowed to renew the token.IOException@Deprecated public Token<DelegationTokenIdentifier> getDelegationToken(Text renewer) throws IOException
getDelegationToken(String)renewer - Name of the designated renewer for the tokenIOExceptionpublic long renewDelegationToken(Token<DelegationTokenIdentifier> token) throws SecretManager.InvalidToken, IOException
token - delegation token obtained earlierIOExceptionSecretManager.InvalidTokenpublic void cancelDelegationToken(Token<DelegationTokenIdentifier> token) throws IOException
token - delegation tokenIOExceptionpublic void setBalancerBandwidth(long bandwidth)
throws IOException
bandwidth - Balancer bandwidth in bytes per second for all datanodes.IOExceptionpublic String getCanonicalServiceName()
getCanonicalServiceName in class FileSystemSecurityUtil.buildDTServiceName(URI, int)protected URI canonicalizeUri(URI uri)
FileSystemcanonicalizeUri in class FileSystemNetUtils.getCanonicalUri(URI, int)public boolean isInSafeMode()
throws IOException
IOException - when there is an issue communicating with the NameNodepublic void allowSnapshot(Path path) throws IOException
IOExceptionHdfsAdmin.allowSnapshot(Path)public void disallowSnapshot(Path path) throws IOException
IOExceptionHdfsAdmin.disallowSnapshot(Path)public Path createSnapshot(Path path, String snapshotName) throws IOException
FileSystemcreateSnapshot in class FileSystempath - The directory where snapshots will be taken.snapshotName - The name of the snapshotIOExceptionpublic void renameSnapshot(Path path, String snapshotOldName, String snapshotNewName) throws IOException
FileSystemrenameSnapshot in class FileSystempath - The directory path where the snapshot was takensnapshotOldName - Old name of the snapshotsnapshotNewName - New name of the snapshotIOExceptionpublic SnapshottableDirectoryStatus[] getSnapshottableDirListing() throws IOException
IOExceptionpublic void deleteSnapshot(Path snapshotDir, String snapshotName) throws IOException
FileSystemdeleteSnapshot in class FileSystemsnapshotDir - The directory that the to-be-deleted snapshot belongs tosnapshotName - The name of the snapshotIOExceptionpublic SnapshotDiffReport getSnapshotDiffReport(Path snapshotDir, String fromSnapshot, String toSnapshot) throws IOException
IOExceptionDFSClient#getSnapshotDiffReport(Path, String, String)public boolean isFileClosed(Path src) throws IOException
src - The path to the fileFileNotFoundException - if the file does not exist.IOException - If an I/O error occurredCopyright © 2013 Apache Software Foundation. All rights reserved.