Package org.apache.hadoop.fs.permission
Class AclStatus.Builder
java.lang.Object
org.apache.hadoop.fs.permission.AclStatus.Builder
- Enclosing class:
- AclStatus
Builder for creating new Acl instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEntries(Iterable<AclEntry> entries) Adds a list of ACL entries.Adds an ACL entry.build()Builds a new AclStatus populated with the set properties.Sets the file group.Sets the file owner.setPermission(FsPermission permission) Sets the permission for the file.stickyBit(boolean stickyBit) Sets sticky bit.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
owner
Sets the file owner.- Parameters:
owner- String file owner- Returns:
- Builder this builder, for call chaining
-
group
Sets the file group.- Parameters:
group- String file group- Returns:
- Builder this builder, for call chaining
-
addEntry
Adds an ACL entry.- Parameters:
e- AclEntry entry to add- Returns:
- Builder this builder, for call chaining
-
addEntries
Adds a list of ACL entries.- Parameters:
entries- AclEntry entries to add- Returns:
- Builder this builder, for call chaining
-
stickyBit
Sets sticky bit. If this method is not called, then the builder assumes false.- Parameters:
stickyBit- boolean sticky bit- Returns:
- Builder this builder, for call chaining
-
setPermission
Sets the permission for the file.- Parameters:
permission- permission.- Returns:
- Builder.
-
build
Builds a new AclStatus populated with the set properties.- Returns:
- AclStatus new AclStatus
-