gpt4 book ai didi

org.apache.hadoop.yarn.security.YarnAuthorizationProvider.checkPermission()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 04:42:49 32 4
gpt4 key购买 nike

本文整理了Java中org.apache.hadoop.yarn.security.YarnAuthorizationProvider.checkPermission()方法的一些代码示例,展示了YarnAuthorizationProvider.checkPermission()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnAuthorizationProvider.checkPermission()方法的具体详情如下:
包路径:org.apache.hadoop.yarn.security.YarnAuthorizationProvider
类名称:YarnAuthorizationProvider
方法名:checkPermission

YarnAuthorizationProvider.checkPermission介绍

[英]Check if user has the permission to access the target object.
[中]检查用户是否具有访问目标对象的权限。

代码示例

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

@Override
public boolean hasAccess(QueueACL acl, UserGroupInformation user) {
 return authorizer.checkPermission(SchedulerUtils.toAccessType(acl),
  queueEntity, user);
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager

@Override
public boolean hasAccess(QueueACL acl, UserGroupInformation user) {
 return authorizer.checkPermission(SchedulerUtils.toAccessType(acl),
  queueEntity, user);
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

public boolean hasAccess(QueueACL acl, UserGroupInformation user) {
 return authorizer.checkPermission(
   new AccessRequest(queueEntity, user,
     SchedulerUtils.toAccessType(acl), null, null,
     Server.getRemoteAddress(), null));
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

@Override
public boolean hasAccess(QueueACL acl, UserGroupInformation user) {
 return authorizer.checkPermission(
   new AccessRequest(queueEntity, user, SchedulerUtils.toAccessType(acl),
     null, null, Server.getRemoteAddress(), null));
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

public boolean checkAccess(UserGroupInformation callerUGI, QueueACL acl,
  RMApp app, String remoteAddress, List<String> forwardedAddresses) {
 if (!isACLsEnable) {
  return true;
 }
 if (scheduler instanceof CapacityScheduler) {
  CSQueue queue = ((CapacityScheduler) scheduler).getQueue(app.getQueue());
  if (queue == null) {
   // The application exists but the associated queue does not exist.
   // This may be due to a queue that is not defined when the RM restarts.
   // At this point we choose to log the fact and allow users to access
   // and view the apps in a removed queue. This should only happen on
   // application recovery.
   LOG.error("Queue " + app.getQueue() + " does not exist for " + app
     .getApplicationId());
   return true;
  }
  return authorizer.checkPermission(
    new AccessRequest(queue.getPrivilegedEntity(), callerUGI,
      SchedulerUtils.toAccessType(acl),
      app.getApplicationId().toString(), app.getName(),
      remoteAddress, forwardedAddresses));
 } else {
  return scheduler.checkAccess(callerUGI, acl, app.getQueue());
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

return false;
return authorizer.checkPermission(
  new AccessRequest(queue.getPrivilegedEntity(), callerUGI,
    SchedulerUtils.toAccessType(acl),

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

&& !authorizer.checkPermission(
  new AccessRequest(csqueue.getPrivilegedEntity(), userUgi,
    SchedulerUtils.toAccessType(QueueACL.SUBMIT_APPLICATIONS),
    applicationId.toString(), appName, Server.getRemoteAddress(),
    null))
&& !authorizer.checkPermission(
  new AccessRequest(csqueue.getPrivilegedEntity(), userUgi,
    SchedulerUtils.toAccessType(QueueACL.ADMINISTER_QUEUE),

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com