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

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

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

origin: org.apache.hadoop/hadoop-hdfs

void checkSuperuserPrivilege(FSPermissionChecker pc)
  throws AccessControlException {
 if (isPermissionEnabled) {
  pc.checkSuperuserPrivilege();
 }
}
origin: org.apache.hadoop/hadoop-hdfs

void checkSuperuserPrivilege() throws AccessControlException {
 if (isPermissionEnabled) {
  FSPermissionChecker pc = getPermissionChecker();
  pc.checkSuperuserPrivilege();
 }
}
origin: org.apache.hadoop/hadoop-hdfs

static CachePoolInfo addCachePool(
  FSNamesystem fsn, CacheManager cacheManager, CachePoolInfo req,
  boolean logRetryCache)
  throws IOException {
 final FSPermissionChecker pc = getFsPermissionChecker(fsn);
 if (pc != null) {
  pc.checkSuperuserPrivilege();
 }
 CachePoolInfo info = cacheManager.addCachePool(req);
 fsn.getEditLog().logAddCachePool(info, logRetryCache);
 return info;
}
origin: org.apache.hadoop/hadoop-hdfs

static void modifyCachePool(
  FSNamesystem fsn, CacheManager cacheManager, CachePoolInfo req,
  boolean logRetryCache) throws IOException {
 final FSPermissionChecker pc = getFsPermissionChecker(fsn);
 if (pc != null) {
  pc.checkSuperuserPrivilege();
 }
 cacheManager.modifyCachePool(req);
 fsn.getEditLog().logModifyCachePool(req, logRetryCache);
}
origin: org.apache.hadoop/hadoop-hdfs

static void removeCachePool(
  FSNamesystem fsn, CacheManager cacheManager, String cachePoolName,
  boolean logRetryCache) throws IOException {
 final FSPermissionChecker pc = getFsPermissionChecker(fsn);
 if (pc != null) {
  pc.checkSuperuserPrivilege();
 }
 cacheManager.removeCachePool(cachePoolName);
 fsn.getEditLog().logRemoveCachePool(cachePoolName, logRetryCache);
}
origin: org.apache.hadoop/hadoop-hdfs

 break;
default:
 pc.checkSuperuserPrivilege();
 break;
origin: ch.cern.hadoop/hadoop-hdfs

@Override
public void checkSuperuserPrivilege()
  throws AccessControlException {
 if (isPermissionEnabled) {
  FSPermissionChecker pc = getPermissionChecker();
  pc.checkSuperuserPrivilege();
 }
}
origin: org.apache.hadoop/hadoop-hdfs

/**
 * Set the namespace, storagespace and typespace quota for a directory.
 *
 * Note: This does not support ".inodes" relative path.
 */
static void setQuota(FSDirectory fsd, FSPermissionChecker pc, String src,
  long nsQuota, long ssQuota, StorageType type) throws IOException {
 if (fsd.isPermissionEnabled()) {
  pc.checkSuperuserPrivilege();
 }
 fsd.writeLock();
 try {
  INodesInPath iip = fsd.resolvePath(pc, src, DirOp.WRITE);
  INodeDirectory changed =
    unprotectedSetQuota(fsd, iip, nsQuota, ssQuota, type);
  if (changed != null) {
   final QuotaCounts q = changed.getQuotaCounts();
   if (type == null) {
    fsd.getEditLog().logSetQuota(src, q.getNameSpace(), q.getStorageSpace());
   } else {
    fsd.getEditLog().logSetQuotaByStorageType(
      src, q.getTypeSpaces().get(type), type);
   }
  }
 } finally {
  fsd.writeUnlock();
 }
}
origin: io.prestosql.hadoop/hadoop-apache

@Override
public void checkSuperuserPrivilege()
  throws AccessControlException {
 if (isPermissionEnabled) {
  FSPermissionChecker pc = getPermissionChecker();
  pc.checkSuperuserPrivilege();
 }
}
origin: ch.cern.hadoop/hadoop-hdfs

INodesInPath resolvePath(FSPermissionChecker pc, String src,
  boolean resolveLink) throws UnresolvedLinkException,
FileNotFoundException, AccessControlException {
 byte[][] components = INode.getPathComponents(src);
 if (isPermissionEnabled && pc != null && isReservedRawName(components)) {
  pc.checkSuperuserPrivilege();
 }
 components = resolveComponents(components, this);
 return INodesInPath.resolve(rootDir, components, resolveLink);
}
origin: io.prestosql.hadoop/hadoop-apache

static void modifyCachePool(
  FSNamesystem fsn, CacheManager cacheManager, CachePoolInfo req,
  boolean logRetryCache) throws IOException {
 final FSPermissionChecker pc = getFsPermissionChecker(fsn);
 if (pc != null) {
  pc.checkSuperuserPrivilege();
 }
 cacheManager.modifyCachePool(req);
 fsn.getEditLog().logModifyCachePool(req, logRetryCache);
}
origin: io.prestosql.hadoop/hadoop-apache

static void removeCachePool(
  FSNamesystem fsn, CacheManager cacheManager, String cachePoolName,
  boolean logRetryCache) throws IOException {
 final FSPermissionChecker pc = getFsPermissionChecker(fsn);
 if (pc != null) {
  pc.checkSuperuserPrivilege();
 }
 cacheManager.removeCachePool(cachePoolName);
 fsn.getEditLog().logRemoveCachePool(cachePoolName, logRetryCache);
}
origin: ch.cern.hadoop/hadoop-hdfs

