| Package | Description |
|---|---|
| org.apache.hadoop.fs |
An abstract file system API.
|
| org.apache.hadoop.fs.viewfs |
ViewFileSystem and ViewFileSystemOverloadScheme classes.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
FileContext.access(Path path,
FsAction mode) |
Checks if the user can access a path.
|
boolean |
FileContext.Util.copy(Path src,
Path dst) |
Copy file from src to dest.
|
boolean |
FileContext.Util.copy(Path src,
Path dst,
boolean deleteSource,
boolean overwrite) |
Copy from src to dst, optionally deleting src and overwriting dst.
|
FSDataOutputStream |
AbstractFileSystem.create(Path f,
java.util.EnumSet<CreateFlag> createFlag,
Options.CreateOpts... opts) |
The specification of this method matches that of
FileContext.create(Path, EnumSet, Options.CreateOpts...) except
that the Path f must be fully qualified and the permission is absolute
(i.e. |
FSDataOutputStream |
FileContext.create(Path f,
java.util.EnumSet<CreateFlag> createFlag,
Options.CreateOpts... opts) |
Create or overwrite file on indicated path and returns an output stream for
writing into the file.
|
static AbstractFileSystem |
AbstractFileSystem.createFileSystem(java.net.URI uri,
Configuration conf) |
Create a file system instance for the specified uri using the conf.
|
abstract FSDataOutputStream |
AbstractFileSystem.createInternal(Path f,
java.util.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 |
FileContext.createSymlink(Path target,
Path link,
boolean createParent) |
Creates a symbolic link to an existing file.
|
void |
FileSystem.createSymlink(Path target,
Path link,
boolean createParent) |
|
void |
FilterFileSystem.createSymlink(Path target,
Path link,
boolean createParent) |
|
boolean |
FileContext.delete(Path f,
boolean recursive) |
Delete a file.
|
boolean |
FileContext.Util.exists(Path f) |
Does the file exist?
Note: Avoid using this method if you already have FileStatus in hand.
|
static AbstractFileSystem |
AbstractFileSystem.get(java.net.URI uri,
Configuration conf) |
The main factory method for creating a file system.
|
ContentSummary |
FileContext.Util.getContentSummary(Path f) |
Return the
ContentSummary of path f. |
BlockLocation[] |
FileContext.getFileBlockLocations(Path f,
long start,
long len) |
Return blockLocation of the given file for the given offset and len.
|
static FileContext |
FileContext.getFileContext() |
Create a FileContext using the default config read from the
$HADOOP_CONFIG/core.xml, Unspecified key-values for config are defaulted
from core-defaults.xml in the release jar.
|
static FileContext |
FileContext.getFileContext(java.net.URI defaultFsUri) |
Create a FileContext for specified URI using the default config.
|
static FileContext |
FileContext.getFileContext(java.net.URI defaultFsUri,
Configuration aConf) |
Create a FileContext for specified default URI using the specified config.
|
static FileContext |
FileContext.getFileContext(Configuration aConf) |
Create a FileContext using the passed config.
|
FileStatus |
AbstractFileSystem.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 |
FileContext.getFileLinkStatus(Path f) |
Return a file status object that represents the path.
|
FileStatus |
FileSystem.getFileLinkStatus(Path f) |
|
FileStatus |
FilterFileSystem.getFileLinkStatus(Path f) |
|
FileStatus |
FileContext.getFileStatus(Path f) |
Return a file status object that represents the path.
|
protected AbstractFileSystem |
FileContext.getFSofPath(Path absOrFqPath) |
Get the file system of supplied path.
|
protected static FileSystem |
FileSystem.getFSofPath(Path absOrFqPath,
Configuration conf) |
|
FsStatus |
FileContext.getFsStatus(Path f) |
Returns a status object describing the use and capacity of the
file system denoted by the Parh argument p.
|
Path |
FileContext.getLinkTarget(Path f) |
Returns the target of the given symbolic link as it was specified
when the link was created.
|
static FileContext |
FileContext.getLocalFSFileContext() |
|
static FileContext |
FileContext.getLocalFSFileContext(Configuration aConf) |
|
FileStatus[] |
FileContext.Util.globStatus(Path pathPattern) |
Return all the files that match filePattern and are not checksum
files.
|
FileStatus[] |
FileContext.Util.globStatus(Path pathPattern,
PathFilter filter) |
Return an array of FileStatus objects whose path names match pathPattern
and is accepted by the user-supplied path filter.
|
RemoteIterator<LocatedFileStatus> |
FileContext.Util.listFiles(Path f,
boolean recursive) |
List the statuses and block locations of the files in the given path.
|
RemoteIterator<LocatedFileStatus> |
FileContext.listLocatedStatus(Path f) |
List the statuses of the files/directories in the given path if the path is
a directory.
|
RemoteIterator<FileStatus> |
FileContext.listStatus(Path f) |
List the statuses of the files/directories in the given path if the path is
a directory.
|
FileStatus[] |
FileContext.Util.listStatus(Path f) |
List the statuses of the files/directories in the given path
if the path is a directory.
|
FileStatus[] |
FileContext.Util.listStatus(Path f,
PathFilter filter) |
Filter files/directories in the given path using the user-supplied path
filter.
|
void |
FileContext.mkdir(Path dir,
FsPermission permission,
boolean createParent) |
Make(create) a directory and all the non-existent parents.
|
FSDataInputStream |
FileContext.open(Path f) |
Opens an FSDataInputStream at the indicated Path using
default buffersize.
|
FSDataInputStream |
FileContext.open(Path f,
int bufferSize) |
Opens an FSDataInputStream at the indicated Path.
|
void |
FileContext.rename(Path src,
Path dst,
Options.Rename... options) |
Renames Path src to Path dst
Fails if src is a file and dst is a directory.
|
void |
FileContext.setOwner(Path f,
java.lang.String username,
java.lang.String groupname) |
Set owner of a path (i.e.
|
void |
FileContext.setPermission(Path f,
FsPermission permission) |
Set permission of a path.
|
void |
FileContext.setTimes(Path f,
long mtime,
long atime) |
Set access time of a file.
|
void |
FileContext.setVerifyChecksum(boolean verifyChecksum,
Path f) |
Set the verify checksum flag for the file system denoted by the path.
|
boolean |
FileContext.truncate(Path f,
long newLength) |
Truncate the file in the indicated path to the indicated size.
|
| Modifier and Type | Method | Description |
|---|---|---|
FSDataOutputStream |
ViewFs.createInternal(Path f,
java.util.EnumSet<CreateFlag> flag,
FsPermission absolutePermission,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
Options.ChecksumOpt checksumOpt,
boolean createParent) |
|
FileStatus |
ViewFs.getFileLinkStatus(Path f) |
|
protected abstract T |
InodeTree.getTargetFileSystem(java.lang.String settings,
java.net.URI[] mergeFsURIs) |
| Constructor | Description |
|---|---|
InodeTree(Configuration config,
java.lang.String viewName,
java.net.URI theUri,
boolean initingUriAsFallbackOnNoMounts) |
Create Inode Tree from the specified mount-table specified in Config.
|
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.