public class WebHdfsFileSystem extends FileSystem implements DelegationTokenRenewer.Renewable
| Modifier and Type | Class and Description |
|---|---|
protected class |
WebHdfsFileSystem.ReadRunner
This class will allow retries to occur for both open and read operations.
|
class |
WebHdfsFileSystem.WebHdfsInputStream
This class is used for opening, reading, and seeking files while using the
WebHdfsFileSystem.
|
FileSystem.Statistics| Modifier and Type | Field and Description |
|---|---|
static String |
CANT_FALLBACK_TO_INSECURE_MSG |
protected org.apache.hadoop.hdfs.web.URLConnectionFactory |
connectionFactory
Default connection factory may be overridden in tests to use smaller timeout values
|
static org.apache.commons.logging.Log |
LOG |
static String |
PATH_PREFIX
Http URI: http://namenode:port/{PATH_PREFIX}/path/to/file
|
static String |
SCHEME
File System URI: {SCHEME}://namenode:port/path/to/file
|
static Text |
TOKEN_KIND
Delegation token kind
|
protected Text |
tokenServiceName |
static int |
VERSION
WebHdfs version.
|
DEFAULT_FS, FS_DEFAULT_NAME_KEY, SHUTDOWN_HOOK_PRIORITY, statistics| Constructor and Description |
|---|
WebHdfsFileSystem() |
append, append, areSymlinksEnabled, cancelDeleteOnExit, checkPath, clearStatistics, closeAll, closeAllForUGI, completeLocalOutput, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, create, createNewFile, createNonRecursive, createNonRecursive, createNonRecursive, createSnapshot, delete, deleteOnExit, enableSymlinks, exists, fixRelativePart, get, get, get, getAllStatistics, getBlockSize, getDefaultBlockSize, getDefaultReplication, getDefaultUri, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getReplication, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getUsed, globStatus, globStatus, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, listStatusIterator, makeQualified, mkdirs, mkdirs, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, resolveLink, resolvePath, setDefaultUri, setDefaultUri, setVerifyChecksum, setWriteChecksum, setXAttr, startLocalOutput, supportsSymlinksgetConf, setConfpublic static final org.apache.commons.logging.Log LOG
public static final String SCHEME
public static final int VERSION
public static final String PATH_PREFIX
protected org.apache.hadoop.hdfs.web.URLConnectionFactory connectionFactory
public static final Text TOKEN_KIND
public static final String CANT_FALLBACK_TO_INSECURE_MSG
protected Text tokenServiceName
public WebHdfsFileSystem()
public String getScheme()
getScheme in class FileSystemwebhdfsprotected String getTransportScheme()
protected Text getTokenKind()
public void initialize(URI uri, Configuration conf) throws IOException
initialize in class FileSystemIOExceptionpublic URI getCanonicalUri()
getCanonicalUri in class FileSystempublic static boolean isEnabled(Configuration conf, org.apache.commons.logging.Log log)
protected org.apache.hadoop.security.token.Token<?> getDelegationToken() throws IOException
IOExceptionpublic int getDefaultPort()
getDefaultPort in class FileSystempublic URI getUri()
getUri in class FileSystemprotected URI canonicalizeUri(URI uri)
canonicalizeUri in class FileSystempublic static String getHomeDirectoryString(UserGroupInformation ugi)
public Path getHomeDirectory()
getHomeDirectory in class FileSystempublic Path getWorkingDirectory()
getWorkingDirectory in class FileSystempublic void setWorkingDirectory(Path dir)
setWorkingDirectory in class FileSystempublic FileStatus getFileStatus(Path f) throws IOException
getFileStatus in class FileSystemIOExceptionpublic AclStatus getAclStatus(Path f) throws IOException
getAclStatus in class FileSystemIOExceptionpublic boolean mkdirs(Path f, FsPermission permission) throws IOException
mkdirs in class FileSystemIOExceptionpublic void createSymlink(Path destination, Path f, boolean createParent) throws IOException
createSymlink in class FileSystemIOExceptionHdfs.createSymlink(Path, Path, boolean)public boolean rename(Path src, Path dst) throws IOException
rename in class FileSystemIOExceptionpublic void rename(Path src, Path dst, Options.Rename... options) throws IOException
rename in class FileSystemIOExceptionpublic void setXAttr(Path p, String name, byte[] value, EnumSet<XAttrSetFlag> flag) throws IOException
setXAttr in class FileSystemIOExceptionpublic byte[] getXAttr(Path p, String name) throws IOException
getXAttr in class FileSystemIOExceptionpublic Map<String,byte[]> getXAttrs(Path p) throws IOException
getXAttrs in class FileSystemIOExceptionpublic Map<String,byte[]> getXAttrs(Path p, List<String> names) throws IOException
getXAttrs in class FileSystemIOExceptionpublic List<String> listXAttrs(Path p) throws IOException
listXAttrs in class FileSystemIOExceptionpublic void removeXAttr(Path p, String name) throws IOException
removeXAttr in class FileSystemIOExceptionpublic void setOwner(Path p, String owner, String group) throws IOException
setOwner in class FileSystemIOExceptionpublic void setPermission(Path p, FsPermission permission) throws IOException
setPermission in class FileSystemIOExceptionpublic void modifyAclEntries(Path path, List<AclEntry> aclSpec) throws IOException
modifyAclEntries in class FileSystemIOExceptionpublic void removeAclEntries(Path path, List<AclEntry> aclSpec) throws IOException
removeAclEntries in class FileSystemIOExceptionpublic void removeDefaultAcl(Path path) throws IOException
removeDefaultAcl in class FileSystemIOExceptionpublic void removeAcl(Path path) throws IOException
removeAcl in class FileSystemIOExceptionpublic void setAcl(Path p, List<AclEntry> aclSpec) throws IOException
setAcl in class FileSystemIOExceptionpublic Path createSnapshot(Path path, String snapshotName) throws IOException
createSnapshot in class FileSystemIOExceptionpublic void deleteSnapshot(Path path, String snapshotName) throws IOException
deleteSnapshot in class FileSystemIOExceptionpublic void renameSnapshot(Path path, String snapshotOldName, String snapshotNewName) throws IOException
renameSnapshot in class FileSystemIOExceptionpublic boolean setReplication(Path p, short replication) throws IOException
setReplication in class FileSystemIOExceptionpublic void setTimes(Path p, long mtime, long atime) throws IOException
setTimes in class FileSystemIOExceptionpublic long getDefaultBlockSize()
getDefaultBlockSize in class FileSystempublic short getDefaultReplication()
getDefaultReplication in class FileSystempublic void concat(Path trg, Path[] srcs) throws IOException
concat in class FileSystemIOExceptionpublic FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
create in class FileSystemIOExceptionpublic FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException
append in class FileSystemIOExceptionpublic boolean truncate(Path f, long newLength) throws IOException
truncate in class FileSystemIOExceptionpublic boolean delete(Path f, boolean recursive) throws IOException
delete in class FileSystemIOExceptionpublic FSDataInputStream open(Path f, int bufferSize) throws IOException
open in class FileSystemIOExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FileSystemIOExceptionpublic FileStatus[] listStatus(Path f) throws IOException
listStatus in class FileSystemIOExceptionpublic org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier> getDelegationToken(String renewer) throws IOException
getDelegationToken in class FileSystemIOExceptionpublic org.apache.hadoop.security.token.Token<?> getRenewToken()
getRenewToken in interface DelegationTokenRenewer.Renewablepublic <T extends org.apache.hadoop.security.token.TokenIdentifier> void setDelegationToken(org.apache.hadoop.security.token.Token<T> token)
setDelegationToken in interface DelegationTokenRenewer.Renewablepublic long renewDelegationToken(org.apache.hadoop.security.token.Token<?> token) throws IOException
IOExceptionpublic void cancelDelegationToken(org.apache.hadoop.security.token.Token<?> token) throws IOException
IOExceptionpublic BlockLocation[] getFileBlockLocations(FileStatus status, long offset, long length) throws IOException
getFileBlockLocations in class FileSystemIOExceptionpublic BlockLocation[] getFileBlockLocations(Path p, long offset, long length) throws IOException
getFileBlockLocations in class FileSystemIOExceptionpublic void access(Path path, FsAction mode) throws IOException
access in class FileSystemIOExceptionpublic ContentSummary getContentSummary(Path p) throws IOException
getContentSummary in class FileSystemIOExceptionpublic MD5MD5CRC32FileChecksum getFileChecksum(Path p) throws IOException
getFileChecksum in class FileSystemIOExceptionpublic String getCanonicalServiceName()
getCanonicalServiceName in class FileSystempublic void setRetryPolicy(org.apache.hadoop.io.retry.RetryPolicy rp)
Copyright © 2018 CERN. All Rights Reserved.