本文整理了Java中org.apache.hadoop.mapred.QueueManager.getQueueAcls
方法的一些代码示例,展示了QueueManager.getQueueAcls
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueueManager.getQueueAcls
方法的具体详情如下:
包路径:org.apache.hadoop.mapred.QueueManager
类名称:QueueManager
方法名:getQueueAcls
[英]Generates the array of QueueAclsInfo object.
The array consists of only those queues for which user has acls.
[中]生成QueueAclsInfo对象的数组。
该数组仅由用户具有ACL的队列组成。
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
@Override
public org.apache.hadoop.mapreduce.QueueAclsInfo[]
getQueueAclsForCurrentUser() throws IOException {
return queueManager.getQueueAcls(UserGroupInformation.getCurrentUser());
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
private void initialize(Configuration conf) {
aclsEnabled = conf.getBoolean("mapred.acls.enabled", false);
String[] queues = conf.getStrings("mapred.queue.names",
new String[] {JobConf.DEFAULT_QUEUE_NAME});
addToSet(queueNames, queues);
aclsMap = getQueueAcls(conf);
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
@Override
public QueueAclsInfo[] getQueueAclsForCurrentUser() throws IOException{
return queueManager.getQueueAcls(
UserGroupInformation.getCurrentUGI());
}
private synchronized JobStatus[] getJobStatus(Collection<JobInProgress> jips,
代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-core
assertTrue(manager.hasAccess("first", QueueACL.ADMINISTER_JOBS, mockUGI));
QueueAclsInfo[] qai = manager.getQueueAcls(mockUGI);
assertEquals(qai.length, 1);
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/**
* Refresh the acls for the configured queues in the system by reading
* it from mapred-queue-acls.xml.
*
* The previous acls are removed. Previously configured queues and
* if or not acl is disabled is retained.
*
* @throws IOException when queue ACL configuration file is invalid.
*/
synchronized void refreshAcls(Configuration conf) throws IOException {
try {
HashMap<String, AccessControlList> newAclsMap =
getQueueAcls(conf);
aclsMap = newAclsMap;
} catch (Throwable t) {
String exceptionString = StringUtils.stringifyException(t);
LOG.warn("Queue ACLs could not be refreshed because there was an " +
"exception in parsing the configuration: "+ exceptionString +
". Existing ACLs are retained.");
throw new IOException(exceptionString);
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred-test
public void testQueueAclsForCurrentuser() throws Exception {
setupConf(true);
QueueAclsInfo[] queueAclsInfoList =
queueManager.getQueueAcls(currentUGI);
checkQueueAclsInfo(queueAclsInfoList);
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred-test
public void testQueueAclsForCurrentUserAclsDisabled() throws Exception {
setupConf(false);
//fetch the acls info for current user.
QueueAclsInfo[] queueAclsInfoList = queueManager.
getQueueAcls(currentUGI);
checkQueueAclsInfo(queueAclsInfoList);
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred-test
public void testQueueAclsForNoAccess() throws Exception {
setupConfForNoAccess();
QueueAclsInfo[] queueAclsInfoList = queueManager.
getQueueAcls(currentUGI);
assertTrue(queueAclsInfoList.length == 0);
}
内容来源于网络,如有侵权,请联系作者删除!