public class HttpFileSystem extends FileSystem
FileSystem.DirListingIterator<T extends FileStatus>, FileSystem.StatisticsDEFAULT_FS, FS_DEFAULT_NAME_KEY, SHUTDOWN_HOOK_PRIORITY, statistics, TRASH_PREFIX, USER_HOME_PREFIX| Constructor and Description |
|---|
HttpFileSystem() |
| Modifier and Type | Method and Description |
|---|---|
FSDataOutputStream |
append(Path path,
int i,
Progressable progressable)
Append to an existing file (optional operation).
|
FSDataOutputStream |
create(Path path,
FsPermission fsPermission,
boolean b,
int i,
short i1,
long l,
Progressable progressable)
Create an FSDataOutputStream at the indicated Path with write-progress
reporting.
|
boolean |
delete(Path path,
boolean b)
Delete a file.
|
FileStatus |
getFileStatus(Path path)
Return a file status object that represents the path.
|
String |
getScheme()
Return the protocol scheme for this FileSystem.
|
URI |
getUri()
Returns a URI which identifies this FileSystem.
|
Path |
getWorkingDirectory()
Get the current working directory for the given FileSystem
|
boolean |
hasPathCapability(Path path,
String capability)
Declare that this filesystem connector is always read only.
|
void |
initialize(URI name,
Configuration conf)
Initialize a FileSystem.
|
FileStatus[] |
listStatus(Path path)
List the statuses of the files/directories in the given path if the path is
a directory.
|
boolean |
mkdirs(Path path,
FsPermission fsPermission)
Make the given file and all non-existent parents into
directories.
|
FSDataInputStream |
open(Path path,
int bufferSize)
Opens an FSDataInputStream at the indicated Path.
|
boolean |
rename(Path path,
Path path1)
Renames Path src to Path dst.
|
void |
setWorkingDirectory(Path path)
Set the current working directory for the given FileSystem.
|
append, append, appendFile, areSymlinksEnabled, cancelDeleteOnExit, canonicalizeUri, checkPath, clearStatistics, close, closeAll, closeAllForUGI, completeLocalOutput, concat, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, create, createFile, createNewFile, createNonRecursive, createNonRecursive, createNonRecursive, createPathHandle, createSnapshot, createSnapshot, createSymlink, delete, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAllStatistics, getAllStoragePolicies, getBlockSize, getCanonicalServiceName, getCanonicalUri, getContentSummary, getDefaultBlockSize, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultReplication, getDefaultUri, getFileBlockLocations, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getGlobalStorageStatistics, getHomeDirectory, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getPathHandle, getQuotaUsage, getReplication, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getStoragePolicy, getStorageStatistics, getTrashRoot, getTrashRoots, getUsed, getUsed, getXAttr, getXAttrs, getXAttrs, globStatus, globStatus, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, listStatusIterator, listXAttrs, makeQualified, mkdirs, mkdirs, modifyAclEntries, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, msync, newInstance, newInstance, newInstance, newInstanceLocal, open, open, open, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, removeAcl, removeAclEntries, removeDefaultAcl, removeXAttr, rename, renameSnapshot, resolveLink, resolvePath, satisfyStoragePolicy, setAcl, setDefaultUri, setDefaultUri, setOwner, setPermission, setQuota, setQuotaByStorageType, setReplication, setStoragePolicy, setTimes, setVerifyChecksum, setWriteChecksum, setXAttr, setXAttr, startLocalOutput, supportsSymlinks, truncate, unsetStoragePolicygetConf, setConfpublic String getScheme()
FileSystem
This implementation throws an UnsupportedOperationException.
public void initialize(URI name, Configuration conf) throws IOException
FileSysteminitialize in class FileSystemname - a URI whose authority section names the host, port, etc.
for this FileSystemconf - the configurationIOException - on any failure to initialize this instance.public URI getUri()
FileSystemgetUri in class FileSystempublic FSDataInputStream open(Path path, int bufferSize) throws IOException
FileSystemopen in class FileSystempath - the file name to openbufferSize - the size of the buffer to be used.IOException - IO failurepublic FSDataOutputStream create(Path path, FsPermission fsPermission, boolean b, int i, short i1, long l, Progressable progressable) throws IOException
FileSystemcreate in class FileSystempath - the file name to openfsPermission - file permissionb - if a file with this name already exists, then if true,
the file will be overwritten, and if false an error will be thrown.i - the size of the buffer to be used.i1 - required block replication for the file.l - block sizeprogressable - the progress reporterIOException - IO failureFileSystem.setPermission(Path, FsPermission)public FSDataOutputStream append(Path path, int i, Progressable progressable) throws IOException
FileSystemappend in class FileSystempath - the existing file to be appended.i - the size of the buffer to be used.progressable - for reporting progress if it is not null.IOException - IO failurepublic boolean rename(Path path, Path path1) throws IOException
FileSystemrename in class FileSystempath - path to be renamedpath1 - new path after renameIOException - on failurepublic boolean delete(Path path, boolean b) throws IOException
FileSystemdelete in class FileSystempath - the path to delete.b - 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 - IO failurepublic FileStatus[] listStatus(Path path) throws IOException
FileSystemDoes not guarantee to return the List of files/directories status in a sorted order.
Will not return null. Expect IOException upon access error.
listStatus in class FileSystempath - given pathFileNotFoundException - when the path does not existIOException - see specific implementationpublic void setWorkingDirectory(Path path)
FileSystemsetWorkingDirectory in class FileSystempath - Path of new working directorypublic Path getWorkingDirectory()
FileSystemgetWorkingDirectory in class FileSystempublic boolean mkdirs(Path path, FsPermission fsPermission) throws IOException
FileSystemmkdirs in class FileSystempath - path to createfsPermission - to apply to fIOException - IO failurepublic FileStatus getFileStatus(Path path) throws IOException
FileSystemgetFileStatus in class FileSystempath - The path we want information fromFileNotFoundException - when the path does not existIOException - see specific implementationpublic boolean hasPathCapability(Path path, String capability) throws IOException
true, this instance is explicitly
declaring that the capability is available.
If the function returns false, it can mean one of:
Implementors: PathCapabilitiesSupport
can be used to help implement this method.
hasPathCapability in interface PathCapabilitieshasPathCapability in class FileSystempath - path to query the capability of.capability - non-null, non-empty string to query the path for support.IOException - this should not be raised, except on problems
resolving paths or relaying the call.Copyright © 2008–2022 Apache Software Foundation. All rights reserved.