Tabnine Logo
FSPermissionChecker.containsGroup
Code IndexAdd Tabnine to your IDE (free)

How to use
containsGroup
method
in
org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker

Best Java code snippets using org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.containsGroup (Showing top 2 results out of 315)

origin: com.facebook.hadoop/hadoop-core

 throw new AccessControlException("Non-super user cannot change owner.");
if (group != null && !pc.containsGroup(group)) {
 throw new AccessControlException("User does not belong to " + group
  + " .");
origin: io.prestosql.hadoop/hadoop-apache

static HdfsFileStatus setOwner(
  FSDirectory fsd, String src, String username, String group)
  throws IOException {
 FSPermissionChecker pc = fsd.getPermissionChecker();
 INodesInPath iip;
 fsd.writeLock();
 try {
  iip = fsd.resolvePathForWrite(pc, src);
  src = iip.getPath();
  fsd.checkOwner(pc, iip);
  if (!pc.isSuperUser()) {
   if (username != null && !pc.getUser().equals(username)) {
    throw new AccessControlException("User " + username
      + " is not a super user (non-super user cannot change owner).");
   }
   if (group != null && !pc.containsGroup(group)) {
    throw new AccessControlException(
      "User " + username + " does not belong to " + group);
   }
  }
  unprotectedSetOwner(fsd, src, username, group);
 } finally {
  fsd.writeUnlock();
 }
 fsd.getEditLog().logSetOwner(src, username, group);
 return fsd.getAuditFileInfo(iip);
}
org.apache.hadoop.hdfs.server.namenodeFSPermissionCheckercontainsGroup

Popular methods of FSPermissionChecker

  • checkPermission
    Check whether current user have permissions to access the path. Traverse is always checked. Parent p
  • <init>
  • check
    Guarded by FSNamesystem#readLock()
  • checkOwner
    Guarded by FSNamesystem#readLock()
  • checkSubAccess
    Guarded by FSNamesystem#readLock()
  • checkTraverse
    Guarded by FSNamesystem#readLock()
  • checkStickyBit
    Guarded by FSNamesystem#readLock()
  • checkSuperuserPrivilege
    Verify if the caller has the required permission. This will result into an exception if the caller i
  • getAccessControlEnforcer
  • getAttributesProvider
  • getINodeAttrs
  • getUser
  • getINodeAttrs,
  • getUser,
  • hasAclPermission,
  • hasPermission,
  • isSuperUser,
  • toAccessControlString,
  • constructPath,
  • isMemberOfGroup,
  • checkIsDirectory

Popular in Java

  • Updating database using SQL prepared statement
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • ImageIO (javax.imageio)
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Table (org.hibernate.mapping)
    A relational table
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now