本文整理汇总了Java中org.apache.hadoop.yarn.api.records.QueueACL.values方法的典型用法代码示例。如果您正苦于以下问题:Java QueueACL.values方法的具体用法?Java QueueACL.values怎么用?Java QueueACL.values使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.yarn.api.records.QueueACL
的用法示例。
在下文中一共展示了QueueACL.values方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getQueueUserAclInfo
import org.apache.hadoop.yarn.api.records.QueueACL; //导入方法依赖的package包/类
@Override
public synchronized List<QueueUserACLInfo>
getQueueUserAclInfo(UserGroupInformation user) {
QueueUserACLInfo userAclInfo =
recordFactory.newRecordInstance(QueueUserACLInfo.class);
List<QueueACL> operations = new ArrayList<QueueACL>();
for (QueueACL operation : QueueACL.values()) {
if (hasAccess(operation, user)) {
operations.add(operation);
}
}
userAclInfo.setQueueName(getQueueName());
userAclInfo.setUserAcls(operations);
return Collections.singletonList(userAclInfo);
}
示例2: getQueueAcls
import org.apache.hadoop.yarn.api.records.QueueACL; //导入方法依赖的package包/类
public Map<QueueACL, AccessControlList> getQueueAcls() {
Map<QueueACL, AccessControlList> acls =
new HashMap<QueueACL, AccessControlList>();
for (QueueACL acl : QueueACL.values()) {
acls.put(acl, new AccessControlList("*"));
}
return acls;
}
示例3: getQueueUserAclInfo
import org.apache.hadoop.yarn.api.records.QueueACL; //导入方法依赖的package包/类
@Override
public List<QueueUserACLInfo> getQueueUserAclInfo(UserGroupInformation user) {
QueueUserACLInfo userAclInfo =
recordFactory.newRecordInstance(QueueUserACLInfo.class);
List<QueueACL> operations = new ArrayList<QueueACL>();
for (QueueACL operation : QueueACL.values()) {
if (hasAccess(operation, user)) {
operations.add(operation);
}
}
userAclInfo.setQueueName(getQueueName());
userAclInfo.setUserAcls(operations);
return Collections.singletonList(userAclInfo);
}
示例4: getUserAclInfo
import org.apache.hadoop.yarn.api.records.QueueACL; //导入方法依赖的package包/类
private synchronized QueueUserACLInfo getUserAclInfo(
UserGroupInformation user) {
QueueUserACLInfo userAclInfo =
recordFactory.newRecordInstance(QueueUserACLInfo.class);
List<QueueACL> operations = new ArrayList<QueueACL>();
for (QueueACL operation : QueueACL.values()) {
if (hasAccess(operation, user)) {
operations.add(operation);
}
}
userAclInfo.setQueueName(getQueueName());
userAclInfo.setUserAcls(operations);
return userAclInfo;
}
示例5: getAcls
import org.apache.hadoop.yarn.api.records.QueueACL; //导入方法依赖的package包/类
public Map<AccessType, AccessControlList> getAcls(String queue) {
Map<AccessType, AccessControlList> acls =
new HashMap<AccessType, AccessControlList>();
for (QueueACL acl : QueueACL.values()) {
acls.put(SchedulerUtils.toAccessType(acl), getAcl(queue, acl));
}
return acls;
}
示例6: getUserAclInfo
import org.apache.hadoop.yarn.api.records.QueueACL; //导入方法依赖的package包/类
private QueueUserACLInfo getUserAclInfo(UserGroupInformation user) {
List<QueueACL> operations = new ArrayList<>();
for (QueueACL operation : QueueACL.values()) {
if (hasAccess(operation, user)) {
operations.add(operation);
}
}
return QueueUserACLInfo.newInstance(getQueueName(), operations);
}