Java Code Examples for org.apache.hadoop.yarn.api.records.QueueACL#values()

The following examples show how to use org.apache.hadoop.yarn.api.records.QueueACL#values() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LeafQueue.java    From hadoop with Apache License 2.0 6 votes vote down vote up
@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);
}
 
Example 2
Source File: LeafQueue.java    From big-c with Apache License 2.0 6 votes vote down vote up
@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);
}
 
Example 3
Source File: FifoScheduler.java    From hadoop with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 4
Source File: FSLeafQueue.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example 5
Source File: FSParentQueue.java    From hadoop with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 6
Source File: ParentQueue.java    From hadoop with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 7
Source File: CapacitySchedulerConfiguration.java    From hadoop with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 8
Source File: FifoScheduler.java    From big-c with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 9
Source File: FSLeafQueue.java    From big-c with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example 10
Source File: FSParentQueue.java    From big-c with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 11
Source File: ParentQueue.java    From big-c with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 12
Source File: CapacitySchedulerConfiguration.java    From big-c with Apache License 2.0 5 votes vote down vote up
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;
}