public class HttpFileSystem extends FileSystem
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
|
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.
|
addDelegationTokens, 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, 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, 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, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, removeAcl, removeAclEntries, removeDefaultAcl, removeXAttr, rename, renameSnapshot, resolveLink, resolvePath, setAcl, setDefaultUri, setDefaultUri, setOwner, setPermission, 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.
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 implementationCopyright © 2022 Apache Software Foundation. All rights reserved.