|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.conf.Configured
org.apache.hadoop.fs.FileSystem
org.apache.hadoop.hdfs.DistributedFileSystem
@InterfaceAudience.Private @InterfaceStability.Evolving public class DistributedFileSystem
Implementation of the abstract FileSystem for the DFS system. This object is the way end-user code interacts with a Hadoop DistributedFileSystem.
Nested Class Summary | |
---|---|
static class |
DistributedFileSystem.DiskStatus
Deprecated. Use FsStatus instead |
Nested classes/interfaces inherited from class org.apache.hadoop.fs.FileSystem |
---|
org.apache.hadoop.fs.FileSystem.Statistics |
Field Summary |
---|
Fields inherited from class org.apache.hadoop.fs.FileSystem |
---|
DEFAULT_FS, FS_DEFAULT_NAME_KEY, LOG, statistics |
Constructor Summary | |
---|---|
DistributedFileSystem()
|
|
DistributedFileSystem(InetSocketAddress namenode,
org.apache.hadoop.conf.Configuration conf)
Deprecated. |
Method Summary | |
---|---|
org.apache.hadoop.fs.FSDataOutputStream |
append(org.apache.hadoop.fs.Path f,
int bufferSize,
org.apache.hadoop.util.Progressable progress)
This optional operation is not yet supported. |
void |
cancelDelegationToken(org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> token)
Cancel an existing delegation token. |
protected void |
checkPath(org.apache.hadoop.fs.Path path)
Permit paths which explicitly specify the default port. |
void |
close()
|
void |
concat(org.apache.hadoop.fs.Path trg,
org.apache.hadoop.fs.Path[] psrcs)
THIS IS DFS only operations, it is not part of FileSystem move blocks from srcs to trg and delete srcs afterwards all blocks should be the same size |
org.apache.hadoop.fs.FSDataOutputStream |
create(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
|
org.apache.hadoop.fs.FSDataOutputStream |
createNonRecursive(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission,
EnumSet<org.apache.hadoop.fs.CreateFlag> flag,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
Same as create(), except fails if parent directory doesn't already exist. |
boolean |
delete(org.apache.hadoop.fs.Path f,
boolean recursive)
|
UpgradeStatusReport |
distributedUpgradeProgress(FSConstants.UpgradeAction action)
|
void |
finalizeUpgrade()
Finalize previously upgraded files system state. |
DFSClient |
getClient()
|
org.apache.hadoop.fs.ContentSummary |
getContentSummary(org.apache.hadoop.fs.Path f)
|
long |
getCorruptBlocksCount()
Returns count of blocks with at least one replica marked corrupt. |
DatanodeInfo[] |
getDataNodeStats()
Return statistics for each datanode. |
long |
getDefaultBlockSize()
|
short |
getDefaultReplication()
|
org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> |
getDelegationToken(org.apache.hadoop.io.Text renewer)
Get a valid Delegation Token. |
DistributedFileSystem.DiskStatus |
getDiskStatus()
Deprecated. Use FileSystem.getStatus()
instead |
org.apache.hadoop.fs.BlockLocation[] |
getFileBlockLocations(org.apache.hadoop.fs.FileStatus file,
long start,
long len)
|
org.apache.hadoop.fs.BlockLocation[] |
getFileBlockLocations(org.apache.hadoop.fs.Path p,
long start,
long len)
|
org.apache.hadoop.fs.MD5MD5CRC32FileChecksum |
getFileChecksum(org.apache.hadoop.fs.Path f)
|
org.apache.hadoop.fs.FileStatus |
getFileStatus(org.apache.hadoop.fs.Path f)
Returns the stat information about the file. |
org.apache.hadoop.fs.Path |
getHomeDirectory()
|
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 |
org.apache.hadoop.fs.FsServerDefaults |
getServerDefaults()
|
org.apache.hadoop.fs.FsStatus |
getStatus(org.apache.hadoop.fs.Path p)
|
long |
getUnderReplicatedBlocksCount()
Returns count of blocks with one of more replica missing. |
URI |
getUri()
|
org.apache.hadoop.fs.Path |
getWorkingDirectory()
|
void |
initialize(URI uri,
org.apache.hadoop.conf.Configuration conf)
|
org.apache.hadoop.fs.FileStatus[] |
listStatus(org.apache.hadoop.fs.Path p)
List all the entries of a directory Note that this operation is not atomic for a large directory. |
org.apache.hadoop.fs.Path |
makeQualified(org.apache.hadoop.fs.Path path)
Normalize paths that explicitly specify the default port. |
void |
metaSave(String pathname)
|
boolean |
mkdir(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission)
Create a directory with given name and permission, only when parent directory exists. |
boolean |
mkdirs(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission)
|
org.apache.hadoop.fs.FSDataInputStream |
open(org.apache.hadoop.fs.Path f,
int bufferSize)
|
protected org.apache.hadoop.fs.FSDataOutputStream |
primitiveCreate(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission absolutePermission,
EnumSet<org.apache.hadoop.fs.CreateFlag> flag,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress,
int bytesPerChecksum)
|
protected boolean |
primitiveMkdir(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission absolutePermission)
|
void |
refreshNodes()
Refreshes the list of hosts and excluded hosts from the configured files. |
boolean |
rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
|
void |
rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst,
org.apache.hadoop.fs.Options.Rename... options)
This rename operation is guaranteed to be atomic. |
long |
renewDelegationToken(org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> token)
Renew an existing delegation token. |
boolean |
reportChecksumFailure(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.FSDataInputStream in,
long inPos,
org.apache.hadoop.fs.FSDataInputStream sums,
long sumsPos)
We need to find the blocks that didn't match. |
boolean |
restoreFailedStorage(String arg)
enable/disable/check restoreFaileStorage |
void |
saveNamespace()
Save namespace image. |
void |
setOwner(org.apache.hadoop.fs.Path p,
String username,
String groupname)
|
void |
setPermission(org.apache.hadoop.fs.Path p,
org.apache.hadoop.fs.permission.FsPermission permission)
|
void |
setQuota(org.apache.hadoop.fs.Path src,
long namespaceQuota,
long diskspaceQuota)
Set a directory's quotas |
boolean |
setReplication(org.apache.hadoop.fs.Path src,
short replication)
|
boolean |
setSafeMode(FSConstants.SafeModeAction action)
Enter, leave or get safe mode. |
void |
setTimes(org.apache.hadoop.fs.Path p,
long mtime,
long atime)
|
void |
setVerifyChecksum(boolean verifyChecksum)
|
void |
setWorkingDirectory(org.apache.hadoop.fs.Path dir)
|
String |
toString()
|
Methods inherited from class org.apache.hadoop.fs.FileSystem |
---|
append, append, clearStatistics, closeAll, completeLocalOutput, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, createNewFile, delete, deleteOnExit, exists, get, get, get, getAllStatistics, getBlockSize, getDefaultUri, getInitialWorkingDirectory, getLength, getLocal, getName, getNamed, getReplication, getStatistics, getStatistics, getStatus, getUsed, globStatus, globStatus, isDirectory, isFile, listStatus, listStatus, listStatus, mkdirs, mkdirs, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, primitiveMkdir, printStatistics, processDeleteOnExit, setDefaultUri, setDefaultUri, startLocalOutput |
Methods inherited from class org.apache.hadoop.conf.Configured |
---|
getConf, setConf |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DistributedFileSystem()
@Deprecated public DistributedFileSystem(InetSocketAddress namenode, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
Method Detail |
---|
public URI getUri()
getUri
in class org.apache.hadoop.fs.FileSystem
public void initialize(URI uri, org.apache.hadoop.conf.Configuration conf) throws IOException
initialize
in class org.apache.hadoop.fs.FileSystem
IOException
protected void checkPath(org.apache.hadoop.fs.Path path)
checkPath
in class org.apache.hadoop.fs.FileSystem
public org.apache.hadoop.fs.Path makeQualified(org.apache.hadoop.fs.Path path)
makeQualified
in class org.apache.hadoop.fs.FileSystem
public org.apache.hadoop.fs.Path getWorkingDirectory()
getWorkingDirectory
in class org.apache.hadoop.fs.FileSystem
public long getDefaultBlockSize()
getDefaultBlockSize
in class org.apache.hadoop.fs.FileSystem
public short getDefaultReplication()
getDefaultReplication
in class org.apache.hadoop.fs.FileSystem
public void setWorkingDirectory(org.apache.hadoop.fs.Path dir)
setWorkingDirectory
in class org.apache.hadoop.fs.FileSystem
public org.apache.hadoop.fs.Path getHomeDirectory()
getHomeDirectory
in class org.apache.hadoop.fs.FileSystem
public org.apache.hadoop.fs.BlockLocation[] getFileBlockLocations(org.apache.hadoop.fs.FileStatus file, long start, long len) throws IOException
getFileBlockLocations
in class org.apache.hadoop.fs.FileSystem
IOException
public org.apache.hadoop.fs.BlockLocation[] getFileBlockLocations(org.apache.hadoop.fs.Path p, long start, long len) throws IOException
getFileBlockLocations
in class org.apache.hadoop.fs.FileSystem
IOException
public void setVerifyChecksum(boolean verifyChecksum)
setVerifyChecksum
in class org.apache.hadoop.fs.FileSystem
public org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path f, int bufferSize) throws IOException
open
in class org.apache.hadoop.fs.FileSystem
IOException
public org.apache.hadoop.fs.FSDataOutputStream append(org.apache.hadoop.fs.Path f, int bufferSize, org.apache.hadoop.util.Progressable progress) throws IOException
append
in class org.apache.hadoop.fs.FileSystem
IOException
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, org.apache.hadoop.util.Progressable progress) throws IOException
create
in class org.apache.hadoop.fs.FileSystem
IOException
protected org.apache.hadoop.fs.FSDataOutputStream primitiveCreate(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission absolutePermission, EnumSet<org.apache.hadoop.fs.CreateFlag> flag, int bufferSize, short replication, long blockSize, org.apache.hadoop.util.Progressable progress, int bytesPerChecksum) throws IOException
primitiveCreate
in class org.apache.hadoop.fs.FileSystem
IOException
public org.apache.hadoop.fs.FSDataOutputStream createNonRecursive(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission permission, EnumSet<org.apache.hadoop.fs.CreateFlag> flag, int bufferSize, short replication, long blockSize, org.apache.hadoop.util.Progressable progress) throws IOException
IOException
public boolean setReplication(org.apache.hadoop.fs.Path src, short replication) throws IOException
setReplication
in class org.apache.hadoop.fs.FileSystem
IOException
public void concat(org.apache.hadoop.fs.Path trg, org.apache.hadoop.fs.Path[] psrcs) throws IOException
trg
- existing file to append topsrcs
- list of files (same block size, same replication)
IOException
public boolean rename(org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
rename
in class org.apache.hadoop.fs.FileSystem
IOException
public void rename(org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst, org.apache.hadoop.fs.Options.Rename... options) throws IOException
rename
in class org.apache.hadoop.fs.FileSystem
IOException
public boolean delete(org.apache.hadoop.fs.Path f, boolean recursive) throws IOException
delete
in class org.apache.hadoop.fs.FileSystem
IOException
public org.apache.hadoop.fs.ContentSummary getContentSummary(org.apache.hadoop.fs.Path f) throws IOException
getContentSummary
in class org.apache.hadoop.fs.FileSystem
IOException
public void setQuota(org.apache.hadoop.fs.Path src, long namespaceQuota, long diskspaceQuota) throws IOException
IOException
ClientProtocol.setQuota(String, long, long)
public org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path p) throws IOException
listStatus
in class org.apache.hadoop.fs.FileSystem
IOException
public boolean mkdir(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission permission) throws IOException
IOException
public boolean mkdirs(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission permission) throws IOException
mkdirs
in class org.apache.hadoop.fs.FileSystem
IOException
protected boolean primitiveMkdir(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission absolutePermission) throws IOException
primitiveMkdir
in class org.apache.hadoop.fs.FileSystem
IOException
public void close() throws IOException
close
in interface Closeable
close
in class org.apache.hadoop.fs.FileSystem
IOException
public String toString()
toString
in class Object
public DFSClient getClient()
public org.apache.hadoop.fs.FsStatus getStatus(org.apache.hadoop.fs.Path p) throws IOException
getStatus
in class org.apache.hadoop.fs.FileSystem
IOException
@Deprecated public DistributedFileSystem.DiskStatus getDiskStatus() throws IOException
FileSystem.getStatus()
instead
IOException
@Deprecated public long getRawCapacity() throws IOException
FileSystem.getStatus()
instead
IOException
@Deprecated public long getRawUsed() throws IOException
FileSystem.getStatus()
instead
IOException
public long getMissingBlocksCount() throws IOException
IOException
public long getUnderReplicatedBlocksCount() throws IOException
IOException
public long getCorruptBlocksCount() throws IOException
IOException
public DatanodeInfo[] getDataNodeStats() throws IOException
IOException
public boolean setSafeMode(FSConstants.SafeModeAction action) throws IOException
IOException
ClientProtocol.setSafeMode(
FSConstants.SafeModeAction)
public void saveNamespace() throws org.apache.hadoop.security.AccessControlException, IOException
org.apache.hadoop.security.AccessControlException
IOException
ClientProtocol.saveNamespace()
public boolean restoreFailedStorage(String arg) throws org.apache.hadoop.security.AccessControlException
org.apache.hadoop.security.AccessControlException
ClientProtocol.restoreFailedStorage(String arg)
public void refreshNodes() throws IOException
IOException
public void finalizeUpgrade() throws IOException
IOException
public UpgradeStatusReport distributedUpgradeProgress(FSConstants.UpgradeAction action) throws IOException
IOException
public void metaSave(String pathname) throws IOException
IOException
public org.apache.hadoop.fs.FsServerDefaults getServerDefaults() throws IOException
getServerDefaults
in class org.apache.hadoop.fs.FileSystem
IOException
public boolean reportChecksumFailure(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.FSDataInputStream in, long inPos, org.apache.hadoop.fs.FSDataInputStream sums, long sumsPos)
public org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path f) throws IOException
getFileStatus
in class org.apache.hadoop.fs.FileSystem
FileNotFoundException
- if the file does not exist.
IOException
public org.apache.hadoop.fs.MD5MD5CRC32FileChecksum getFileChecksum(org.apache.hadoop.fs.Path f) throws IOException
getFileChecksum
in class org.apache.hadoop.fs.FileSystem
IOException
public void setPermission(org.apache.hadoop.fs.Path p, org.apache.hadoop.fs.permission.FsPermission permission) throws IOException
setPermission
in class org.apache.hadoop.fs.FileSystem
IOException
public void setOwner(org.apache.hadoop.fs.Path p, String username, String groupname) throws IOException
setOwner
in class org.apache.hadoop.fs.FileSystem
IOException
public void setTimes(org.apache.hadoop.fs.Path p, long mtime, long atime) throws IOException
setTimes
in class org.apache.hadoop.fs.FileSystem
IOException
public org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> getDelegationToken(org.apache.hadoop.io.Text renewer) throws IOException
renewer
- Name of the designated renewer for the token
IOException
public long renewDelegationToken(org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> token) throws org.apache.hadoop.security.token.SecretManager.InvalidToken, IOException
token
- delegation token obtained earlier
IOException
org.apache.hadoop.security.token.SecretManager.InvalidToken
public void cancelDelegationToken(org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> token) throws IOException
token
- delegation token
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |