Java Code Examples for org.apache.hadoop.yarn.api.records.QueueUserACLInfo#setQueueName()

The following examples show how to use org.apache.hadoop.yarn.api.records.QueueUserACLInfo#setQueueName() . 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
@Override
public List<QueueUserACLInfo> getQueueUserAclInfo(
    UserGroupInformation unused) {
  QueueUserACLInfo queueUserAclInfo = 
    recordFactory.newRecordInstance(QueueUserACLInfo.class);
  queueUserAclInfo.setQueueName(DEFAULT_QUEUE_NAME);
  queueUserAclInfo.setUserAcls(Arrays.asList(QueueACL.values()));
  return Collections.singletonList(queueUserAclInfo);
}
 
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: FifoScheduler.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public List<QueueUserACLInfo> getQueueUserAclInfo(
    UserGroupInformation unused) {
  QueueUserACLInfo queueUserAclInfo = 
    recordFactory.newRecordInstance(QueueUserACLInfo.class);
  queueUserAclInfo.setQueueName(DEFAULT_QUEUE_NAME);
  queueUserAclInfo.setUserAcls(Arrays.asList(QueueACL.values()));
  return Collections.singletonList(queueUserAclInfo);
}
 
Example 8
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 9
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 10
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;
}