| Package | Description |
|---|---|
| org.apache.hadoop.fs |
An abstract file system API.
|
| org.apache.hadoop.fs.ftp | |
| org.apache.hadoop.fs.impl |
This package contains implementation classes for use inside
filesystems.
|
| org.apache.hadoop.fs.permission |
This package provides support for HDFS permission and ACL.
|
| org.apache.hadoop.fs.sftp |
SFTP FileSystem package.
|
| org.apache.hadoop.fs.viewfs |
ViewFileSystem and ViewFileSystemOverloadScheme classes.
|
| org.apache.hadoop.util |
Common utilities.
|
| Modifier and Type | Field | Description |
|---|---|---|
static FsPermission |
FileContext.DEFAULT_PERM |
Default permission for directory and symlink
In previous versions, this default permission was also used to
create files, so files created end up with ugo+x permission.
|
static FsPermission |
FileContext.DIR_DEFAULT_PERM |
Default permission for directory
|
static FsPermission |
FileContext.FILE_DEFAULT_PERM |
Default permission for file
|
| Modifier and Type | Method | Description |
|---|---|---|
FsPermission |
FileStatus.getPermission() |
Get FsPermission associated with the file.
|
protected FsPermission |
FSDataOutputStreamBuilder.getPermission() |
|
FsPermission |
FileContext.getUMask() |
|
FsPermission |
Options.CreateOpts.Perms.getValue() |
| Modifier and Type | Method | Description |
|---|---|---|
FSDataOutputStream |
ChecksumFileSystem.create(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
|
FSDataOutputStream |
ChecksumFileSystem.create(Path f,
FsPermission permission,
java.util.EnumSet<CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
Options.ChecksumOpt checksumOpt) |
|
static FSDataOutputStream |
FileSystem.create(FileSystem fs,
Path file,
FsPermission permission) |
Create a file with the provided permission.
|
abstract FSDataOutputStream |
FileSystem.create(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.
|
FSDataOutputStream |
FileSystem.create(Path f,
FsPermission permission,
java.util.EnumSet<CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
Create an FSDataOutputStream at the indicated Path with write-progress
reporting.
|
FSDataOutputStream |
FileSystem.create(Path f,
FsPermission permission,
java.util.EnumSet<CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
Options.ChecksumOpt checksumOpt) |
Create an FSDataOutputStream at the indicated Path with a custom
checksum option.
|
FSDataOutputStream |
FilterFileSystem.create(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
|
FSDataOutputStream |
FilterFileSystem.create(Path f,
FsPermission permission,
java.util.EnumSet<CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
Options.ChecksumOpt checksumOpt) |
|
FSDataOutputStream |
HarFileSystem.create(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
|
FSDataOutputStream |
RawLocalFileSystem.create(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
|
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. |
FSDataOutputStream |
ChecksumFs.createInternal(Path f,
java.util.EnumSet<CreateFlag> createFlag,
FsPermission absolutePermission,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
Options.ChecksumOpt checksumOpt,
boolean createParent) |
|
FSDataOutputStream |
DelegateToFileSystem.createInternal(Path f,
java.util.EnumSet<CreateFlag> flag,
FsPermission absolutePermission,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
Options.ChecksumOpt checksumOpt,
boolean createParent) |
|
FSDataOutputStream |
FilterFs.createInternal(Path f,
java.util.EnumSet<CreateFlag> flag,
FsPermission absolutePermission,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
Options.ChecksumOpt checksumOpt,
boolean createParent) |
|
FSDataOutputStream |
ChecksumFileSystem.createNonRecursive(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
|
FSDataOutputStream |
ChecksumFileSystem.createNonRecursive(Path f,
FsPermission permission,
java.util.EnumSet<CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
|
FSDataOutputStream |
FileSystem.createNonRecursive(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.
|
FSDataOutputStream |
FileSystem.createNonRecursive(Path f,
FsPermission permission,
java.util.EnumSet<CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
Opens an FSDataOutputStream at the indicated Path with write-progress
reporting.
|
FSDataOutputStream |
FilterFileSystem.createNonRecursive(Path f,
FsPermission permission,
java.util.EnumSet<CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
|
FSDataOutputStream |
RawLocalFileSystem.createNonRecursive(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
|
FSDataOutputStream |
RawLocalFileSystem.createNonRecursive(Path f,
FsPermission permission,
java.util.EnumSet<CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
|
protected java.io.OutputStream |
RawLocalFileSystem.createOutputStreamWithMode(Path f,
boolean append,
FsPermission permission) |
|
abstract void |
AbstractFileSystem.mkdir(Path dir,
FsPermission permission,
boolean createParent) |
The specification of this method matches that of
FileContext.mkdir(Path, FsPermission, boolean) except that the Path
f must be fully qualified and the permission is absolute (i.e. |
void |
DelegateToFileSystem.mkdir(Path dir,
FsPermission permission,
boolean createParent) |
|
void |
FileContext.mkdir(Path dir,
FsPermission permission,
boolean createParent) |
Make(create) a directory and all the non-existent parents.
|
void |
FilterFs.mkdir(Path dir,
FsPermission permission,
boolean createParent) |
|
static boolean |
FileSystem.mkdirs(FileSystem fs,
Path dir,
FsPermission permission) |
Create a directory with the provided permission.
|
abstract boolean |
FileSystem.mkdirs(Path f,
FsPermission permission) |
Make the given file and all non-existent parents into
directories.
|
boolean |
FilterFileSystem.mkdirs(Path f,
FsPermission permission) |
|
boolean |
HarFileSystem.mkdirs(Path f,
FsPermission permission) |
not implemented.
|
boolean |
RawLocalFileSystem.mkdirs(Path f,
FsPermission permission) |
|
protected boolean |
RawLocalFileSystem.mkOneDirWithMode(Path p,
java.io.File p2f,
FsPermission permission) |
|
B |
FSDataOutputStreamBuilder.permission(FsPermission perm) |
Set permission for the file.
|
B |
MultipartUploaderBuilder.permission(FsPermission perm) |
Set permission for the file.
|
static Options.CreateOpts.Perms |
Options.CreateOpts.perms(FsPermission perm) |
|
protected FSDataOutputStream |
FileSystem.primitiveCreate(Path f,
FsPermission absolutePermission,
java.util.EnumSet<CreateFlag> flag,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
Options.ChecksumOpt checksumOpt) |
Deprecated.
|
protected FSDataOutputStream |
FilterFileSystem.primitiveCreate(Path f,
FsPermission absolutePermission,
java.util.EnumSet<CreateFlag> flag,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
Options.ChecksumOpt checksumOpt) |
|
protected boolean |
FileSystem.primitiveMkdir(Path f,
FsPermission absolutePermission) |
Deprecated.
|
protected void |
FileSystem.primitiveMkdir(Path f,
FsPermission absolutePermission,
boolean createParent) |
Deprecated.
|
protected boolean |
FilterFileSystem.primitiveMkdir(Path f,
FsPermission abdolutePermission) |
|
abstract void |
AbstractFileSystem.setPermission(Path f,
FsPermission permission) |
The specification of this method matches that of
FileContext.setPermission(Path, FsPermission) except that Path f
must be for this file system. |
void |
ChecksumFileSystem.setPermission(Path src,
FsPermission permission) |
|
void |
DelegateToFileSystem.setPermission(Path f,
FsPermission permission) |
|
void |
FileContext.setPermission(Path f,
FsPermission permission) |
Set permission of a path.
|
protected void |
FileStatus.setPermission(FsPermission permission) |
Sets permission.
|
void |
FileSystem.setPermission(Path p,
FsPermission permission) |
Set permission of a path.
|
static void |
FileUtil.setPermission(java.io.File f,
FsPermission permission) |
Set permissions to the required value.
|
void |
FilterFileSystem.setPermission(Path p,
FsPermission permission) |
|
void |
FilterFs.setPermission(Path f,
FsPermission permission) |
|
void |
HarFileSystem.setPermission(Path p,
FsPermission permission) |
Not implemented.
|
void |
RawLocalFileSystem.setPermission(Path p,
FsPermission permission) |
Use the command chmod to set permission.
|
void |
FileContext.setUMask(FsPermission newUmask) |
Set umask to the supplied parameter.
|
| Constructor | Description |
|---|---|
FileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
java.lang.String owner,
java.lang.String group,
Path path) |
Constructor for file systems on which symbolic links are not supported
|
FileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
java.lang.String owner,
java.lang.String group,
Path symlink,
Path path) |
|
FileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
java.lang.String owner,
java.lang.String group,
Path symlink,
Path path,
boolean hasAcl,
boolean isEncrypted,
boolean isErasureCoded) |
|
FileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
java.lang.String owner,
java.lang.String group,
Path symlink,
Path path,
java.util.Set<FileStatus.AttrFlags> attr) |
|
LocatedFileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
java.lang.String owner,
java.lang.String group,
Path symlink,
Path path,
boolean hasAcl,
boolean isEncrypted,
boolean isErasureCoded,
BlockLocation[] locations) |
Constructor.
|
LocatedFileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
java.lang.String owner,
java.lang.String group,
Path symlink,
Path path,
java.util.Set<FileStatus.AttrFlags> attr,
BlockLocation[] locations) |
Constructor.
|
LocatedFileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
java.lang.String owner,
java.lang.String group,
Path symlink,
Path path,
BlockLocation[] locations) |
Deprecated.
|
Perms(FsPermission perm) |
| Modifier and Type | Method | Description |
|---|---|---|
FSDataOutputStream |
FTPFileSystem.create(Path file,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
A stream obtained via this call must be closed before using other APIs of
this class or else the invocation will block.
|
boolean |
FTPFileSystem.mkdirs(Path file,
FsPermission permission) |
| Modifier and Type | Method | Description |
|---|---|---|
FsPermission |
FileSystemMultipartUploaderBuilder.getPermission() |
|
protected FsPermission |
MultipartUploaderBuilderImpl.getPermission() |
| Modifier and Type | Method | Description |
|---|---|---|
B |
MultipartUploaderBuilderImpl.permission(FsPermission perm) |
Set permission for the file.
|
| Modifier and Type | Class | Description |
|---|---|---|
class |
FsCreateModes |
A class that stores both masked and unmasked create modes
and is a drop-in replacement for masked permission.
|
| Modifier and Type | Method | Description |
|---|---|---|
static FsPermission |
FsCreateModes.applyUMask(FsPermission mode,
FsPermission umask) |
Create from unmasked mode and umask.
|
FsPermission |
FsPermission.applyUMask(FsPermission umask) |
Apply a umask to this permission and return a new one.
|
static FsPermission |
FsPermission.createImmutable(short permission) |
Create an immutable
FsPermission object. |
static FsPermission |
FsPermission.getCachePoolDefault() |
Get the default permission for cache pools.
|
static FsPermission |
FsPermission.getDefault() |
Get the default permission for directory and symlink.
|
static FsPermission |
FsPermission.getDirDefault() |
Get the default permission for directory.
|
static FsPermission |
FsPermission.getFileDefault() |
Get the default permission for file.
|
FsPermission |
FsCreateModes.getMasked() |
|
FsPermission |
FsPermission.getMasked() |
Get masked permission if exists.
|
FsPermission |
AclStatus.getPermission() |
Returns the permission set for the path
|
FsPermission |
PermissionStatus.getPermission() |
Return permission.
|
static FsPermission |
FsPermission.getUMask(Configuration conf) |
Get the user file creation mask (umask)
UMASK_LABEL config param has umask value that is either symbolic
or octal. |
FsPermission |
FsCreateModes.getUnmasked() |
|
FsPermission |
FsPermission.getUnmasked() |
Get unmasked permission if exists.
|
static FsPermission |
FsPermission.read(java.io.DataInput in) |
Create and initialize a
FsPermission from DataInput. |
static FsPermission |
FsPermission.valueOf(java.lang.String unixSymbolicPermission) |
Create a FsPermission from a Unix symbolic permission string
|
| Modifier and Type | Method | Description |
|---|---|---|
static FsPermission |
FsCreateModes.applyUMask(FsPermission mode,
FsPermission umask) |
Create from unmasked mode and umask.
|
FsPermission |
FsPermission.applyUMask(FsPermission umask) |
Apply a umask to this permission and return a new one.
|
static FsCreateModes |
FsCreateModes.create(FsPermission masked,
FsPermission unmasked) |
Create from masked and unmasked modes.
|
static PermissionStatus |
PermissionStatus.createImmutable(java.lang.String user,
java.lang.String group,
FsPermission permission) |
Create an immutable
PermissionStatus object. |
static java.util.List<AclEntry> |
AclUtil.getAclFromPermAndEntries(FsPermission perm,
java.util.List<AclEntry> entries) |
Given permissions and extended ACL entries, returns the full logical ACL.
|
FsAction |
AclStatus.getEffectivePermission(AclEntry entry,
FsPermission permArg) |
Get the effective permission for the AclEntry.
|
static java.util.List<AclEntry> |
AclUtil.getMinimalAcl(FsPermission perm) |
Translates the given permission bits to the equivalent minimal ACL.
|
AclStatus.Builder |
AclStatus.Builder.setPermission(FsPermission permission) |
Sets the permission for the file.
|
static void |
FsPermission.setUMask(Configuration conf,
FsPermission umask) |
Set the user file creation mask (umask)
|
static void |
PermissionStatus.write(java.io.DataOutput out,
java.lang.String username,
java.lang.String groupname,
FsPermission permission) |
Serialize a
PermissionStatus from its base components. |
| Constructor | Description |
|---|---|
FsPermission(FsPermission other) |
Copy constructor
|
PermissionStatus(java.lang.String user,
java.lang.String group,
FsPermission permission) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
FSDataOutputStream |
SFTPFileSystem.create(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
A stream obtained via this call must be closed before using other APIs of
this class or else the invocation will block.
|
boolean |
SFTPFileSystem.mkdirs(Path f,
FsPermission permission) |
| Modifier and Type | Field | Description |
|---|---|---|
static FsPermission |
Constants.PERMISSION_555 |
| Modifier and Type | Method | Description |
|---|---|---|
FSDataOutputStream |
ViewFileSystem.create(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
|
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) |
|
FSDataOutputStream |
ViewFileSystem.createNonRecursive(Path f,
FsPermission permission,
java.util.EnumSet<CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
|
void |
ViewFs.mkdir(Path dir,
FsPermission permission,
boolean createParent) |
|
boolean |
ViewFileSystem.mkdirs(Path dir,
FsPermission permission) |
|
void |
ViewFileSystem.setPermission(Path f,
FsPermission permission) |
|
void |
ViewFs.setPermission(Path f,
FsPermission permission) |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
DiskChecker.checkDir(LocalFileSystem localFS,
Path dir,
FsPermission expected) |
Create the local directory if necessary, check permissions and also ensure
it can be read from and written into.
|
static void |
DiskChecker.checkDirWithDiskIo(LocalFileSystem localFS,
Path dir,
FsPermission expected) |
Create the local directory if necessary, also ensure permissions
allow it to be read from and written into.
|
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.