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

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

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

origin: org.apache.hadoop/hadoop-hdfs

/** @return a string for throwing {@link AccessControlException} */
private String toAccessControlString(INodeAttributes inodeAttrib, String path,
  FsAction access) {
 return toAccessControlString(inodeAttrib, path, access, false);
}
origin: org.apache.hadoop/hadoop-hdfs

/** Guarded by {@link FSNamesystem#readLock()} */
private void check(INodeAttributes[] inodes, byte[][] components, int i,
  FsAction access) throws AccessControlException {
 INodeAttributes inode = (i >= 0) ? inodes[i] : null;
 if (inode != null && !hasPermission(inode, access)) {
  throw new AccessControlException(
    toAccessControlString(inode, getPath(components, 0, i), access));
 }
}
origin: org.apache.hadoop/hadoop-hdfs

if (!hasPermission(inodeAttr, access)) {
 throw new AccessControlException(
   toAccessControlString(inodeAttr, d.getFullPathName(), access));
origin: org.apache.hadoop/hadoop-hdfs

} catch (AccessControlException ace) {
 throw new AccessControlException(
   toAccessControlString(inode, inode.getFullPathName(), access));
origin: ch.cern.hadoop/hadoop-hdfs

/** @return a string for throwing {@link AccessControlException} */
private String toAccessControlString(INodeAttributes inodeAttrib, String path,
  FsAction access) {
 return toAccessControlString(inodeAttrib, path, access, false);
}
origin: io.prestosql.hadoop/hadoop-apache

/** @return a string for throwing {@link AccessControlException} */
private String toAccessControlString(INodeAttributes inodeAttrib, String path,
  FsAction access) {
 return toAccessControlString(inodeAttrib, path, access, false);
}
origin: io.prestosql.hadoop/hadoop-apache

/** Guarded by {@link FSNamesystem#readLock()} */
private void check(INodeAttributes[] inodes, int i, FsAction access)
  throws AccessControlException {
 INodeAttributes inode = (i >= 0) ? inodes[i] : null;
 if (inode != null && !hasPermission(inode, access)) {
  throw new AccessControlException(
    toAccessControlString(inode, constructPath(inodes, i), access));
 }
}
origin: ch.cern.hadoop/hadoop-hdfs

/** Guarded by {@link FSNamesystem#readLock()} */
private void check(INodeAttributes[] inodes, int i, FsAction access)
  throws AccessControlException {
 INodeAttributes inode = (i >= 0) ? inodes[i] : null;
 if (inode != null && !hasPermission(inode, access)) {
  throw new AccessControlException(
    toAccessControlString(inode, constructPath(inodes, i), access));
 }
}
origin: ch.cern.hadoop/hadoop-hdfs

/** Guarded by {@link FSNamesystem#readLock()} */
private void checkSubAccess(byte[][] components, int pathIdx,
  INode inode, int snapshotId, FsAction access, boolean ignoreEmptyDir)
  throws AccessControlException {
 if (inode == null || !inode.isDirectory()) {
  return;
 }
 Stack<INodeDirectory> directories = new Stack<INodeDirectory>();
 for(directories.push(inode.asDirectory()); !directories.isEmpty(); ) {
  INodeDirectory d = directories.pop();
  ReadOnlyList<INode> cList = d.getChildrenList(snapshotId);
  if (!(cList.isEmpty() && ignoreEmptyDir)) {
   //TODO have to figure this out with inodeattribute provider
   INodeAttributes inodeAttr =
     getINodeAttrs(components, pathIdx, d, snapshotId);
   if (!hasPermission(inodeAttr, access)) {
    throw new AccessControlException(
      toAccessControlString(inodeAttr, d.getFullPathName(), access));
   }
  }
  for(INode child : cList) {
   if (child.isDirectory()) {
    directories.push(child.asDirectory());
   }
  }
 }
}
origin: io.prestosql.hadoop/hadoop-apache

/** Guarded by {@link FSNamesystem#readLock()} */
private void checkSubAccess(byte[][] components, int pathIdx,
  INode inode, int snapshotId, FsAction access, boolean ignoreEmptyDir)
  throws AccessControlException {
 if (inode == null || !inode.isDirectory()) {
  return;
 }
 Stack<INodeDirectory> directories = new Stack<INodeDirectory>();
 for(directories.push(inode.asDirectory()); !directories.isEmpty(); ) {
  INodeDirectory d = directories.pop();
  ReadOnlyList<INode> cList = d.getChildrenList(snapshotId);
  if (!(cList.isEmpty() && ignoreEmptyDir)) {
   //TODO have to figure this out with inodeattribute provider
   INodeAttributes inodeAttr =
     getINodeAttrs(components, pathIdx, d, snapshotId);
   if (!hasPermission(inodeAttr, access)) {
    throw new AccessControlException(
      toAccessControlString(inodeAttr, d.getFullPathName(), access));
   }
  }
  for(INode child : cList) {
   if (child.isDirectory()) {
    directories.push(child.asDirectory());
   }
  }
 }
}
origin: ch.cern.hadoop/hadoop-hdfs

/** Guarded by {@link FSNamesystem#readLock()} */
private void checkTraverse(INodeAttributes[] inodeAttrs, int last)
  throws AccessControlException {
 for (int i=0; i <= last; i++) {
  INodeAttributes inode = inodeAttrs[i];
  if (!inode.isDirectory()) {
   throw new AccessControlException(
     constructPath(inodeAttrs, i) + " (is not a directory)");
  }
  if (!hasPermission(inode, FsAction.EXECUTE)) {
   throw new AccessControlException(toAccessControlString(
     inode, constructPath(inodeAttrs, i), FsAction.EXECUTE));
  }
 }
}
origin: io.prestosql.hadoop/hadoop-apache

/** Guarded by {@link FSNamesystem#readLock()} */
private void checkTraverse(INodeAttributes[] inodeAttrs, int last)
  throws AccessControlException {
 for (int i=0; i <= last; i++) {
  INodeAttributes inode = inodeAttrs[i];
  if (!inode.isDirectory()) {
   throw new AccessControlException(
     constructPath(inodeAttrs, i) + " (is not a directory)");
  }
  if (!hasPermission(inode, FsAction.EXECUTE)) {
   throw new AccessControlException(toAccessControlString(
     inode, constructPath(inodeAttrs, i), FsAction.EXECUTE));
  }
 }
}
org.apache.hadoop.hdfs.server.namenodeFSPermissionCheckertoAccessControlString

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,
  • constructPath,
  • containsGroup,
  • isMemberOfGroup,
  • checkIsDirectory

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • setScale (BigDecimal)
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Best plugins for Eclipse
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