Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
com.cloudera.impala.util.FsPermissionChecker.Permissions Class Reference
Collaboration diagram for com.cloudera.impala.util.FsPermissionChecker.Permissions:

Public Member Functions

boolean checkPermissions (FsAction action)
 
boolean canRead ()
 
boolean canWrite ()
 
boolean canReadAndWrite ()
 

Protected Member Functions

 Permissions (FileStatus fileStatus, AclStatus aclStatus)
 

Private Member Functions

boolean shouldApplyMask (AclEntry acl)
 
boolean isApplicableAcl (AclEntry e)
 
Boolean checkAcls (FsAction action)
 
List< AclEntry > getAclFromPermAndEntries (FsPermission perm, List< AclEntry > entries)
 

Private Attributes

final FileStatus fileStatus_
 
final FsPermission permissions_
 
final AclStatus aclStatus_
 
Map< AclEntryType, List
< AclEntry > > 
entriesByTypes_ = Maps.newHashMap()
 
AclEntry mask_
 

Detailed Description

Allows checking different access permissions of a file without repeatedly accessing the underlying filesystem by caching the results of a status call at construction.

Definition at line 80 of file FsPermissionChecker.java.

Constructor & Destructor Documentation

Member Function Documentation

boolean com.cloudera.impala.util.FsPermissionChecker.Permissions.canRead ( )
inline
boolean com.cloudera.impala.util.FsPermissionChecker.Permissions.canReadAndWrite ( )
inline
boolean com.cloudera.impala.util.FsPermissionChecker.Permissions.canWrite ( )
inline
Boolean com.cloudera.impala.util.FsPermissionChecker.Permissions.checkAcls ( FsAction  action)
inlineprivate
boolean com.cloudera.impala.util.FsPermissionChecker.Permissions.checkPermissions ( FsAction  action)
inline
List<AclEntry> com.cloudera.impala.util.FsPermissionChecker.Permissions.getAclFromPermAndEntries ( FsPermission  perm,
List< AclEntry >  entries 
)
inlineprivate
boolean com.cloudera.impala.util.FsPermissionChecker.Permissions.isApplicableAcl ( AclEntry  e)
inlineprivate

Returns true if this ACL applies to the current user and / or group

Definition at line 134 of file FsPermissionChecker.java.

References com.cloudera.impala.util.FsPermissionChecker.Permissions.aclStatus_.

Referenced by com.cloudera.impala.util.FsPermissionChecker.Permissions.Permissions().

boolean com.cloudera.impala.util.FsPermissionChecker.Permissions.shouldApplyMask ( AclEntry  acl)
inlineprivate

Returns true if the mask should apply. The mask ACL applies only to unnamed user ACLs (e.g. user::r-x), and all group ACLs.

Definition at line 119 of file FsPermissionChecker.java.

References com.cloudera.impala.util.FsPermissionChecker.Permissions.mask_.

Referenced by com.cloudera.impala.util.FsPermissionChecker.Permissions.checkAcls().

Member Data Documentation

Map<AclEntryType, List<AclEntry> > com.cloudera.impala.util.FsPermissionChecker.Permissions.entriesByTypes_ = Maps.newHashMap()
private
final FileStatus com.cloudera.impala.util.FsPermissionChecker.Permissions.fileStatus_
private
final FsPermission com.cloudera.impala.util.FsPermissionChecker.Permissions.permissions_
private

The documentation for this class was generated from the following file: