Java org.apache.hadoop.fs FileSystem fields, constructors, methods, implement or subclass

Example usage for Java org.apache.hadoop.fs FileSystem fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.hadoop.fs FileSystem.

The text is from its open source code.

Subclass

org.apache.hadoop.fs.FileSystem has subclasses.
Click this link to see all its subclasses.

Implementation

org.apache.hadoop.fs.FileSystem has the following implementations.
Click this link to see all its implementation.

Field

StringFS_DEFAULT_NAME_KEY
StringDEFAULT_FS
LogLOG
This log is widely used in the org.apache.hadoop.fs code and tests, so must be considered something to only be changed with care.
intSHUTDOWN_HOOK_PRIORITY
Priority of the FileSystem shutdown hook: .
SetdeleteOnExit
A cache of files that should be deleted when the FileSystem is closed or the JVM is exited.

Method

voidaccess(Path path, FsAction mode)
Checks if the user can access a path.
Token[]addDelegationTokens(final String renewer, Credentials credentials)
Given a renewer, add delegation tokens for issuer and it's child issuers to the Credentials object if it is not already present.
FSDataOutputStreamappend(Path f)
Append to an existing file (optional operation).
FSDataOutputStreamappend(Path f, int bufferSize)
Append to an existing file (optional operation).
FSDataOutputStreamBuilderappendFile(Path path)
Create a Builder to append a file.
booleanareSymlinksEnabled()
voidclearStatistics()
Reset all statistics for all file systems.
voidclose()
Close this FileSystem instance.
voidcloseAll()
Close all cached FileSystem instances.
voidcloseAllForUGI(UserGroupInformation ugi)
Close all cached FileSystem instances for a given UGI.
voidcompleteLocalOutput(Path fsOutputFile, Path tmpLocalFile)
Called when we're all done writing to the target.
voidconcat(final Path trg, final Path[] psrcs)
Concat existing files together.
voidcopyFromLocalFile(Path src, Path dst)
The src file is on the local disk.
voidcopyFromLocalFile(boolean delSrc, boolean overwrite, Path[] srcs, Path dst)
The src files are on the local disk.
voidcopyFromLocalFile(boolean delSrc, boolean overwrite, Path src, Path dst)
The src file is on the local disk.
voidcopyFromLocalFile(boolean delSrc, Path src, Path dst)
The src file is on the local disk.
voidcopyToLocalFile(Path src, Path dst)
Copy it a file from the remote filesystem to the local one.
voidcopyToLocalFile(boolean delSrc, Path src, Path dst)
Copy it a file from a remote filesystem to the local one.
voidcopyToLocalFile(boolean delSrc, Path src, Path dst, boolean useRawLocalFileSystem)
The src file is under this filesystem, and the dst is on the local disk.
FSDataOutputStreamcreate(Path f, boolean overwrite, int bufferSize, short replication, long blockSize)
Create an FSDataOutputStream at the indicated Path.
FSDataOutputStreamcreate(Path f)
Create an FSDataOutputStream at the indicated Path.
FSDataOutputStreamcreate(Path f, boolean overwrite)
Create an FSDataOutputStream at the indicated Path.
FSDataOutputStreamcreate(Path f, Progressable progress)
Create an FSDataOutputStream at the indicated Path with write-progress reporting.
FSDataOutputStreamcreate(Path f, short replication)
Create an FSDataOutputStream at the indicated Path.
FSDataOutputStreamcreate(Path f, boolean overwrite, int bufferSize, Progressable progress)
Create an FSDataOutputStream at the indicated Path with write-progress reporting.
FSDataOutputStreamcreate(FileSystem fs, Path file, FsPermission permission)
Create a file with the provided permission.
FSDataOutputStreamcreate(Path f, short replication, Progressable progress)
Create an FSDataOutputStream at the indicated Path with write-progress reporting.
FSDataOutputStreamcreate(Path f, boolean overwrite, int bufferSize)
Create an FSDataOutputStream at the indicated Path.
FSDataOutputStreamcreate(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress)
Create an FSDataOutputStream at the indicated Path with write-progress reporting.
FSDataOutputStreamcreate(Path f, FsPermission permission, EnumSet flags, int bufferSize, short replication, long blockSize, Progressable progress)
Create an FSDataOutputStream at the indicated Path with write-progress reporting.
FSDataOutputStreamcreate(Path f, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress)
Create an FSDataOutputStream at the indicated Path with write-progress reporting.
FSDataOutputStreamcreate(Path f, FsPermission permission, EnumSet flags, int bufferSize, short replication, long blockSize, Progressable progress, ChecksumOpt checksumOpt)
Create an FSDataOutputStream at the indicated Path with a custom checksum option.
FSDataOutputStreamBuildercreateFile(Path path)
Create a new FSDataOutputStreamBuilder for the file with path.
booleancreateNewFile(Path f)
Creates the given Path as a brand-new zero-length file.
FSDataOutputStreamcreateNonRecursive(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress)
Opens an FSDataOutputStream at the indicated Path with write-progress reporting.
FSDataOutputStreamcreateNonRecursive(Path f, FsPermission permission, EnumSet flags, int bufferSize, short replication, long blockSize, Progressable progress)
Opens an FSDataOutputStream at the indicated Path with write-progress reporting.
PathcreateSnapshot(Path path, String snapshotName)
Create a snapshot.
voidcreateSymlink(final Path target, final Path link, final boolean createParent)
See FileContext#createSymlink(Path,Path,boolean) .
booleandelete(Path f, boolean recursive)
Delete a file.
booleandelete(Path f)
Delete a file/directory.
voidenableSymlinks()
booleanexists(Path f)
Check if a path exists.
FileSystemget(Configuration conf)
Returns the configured FileSystem implementation.
FileSystemget(URI uri, Configuration conf)
Get a FileSystem for this URI's scheme and authority.
AclStatusgetAclStatus(Path path)
Gets the ACL of a file or directory.
ListgetAllStatistics()
Return the FileSystem classes that have Statistics.
StringgetCanonicalServiceName()
Get a canonical service name for this FileSystem.
FileSystem[]getChildFileSystems()
Get all the immediate child FileSystems embedded in this FileSystem.
ConfigurationgetConf()
ContentSummarygetContentSummary(Path f)
Return the ContentSummary of a given Path .
longgetDefaultBlockSize(Path f)
Return the number of bytes that large input files should be optimally be split into to minimize I/O time.
longgetDefaultBlockSize()
Return the number of bytes that large input files should be optimally be split into to minimize I/O time.
shortgetDefaultReplication(Path path)
Get the default replication for a path.
shortgetDefaultReplication()
Get the default replication.
URIgetDefaultUri(Configuration conf)
Get the default FileSystem URI from a configuration.
TokengetDelegationToken(String renewer)
Get a new delegation token for this FileSystem.
BlockLocation[]getFileBlockLocations(FileStatus file, long start, long len)
Return an array containing hostnames, offset and size of portions of the given file.
BlockLocation[]getFileBlockLocations(Path p, long start, long len)
Return an array containing hostnames, offset and size of portions of the given file.
FileChecksumgetFileChecksum(Path f)
Get the checksum of a file, if the FS supports checksums.
FileStatusgetFileLinkStatus(final Path f)
See FileContext#getFileLinkStatus(Path) .
FileStatusgetFileStatus(Path f)
Return a file status object that represents the path.
ClassgetFileSystemClass(String scheme, Configuration conf)
Get the FileSystem implementation class of a filesystem.
PathgetHomeDirectory()
Return the current user's home directory in this FileSystem.
longgetLength(Path f)
The number of bytes in a file.
PathgetLinkTarget(Path f)
See FileContext#getLinkTarget(Path) .
LocalFileSystemgetLocal(Configuration conf)
Get the local FileSystem.
StringgetName()
StringgetScheme()
Return the protocol scheme for this FileSystem.
FsServerDefaultsgetServerDefaults(Path p)
Return a set of server default configuration values.
StatisticsgetStatistics(final String scheme, Class cls)
Get the statistics for a particular file system.
FsStatusgetStatus()
Returns a status object describing the use and capacity of the filesystem.
FsStatusgetStatus(Path p)
Returns a status object describing the use and capacity of the filesystem.
URIgetUri()
Returns a URI which identifies this FileSystem.
longgetUsed()
Return the total size of all files in the filesystem.
PathgetWorkingDirectory()
Get the current working directory for the given FileSystem
byte[]getXAttr(Path path, String name)
Get an xattr name and value for a file or directory.
MapgetXAttrs(Path path)
Get all of the xattr name/value pairs for a file or directory.
MapgetXAttrs(Path path, List names)
Get all of the xattrs name/value pairs for a file or directory.
FileStatus[]globStatus(Path pathPattern)

