@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.Statistics
DEFAULT_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, startLocalOutput
getConf, setConf
public DistributedFileSystem()
@Deprecated public DistributedFileSystem(InetSocketAddress namenode, Configuration conf) throws IOException
IOException
public String getScheme()
getScheme
in class FileSystem
hdfs
public URI getUri()
FileSystem
getUri
in class FileSystem
public void initialize(URI uri, Configuration conf) throws IOException
FileSystem
initialize
in class FileSystem
uri
- a uri whose authority section names the host, port, etc.
for this FileSystemconf
- the configurationIOException
public Path getWorkingDirectory()
FileSystem
getWorkingDirectory
in class FileSystem
public long getDefaultBlockSize()
FileSystem
getDefaultBlockSize
in class FileSystem
public short getDefaultReplication()
FileSystem
getDefaultReplication
in class FileSystem
public void setWorkingDirectory(Path dir)
FileSystem
setWorkingDirectory
in class FileSystem
public Path getHomeDirectory()
FileSystem
getHomeDirectory
in class FileSystem
public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException
FileSystem
getFileBlockLocations
in class FileSystem
file
- FilesStatus to get data fromstart
- offset into the given filelen
- length for which to get locations forIOException
public BlockLocation[] getFileBlockLocations(Path p, long start, long len) throws IOException
FileSystem
getFileBlockLocations
in class FileSystem
p
- 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 informationBlockStorageLocation
s containing additional volume location
information for each replica of each block.IOException
UnsupportedOperationException
InvalidBlockTokenException
public void setVerifyChecksum(boolean verifyChecksum)
FileSystem
setVerifyChecksum
in class FileSystem
public boolean recoverLease(Path f) throws IOException
f
- a fileIOException
- if an error occurspublic FSDataInputStream open(Path f, int bufferSize) throws IOException
FileSystem
open
in class FileSystem
f
- the file name to openbufferSize
- the size of the buffer to be used.IOException
public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException
FileSystem
append
in class FileSystem
f
- the existing file to be appended.bufferSize
- the size of the buffer to be used.progress
- for reporting progress if it is not null.IOException
public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
FileSystem
create
in class FileSystem
f
- 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.IOException
FileSystem.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 createIOException
public FSDataOutputStream create(Path f, FsPermission permission, EnumSet<CreateFlag> cflags, int bufferSize, short replication, long blockSize, Progressable progress, Options.ChecksumOpt checksumOpt) throws IOException
FileSystem
create
in class FileSystem
f
- the file name to opencflags
- CreateFlag
s 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.IOException
FileSystem.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 FileSystem
IOException
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission, EnumSet<CreateFlag> flag, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
createNonRecursive
in class FileSystem
f
- the file name to openflag
- CreateFlag
s to use for this stream.bufferSize
- the size of the buffer to be used.replication
- required block replication for the file.IOException
FileSystem.setPermission(Path, FsPermission)
public boolean setReplication(Path src, short replication) throws IOException
FileSystem
setReplication
in class FileSystem
src
- file namereplication
- new replicationIOException
public void concat(Path trg, Path[] psrcs) throws IOException
concat
in class FileSystem
trg
- existing file to append topsrcs
- list of files (same block size, same replication)IOException
public boolean rename(Path src, Path dst) throws IOException
FileSystem
rename
in class FileSystem
src
- path to be renameddst
- new path after renameIOException
- on failurepublic void rename(Path src, Path dst, Options.Rename... options) throws IOException
rename
in class FileSystem
src
- path to be renameddst
- new path after renameIOException
- on failurepublic boolean delete(Path f, boolean recursive) throws IOException
FileSystem
delete
in class FileSystem
f
- 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.IOException
public ContentSummary getContentSummary(Path f) throws IOException
FileSystem
ContentSummary
of a given Path
.getContentSummary
in class FileSystem
f
- path to useIOException
public void setQuota(Path src, long namespaceQuota, long diskspaceQuota) throws IOException
IOException
ClientProtocol.setQuota(String, long, long)
public FileStatus[] listStatus(Path p) throws IOException
listStatus
in class FileSystem
p
- given pathFileNotFoundException
- when the path does not exist;
IOException see specific implementationIOException
protected RemoteIterator<LocatedFileStatus> listLocatedStatus(Path p, PathFilter filter) throws IOException
FileSystem
listLocatedStatus
in class FileSystem
p
- 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.IOException
public boolean mkdirs(Path f, FsPermission permission) throws IOException
FsPermission.applyUMask(FsPermission)
for details of how
the permission is applied.mkdirs
in class FileSystem
f
- The path to createpermission
- The permission. See FsPermission#applyUMask for
details about how this is used to calculate the
effective permission.IOException
protected boolean primitiveMkdir(Path f, FsPermission absolutePermission) throws IOException
FileSystem
primitiveMkdir
in class FileSystem
IOException
public void close() throws IOException
FileSystem
close
in interface Closeable
close
in interface AutoCloseable
close
in class FileSystem
IOException
@InterfaceAudience.Private public DFSClient getClient()
public FsStatus getStatus(Path p) throws IOException
FileSystem
getStatus
in class FileSystem
p
- 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()
insteadIOException
public long getMissingBlocksCount() throws IOException
IOException
public long getUnderReplicatedBlocksCount() throws IOException
IOException
public long getCorruptBlocksCount() throws IOException
IOException
public RemoteIterator<Path> listCorruptFileBlocks(Path path) throws IOException
listCorruptFileBlocks
in class FileSystem
IOException
public DatanodeInfo[] getDataNodeStats() throws IOException
IOException
public DatanodeInfo[] getDataNodeStats(HdfsConstants.DatanodeReportType type) throws IOException
IOException
public 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
statusIOException
org.apache.hadoop.hdfs.protocol.ClientProtocol#setSafeMode(SafeModeAction, boolean)
public void saveNamespace() throws AccessControlException, IOException
AccessControlException
IOException
ClientProtocol.saveNamespace()
public long rollEdits() throws AccessControlException, IOException
AccessControlException
IOException
ClientProtocol.rollEdits()
public boolean restoreFailedStorage(String arg) throws AccessControlException, IOException
public void refreshNodes() throws IOException
IOException
public void finalizeUpgrade() throws IOException
IOException
public void metaSave(String pathname) throws IOException
IOException
public FsServerDefaults getServerDefaults() throws IOException
FileSystem
getServerDefaults
in class FileSystem
IOException
@Deprecated public boolean reportChecksumFailure(Path f, FSDataInputStream in, long inPos, FSDataInputStream sums, long sumsPos)
public FileStatus getFileStatus(Path f) throws IOException
getFileStatus
in class FileSystem
f
- The path we want information fromFileNotFoundException
- if the file does not exist.IOException
public void createSymlink(Path target, Path link, boolean createParent) throws AccessControlException, FileAlreadyExistsException, FileNotFoundException, ParentNotDirectoryException, UnsupportedFileSystemException, IOException
FileSystem
public boolean supportsSymlinks()
FileSystem
supportsSymlinks
in class FileSystem
public FileStatus getFileLinkStatus(Path f) throws AccessControlException, FileNotFoundException, UnsupportedFileSystemException, IOException
FileSystem
getFileLinkStatus
in class FileSystem
AccessControlException
FileNotFoundException
UnsupportedFileSystemException
IOException
public Path getLinkTarget(Path f) throws AccessControlException, FileNotFoundException, UnsupportedFileSystemException, IOException
FileSystem
getLinkTarget
in class FileSystem
AccessControlException
FileNotFoundException
UnsupportedFileSystemException
IOException
protected Path resolveLink(Path f) throws IOException
FileSystem
resolveLink
in class FileSystem
IOException
public FileChecksum getFileChecksum(Path f) throws IOException
FileSystem
getFileChecksum
in class FileSystem
f
- The file pathIOException
public void setPermission(Path p, FsPermission permission) throws IOException
FileSystem
setPermission
in class FileSystem
IOException
public void setOwner(Path p, String username, String groupname) throws IOException
FileSystem
setOwner
in class FileSystem
p
- The pathusername
- If it is null, the original username remains unchanged.groupname
- If it is null, the original groupname remains unchanged.IOException
public void setTimes(Path p, long mtime, long atime) throws IOException
FileSystem
setTimes
in class FileSystem
p
- 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.IOException
protected int getDefaultPort()
FileSystem
getDefaultPort
in class FileSystem
public Token<DelegationTokenIdentifier> getDelegationToken(String renewer) throws IOException
FileSystem
FileSystem.addDelegationTokens(String, Credentials)
getDelegationToken
in class FileSystem
renewer
- 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 tokenIOException
public long renewDelegationToken(Token<DelegationTokenIdentifier> token) throws SecretManager.InvalidToken, IOException
token
- delegation token obtained earlierIOException
SecretManager.InvalidToken
public void cancelDelegationToken(Token<DelegationTokenIdentifier> token) throws IOException
token
- delegation tokenIOException
public void setBalancerBandwidth(long bandwidth) throws IOException
bandwidth
- Balancer bandwidth in bytes per second for all datanodes.IOException
public String getCanonicalServiceName()
getCanonicalServiceName
in class FileSystem
SecurityUtil.buildDTServiceName(URI, int)
protected URI canonicalizeUri(URI uri)
FileSystem
canonicalizeUri
in class FileSystem
NetUtils.getCanonicalUri(URI, int)
public boolean isInSafeMode() throws IOException
IOException
- when there is an issue communicating with the NameNodepublic void allowSnapshot(Path path) throws IOException
IOException
HdfsAdmin.allowSnapshot(Path)
public void disallowSnapshot(Path path) throws IOException
IOException
HdfsAdmin.disallowSnapshot(Path)
public Path createSnapshot(Path path, String snapshotName) throws IOException
FileSystem
createSnapshot
in class FileSystem
path
- The directory where snapshots will be taken.snapshotName
- The name of the snapshotIOException
public void renameSnapshot(Path path, String snapshotOldName, String snapshotNewName) throws IOException
FileSystem
renameSnapshot
in class FileSystem
path
- The directory path where the snapshot was takensnapshotOldName
- Old name of the snapshotsnapshotNewName
- New name of the snapshotIOException
public SnapshottableDirectoryStatus[] getSnapshottableDirListing() throws IOException
IOException
public void deleteSnapshot(Path snapshotDir, String snapshotName) throws IOException
FileSystem
deleteSnapshot
in class FileSystem
snapshotDir
- The directory that the to-be-deleted snapshot belongs tosnapshotName
- The name of the snapshotIOException
public SnapshotDiffReport getSnapshotDiffReport(Path snapshotDir, String fromSnapshot, String toSnapshot) throws IOException
IOException
DFSClient#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.