@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class DelegateToFileSystem extends AbstractFileSystem
FileSystem.| Modifier and Type | Field and Description |
|---|---|
protected FileSystem |
fsImpl |
statistics| Modifier | Constructor and Description |
|---|---|
protected |
DelegateToFileSystem(URI theUri,
FileSystem theFsImpl,
Configuration conf,
String supportedScheme,
boolean authorityRequired) |
| Modifier and Type | Method and Description |
|---|---|
FSDataOutputStream |
createInternal(Path f,
EnumSet<CreateFlag> flag,
FsPermission absolutePermission,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
Options.ChecksumOpt checksumOpt,
boolean createParent)
The specification of this method matches that of
AbstractFileSystem.create(Path, EnumSet, Options.CreateOpts...) except that the opts
have been declared explicitly. |
void |
createSymlink(Path target,
Path link,
boolean createParent)
The specification of this method matches that of
FileContext.createSymlink(Path, Path, boolean); |
boolean |
delete(Path f,
boolean recursive)
The specification of this method matches that of
FileContext.delete(Path, boolean) except that Path f must be for
this file system. |
String |
getCanonicalServiceName()
Get a canonical name for this file system.
|
List<Token<?>> |
getDelegationTokens(String renewer)
Get one or more delegation tokens associated with the filesystem.
|
BlockLocation[] |
getFileBlockLocations(Path f,
long start,
long len)
The specification of this method matches that of
FileContext.getFileBlockLocations(Path, long, long) except that
Path f must be for this file system. |
FileChecksum |
getFileChecksum(Path f)
The specification of this method matches that of
FileContext.getFileChecksum(Path) except that Path f must be for
this file system. |
FileStatus |
getFileLinkStatus(Path f)
The specification of this method matches that of
FileContext.getFileLinkStatus(Path)
except that an UnresolvedLinkException may be thrown if a symlink is
encountered in the path leading up to the final path component. |
FileStatus |
getFileStatus(Path f)
The specification of this method matches that of
FileContext.getFileStatus(Path)
except that an UnresolvedLinkException may be thrown if a symlink is
encountered in the path. |
FsStatus |
getFsStatus()
The specification of this method matches that of
FileContext.getFsStatus(Path). |
Path |
getHomeDirectory()
Return the current user's home directory in this file system.
|
Path |
getInitialWorkingDirectory()
Some file systems like LocalFileSystem have an initial workingDir
that is used as the starting workingDir.
|
Path |
getLinkTarget(Path f)
Partially resolves the path.
|
FsServerDefaults |
getServerDefaults()
Return a set of server default configuration values.
|
int |
getUriDefaultPort()
The default port of this file system.
|
FileStatus[] |
listStatus(Path f)
The specification of this method matches that of
FileContext.Util.listStatus(Path) except that Path f must be
for this file system. |
void |
mkdir(Path dir,
FsPermission permission,
boolean createParent)
The specification of this method matches that of
FileContext.mkdir(Path, FsPermission, boolean) except that the Path
f must be fully qualified and the permission is absolute (i.e. |
FSDataInputStream |
open(Path f,
int bufferSize)
The specification of this method matches that of
FileContext.open(Path, int) except that Path f must be for this
file system. |
void |
renameInternal(Path src,
Path dst)
The specification of this method matches that of
FileContext.rename(Path, Path, Options.Rename...) except that Path
f must be for this file system and NO OVERWRITE is performed. |
void |
setOwner(Path f,
String username,
String groupname)
The specification of this method matches that of
FileContext.setOwner(Path, String, String) except that Path f must
be for this file system. |
void |
setPermission(Path f,
FsPermission permission)
The specification of this method matches that of
FileContext.setPermission(Path, FsPermission) except that Path f
must be for this file system. |
boolean |
setReplication(Path f,
short replication)
The specification of this method matches that of
FileContext.setReplication(Path, short) except that Path f must be
for this file system. |
void |
setTimes(Path f,
long mtime,
long atime)
The specification of this method matches that of
FileContext.setTimes(Path, long, long) except that Path f must be
for this file system. |
void |
setVerifyChecksum(boolean verifyChecksum)
The specification of this method matches that of
FileContext.setVerifyChecksum(boolean, Path) except that Path f
must be for this file system. |
boolean |
supportsSymlinks()
Returns true if the file system supports symlinks, false otherwise.
|
checkPath, checkScheme, clearStatistics, create, createFileSystem, equals, get, getAllStatistics, getFsStatus, getStatistics, getStatistics, getUri, getUriPath, hashCode, isValidName, listCorruptFileBlocks, listLocatedStatus, listStatusIterator, makeQualified, open, printStatistics, rename, renameInternal, resolvePathprotected final FileSystem fsImpl
protected DelegateToFileSystem(URI theUri, FileSystem theFsImpl, Configuration conf, String supportedScheme, boolean authorityRequired) throws IOException, URISyntaxException
IOExceptionURISyntaxExceptionpublic Path getInitialWorkingDirectory()
AbstractFileSystemgetInitialWorkingDirectory in class AbstractFileSystempublic FSDataOutputStream createInternal(Path f, EnumSet<CreateFlag> flag, FsPermission absolutePermission, int bufferSize, short replication, long blockSize, Progressable progress, Options.ChecksumOpt checksumOpt, boolean createParent) throws IOException
AbstractFileSystemAbstractFileSystem.create(Path, EnumSet, Options.CreateOpts...) except that the opts
have been declared explicitly.createInternal in class AbstractFileSystemIOExceptionpublic boolean delete(Path f, boolean recursive) throws IOException
AbstractFileSystemFileContext.delete(Path, boolean) except that Path f must be for
this file system.delete in class AbstractFileSystemIOExceptionpublic BlockLocation[] getFileBlockLocations(Path f, long start, long len) throws IOException
AbstractFileSystemFileContext.getFileBlockLocations(Path, long, long) except that
Path f must be for this file system.getFileBlockLocations in class AbstractFileSystemIOExceptionpublic FileChecksum getFileChecksum(Path f) throws IOException
AbstractFileSystemFileContext.getFileChecksum(Path) except that Path f must be for
this file system.getFileChecksum in class AbstractFileSystemIOExceptionpublic FileStatus getFileStatus(Path f) throws IOException
AbstractFileSystemFileContext.getFileStatus(Path)
except that an UnresolvedLinkException may be thrown if a symlink is
encountered in the path.getFileStatus in class AbstractFileSystemIOExceptionpublic FileStatus getFileLinkStatus(Path f) throws IOException
AbstractFileSystemFileContext.getFileLinkStatus(Path)
except that an UnresolvedLinkException may be thrown if a symlink is
encountered in the path leading up to the final path component.
If the file system does not support symlinks then the behavior is
equivalent to AbstractFileSystem.getFileStatus(Path).getFileLinkStatus in class AbstractFileSystemIOExceptionpublic FsStatus getFsStatus() throws IOException
AbstractFileSystemFileContext.getFsStatus(Path).getFsStatus in class AbstractFileSystemIOExceptionpublic FsServerDefaults getServerDefaults() throws IOException
AbstractFileSystemgetServerDefaults in class AbstractFileSystemIOException - an I/O error occurredpublic Path getHomeDirectory()
AbstractFileSystemgetHomeDirectory in class AbstractFileSystempublic int getUriDefaultPort()
AbstractFileSystemgetUriDefaultPort in class AbstractFileSystempublic FileStatus[] listStatus(Path f) throws IOException
AbstractFileSystemFileContext.Util.listStatus(Path) except that Path f must be
for this file system.listStatus in class AbstractFileSystemIOExceptionpublic void mkdir(Path dir, FsPermission permission, boolean createParent) throws IOException
AbstractFileSystemFileContext.mkdir(Path, FsPermission, boolean) except that the Path
f must be fully qualified and the permission is absolute (i.e.
umask has been applied).mkdir in class AbstractFileSystemIOExceptionpublic FSDataInputStream open(Path f, int bufferSize) throws IOException
AbstractFileSystemFileContext.open(Path, int) except that Path f must be for this
file system.open in class AbstractFileSystemIOExceptionpublic void renameInternal(Path src, Path dst) throws IOException
AbstractFileSystemFileContext.rename(Path, Path, Options.Rename...) except that Path
f must be for this file system and NO OVERWRITE is performed.
File systems that do not have a built in overwrite need implement only this
method and can take advantage of the default impl of the other
AbstractFileSystem.renameInternal(Path, Path, boolean)renameInternal in class AbstractFileSystemIOExceptionpublic void setOwner(Path f, String username, String groupname) throws IOException
AbstractFileSystemFileContext.setOwner(Path, String, String) except that Path f must
be for this file system.setOwner in class AbstractFileSystemIOExceptionpublic void setPermission(Path f, FsPermission permission) throws IOException
AbstractFileSystemFileContext.setPermission(Path, FsPermission) except that Path f
must be for this file system.setPermission in class AbstractFileSystemIOExceptionpublic boolean setReplication(Path f, short replication) throws IOException
AbstractFileSystemFileContext.setReplication(Path, short) except that Path f must be
for this file system.setReplication in class AbstractFileSystemIOExceptionpublic void setTimes(Path f, long mtime, long atime) throws IOException
AbstractFileSystemFileContext.setTimes(Path, long, long) except that Path f must be
for this file system.setTimes in class AbstractFileSystemIOExceptionpublic void setVerifyChecksum(boolean verifyChecksum)
throws IOException
AbstractFileSystemFileContext.setVerifyChecksum(boolean, Path) except that Path f
must be for this file system.setVerifyChecksum in class AbstractFileSystemIOExceptionpublic boolean supportsSymlinks()
AbstractFileSystemsupportsSymlinks in class AbstractFileSystempublic void createSymlink(Path target, Path link, boolean createParent) throws IOException
AbstractFileSystemFileContext.createSymlink(Path, Path, boolean);createSymlink in class AbstractFileSystemIOExceptionpublic Path getLinkTarget(Path f) throws IOException
AbstractFileSystemFSLinkResolver, and differs from the similarly named method
FileContext.getLinkTarget(Path).getLinkTarget in class AbstractFileSystemIOExceptionpublic String getCanonicalServiceName()
AbstractFileSystemgetCanonicalServiceName in class AbstractFileSystempublic List<Token<?>> getDelegationTokens(String renewer) throws IOException
AbstractFileSystemgetDelegationTokens in class AbstractFileSystemrenewer - the account name that is allowed to renew the token.IOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.