Return all the files that match filePattern and are not checksum files.

FileStatus[]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.
voidinitialize(URI name, Configuration conf)
Initialize a FileSystem.
booleanisDirectory(Path f)
True iff the named path is a directory.
booleanisFile(Path f)
True iff the named path is a regular file.
RemoteIteratorlistFiles(final Path f, final boolean recursive)
List the statuses and block locations of the files in the given path.
RemoteIteratorlistLocatedStatus(final Path f)
List the statuses of the files/directories in the given path if the path is a directory.
FileStatus[]listStatus(Path f, PathFilter filter)
Filter files/directories in the given path using the user-supplied path filter.
FileStatus[]listStatus(Path[] files, PathFilter filter)
Filter files/directories in the given list of paths using user-supplied path filter.
FileStatus[]listStatus(Path f)
List the statuses of the files/directories in the given path if the path is a directory.
FileStatus[]listStatus(Path[] files)
Filter files/directories in the given list of paths using default path filter.
ListlistXAttrs(Path path)
Get all of the xattr names for a file or directory.
PathmakeQualified(Path path)
Qualify a path to one which uses this FileSystem and, if relative, made absolute.
booleanmkdirs(Path f)
Call #mkdirs(Path,FsPermission) with default permission.
booleanmkdirs(FileSystem fs, Path dir, FsPermission permission)
Create a directory with the provided permission.
booleanmkdirs(Path f, FsPermission permission)
Make the given file and all non-existent parents into directories.
voidmodifyAclEntries(Path path, List aclSpec)
Modifies ACL entries of files and directories.
voidmoveFromLocalFile(Path[] srcs, Path dst)
The src files is on the local disk.
voidmoveFromLocalFile(Path src, Path dst)
The src file is on the local disk.
FileSystemnewInstance(URI uri, Configuration config)
Returns the FileSystem for this URI's scheme and authority.
FileSystemnewInstance(Configuration conf)
Returns a unique configured FileSystem implementation for the default filesystem of the supplied configuration.
FileSystemnewInstance(final URI uri, final Configuration conf, final String user)
Returns the FileSystem for this URI's scheme and authority and the given user.
LocalFileSystemnewInstanceLocal(Configuration conf)
Get a unique local FileSystem object.
FSDataInputStreamopen(Path f)
Opens an FSDataInputStream at the indicated Path.
FSDataInputStreamopen(PathHandle fd)
Open an FSDataInputStream matching the PathHandle instance.
FSDataInputStreamopen(Path f, int bufferSize)
Opens an FSDataInputStream at the indicated Path.
FSDataInputStreamopen(PathHandle fd, int bufferSize)
Open an FSDataInputStream matching the PathHandle instance.
voidremoveAcl(Path path)
Removes all but the base ACL entries of files and directories.
voidremoveAclEntries(Path path, List aclSpec)
Removes ACL entries from files and directories.
voidremoveDefaultAcl(Path path)
Removes all default ACL entries from files and directories.
voidremoveXAttr(Path path, String name)
Remove an xattr of a file or directory.
booleanrename(Path src, Path dst)
Renames Path src to Path dst.
PathresolvePath(final Path p)
Return the fully-qualified path of path, resolving the path through any symlinks or mount point.
voidsetAcl(Path path, List aclSpec)
Fully replaces ACL of files and directories, discarding all existing entries.
voidsetConf(Configuration conf)
voidsetDefaultUri(Configuration conf, URI uri)
Set the default FileSystem URI in a configuration.
voidsetDefaultUri(Configuration conf, String uri)
Set the default FileSystem URI in a configuration.
voidsetOwner(Path p, String username, String groupname)
Set owner of a path (i.e.
voidsetPermission(Path p, FsPermission permission)
Set permission of a path.
booleansetReplication(Path src, short replication)
Set the replication for an existing file.
voidsetTimes(Path p, long mtime, long atime)
Set access time of a file.
voidsetVerifyChecksum(boolean verifyChecksum)
Set the verify checksum flag.
voidsetWorkingDirectory(Path new_dir)
Set the current working directory for the given FileSystem.
voidsetWriteChecksum(boolean writeChecksum)
Set the write checksum flag.
voidsetXAttr(Path path, String name, byte[] value, EnumSet flag)
Set an xattr of a file or directory.
PathstartLocalOutput(Path fsOutputFile, Path tmpLocalFile)
Returns a local file that the user can write output to.
booleantruncate(Path f, long newLength)
Truncate the file in the indicated path to the indicated size.