static void removeCachePool(
  FSNamesystem fsn, CacheManager cacheManager, String cachePoolName,
  boolean logRetryCache) throws IOException {
 final FSPermissionChecker pc = getFsPermissionChecker(fsn);
 if (pc != null) {
  pc.checkSuperuserPrivilege();
 }
 cacheManager.removeCachePool(cachePoolName);
 fsn.getEditLog().logRemoveCachePool(cachePoolName, logRetryCache);
}
origin: io.prestosql.hadoop/hadoop-apache

static CachePoolInfo addCachePool(
  FSNamesystem fsn, CacheManager cacheManager, CachePoolInfo req,
  boolean logRetryCache)
  throws IOException {
 final FSPermissionChecker pc = getFsPermissionChecker(fsn);
 if (pc != null) {
  pc.checkSuperuserPrivilege();
 }
 CachePoolInfo info = cacheManager.addCachePool(req);
 fsn.getEditLog().logAddCachePool(info, logRetryCache);
 return info;
}
origin: ch.cern.hadoop/hadoop-hdfs

static CachePoolInfo addCachePool(
  FSNamesystem fsn, CacheManager cacheManager, CachePoolInfo req,
  boolean logRetryCache)
  throws IOException {
 final FSPermissionChecker pc = getFsPermissionChecker(fsn);
 if (pc != null) {
  pc.checkSuperuserPrivilege();
 }
 CachePoolInfo info = cacheManager.addCachePool(req);
 fsn.getEditLog().logAddCachePool(info, logRetryCache);
 return info;
}
origin: ch.cern.hadoop/hadoop-hdfs

static void modifyCachePool(
  FSNamesystem fsn, CacheManager cacheManager, CachePoolInfo req,
  boolean logRetryCache) throws IOException {
 final FSPermissionChecker pc = getFsPermissionChecker(fsn);
 if (pc != null) {
  pc.checkSuperuserPrivilege();
 }
 cacheManager.modifyCachePool(req);
 fsn.getEditLog().logModifyCachePool(req, logRetryCache);
}
origin: io.prestosql.hadoop/hadoop-apache

INodesInPath resolvePath(FSPermissionChecker pc, String src,
  boolean resolveLink) throws UnresolvedLinkException,
FileNotFoundException, AccessControlException {
 byte[][] components = INode.getPathComponents(src);
 if (isPermissionEnabled && pc != null && isReservedRawName(components)) {
  pc.checkSuperuserPrivilege();
 }
 components = resolveComponents(components, this);
 return INodesInPath.resolve(rootDir, components, resolveLink);
}
origin: ch.cern.hadoop/hadoop-hdfs

/**
 * Set the namespace, storagespace and typespace quota for a directory.
 *
 * Note: This does not support ".inodes" relative path.
 */
static void setQuota(FSDirectory fsd, String src, long nsQuota, long ssQuota,
  StorageType type) throws IOException {
 if (fsd.isPermissionEnabled()) {
  FSPermissionChecker pc = fsd.getPermissionChecker();
  pc.checkSuperuserPrivilege();
 }
 fsd.writeLock();
 try {
  INodeDirectory changed = unprotectedSetQuota(fsd, src, nsQuota, ssQuota, type);
  if (changed != null) {
   final QuotaCounts q = changed.getQuotaCounts();
   if (type == null) {
    fsd.getEditLog().logSetQuota(src, q.getNameSpace(), q.getStorageSpace());
   } else {
    fsd.getEditLog().logSetQuotaByStorageType(
      src, q.getTypeSpaces().get(type), type);
   }
  }
 } finally {
  fsd.writeUnlock();
 }
}
origin: io.prestosql.hadoop/hadoop-apache

/**
 * Set the namespace, storagespace and typespace quota for a directory.
 *
 * Note: This does not support ".inodes" relative path.
 */
static void setQuota(FSDirectory fsd, String src, long nsQuota, long ssQuota,
  StorageType type) throws IOException {
 if (fsd.isPermissionEnabled()) {
  FSPermissionChecker pc = fsd.getPermissionChecker();
  pc.checkSuperuserPrivilege();
 }
 fsd.writeLock();
 try {
  INodeDirectory changed = unprotectedSetQuota(fsd, src, nsQuota, ssQuota, type);
  if (changed != null) {
   final QuotaCounts q = changed.getQuotaCounts();
   if (type == null) {
    fsd.getEditLog().logSetQuota(src, q.getNameSpace(), q.getStorageSpace());
   } else {
    fsd.getEditLog().logSetQuotaByStorageType(
      src, q.getTypeSpaces().get(type), type);
   }
  }
 } finally {
  fsd.writeUnlock();
 }
}
org.apache.hadoop.hdfs.server.namenodeFSPermissionCheckercheckSuperuserPrivilege

Javadoc

Verify if the caller has the required permission. This will result into an exception if the caller is not allowed to access the resource.

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()
  • getAccessControlEnforcer
  • getAttributesProvider
  • getINodeAttrs
  • getUser
  • hasAclPermission
    Checks requested access against an Access Control List. This method relies on finding the ACL data i
  • getUser,
  • hasAclPermission,
  • hasPermission,
  • isSuperUser,
  • toAccessControlString,
  • constructPath,
  • containsGroup,
  • isMemberOfGroup,
  • checkIsDirectory

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • getExternalFilesDir (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Kernel (java.awt.image)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Top 12 Jupyter Notebook extensions
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