本文整理了Java中org.apache.hadoop.yarn.api.records.QueueACL.toString
方法的一些代码示例,展示了QueueACL.toString
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueueACL.toString
方法的具体详情如下:
包路径:org.apache.hadoop.yarn.api.records.QueueACL
类名称:QueueACL
方法名:toString
暂无
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager
private static String getAclKey(QueueACL acl) {
return "acl_" + StringUtils.toLowerCase(acl.toString());
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
private static String getAclKey(QueueACL acl) {
return "acl_" + StringUtils.toLowerCase(acl.toString());
}
代码示例来源:origin: pentaho/pentaho-hadoop-shims
public static boolean verify( QueueAclsInfo[] queueAclsInfos ) throws IOException, InterruptedException {
return queueAclsInfos != null && Arrays.stream( queueAclsInfos ).map( QueueAclsInfo::getOperations )
.flatMap( Arrays::stream ).anyMatch( Predicate.isEqual( QueueACL.SUBMIT_APPLICATIONS.toString() ) );
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
private static String getAclKey(QueueACL acl) {
return "acl_" + StringUtils.toLowerCase(acl.toString());
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-common
public static QueueAclsInfo[] fromYarnQueueUserAclsInfo(
List<QueueUserACLInfo> userAcls) {
List<QueueAclsInfo> acls = new ArrayList<QueueAclsInfo>();
for (QueueUserACLInfo aclInfo : userAcls) {
List<String> operations = new ArrayList<String>();
for (QueueACL qAcl : aclInfo.getUserAcls()) {
operations.add(qAcl.toString());
}
QueueAclsInfo acl =
new QueueAclsInfo(aclInfo.getQueueName(),
operations.toArray(new String[operations.size()]));
acls.add(acl);
}
return acls.toArray(new QueueAclsInfo[acls.size()]);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-common
public static QueueAclsInfo[] fromYarnQueueUserAclsInfo(
List<QueueUserACLInfo> userAcls) {
List<QueueAclsInfo> acls = new ArrayList<QueueAclsInfo>();
for (QueueUserACLInfo aclInfo : userAcls) {
List<String> operations = new ArrayList<String>();
for (QueueACL qAcl : aclInfo.getUserAcls()) {
operations.add(qAcl.toString());
}
QueueAclsInfo acl =
new QueueAclsInfo(aclInfo.getQueueName(),
operations.toArray(new String[operations.size()]));
acls.add(acl);
}
return acls.toArray(new QueueAclsInfo[acls.size()]);
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-common
public static QueueAclsInfo[] fromYarnQueueUserAclsInfo(
List<QueueUserACLInfo> userAcls) {
List<QueueAclsInfo> acls = new ArrayList<QueueAclsInfo>();
for (QueueUserACLInfo aclInfo : userAcls) {
List<String> operations = new ArrayList<String>();
for (QueueACL qAcl : aclInfo.getUserAcls()) {
operations.add(qAcl.toString());
}
QueueAclsInfo acl =
new QueueAclsInfo(aclInfo.getQueueName(),
operations.toArray(new String[operations.size()]));
acls.add(acl);
}
return acls.toArray(new QueueAclsInfo[acls.size()]);
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-common
public static QueueAclsInfo[] fromYarnQueueUserAclsInfo(
List<QueueUserACLInfo> userAcls) {
List<QueueAclsInfo> acls = new ArrayList<QueueAclsInfo>();
for (QueueUserACLInfo aclInfo : userAcls) {
List<String> operations = new ArrayList<String>();
for (QueueACL qAcl : aclInfo.getUserAcls()) {
operations.add(qAcl.toString());
}
QueueAclsInfo acl =
new QueueAclsInfo(aclInfo.getQueueName(),
operations.toArray(new String[operations.size()]));
acls.add(acl);
}
return acls.toArray(new QueueAclsInfo[acls.size()]);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager
private String checkReservationACLs(String queueName, String auditConstant)
throws YarnException {
UserGroupInformation callerUGI;
try {
callerUGI = UserGroupInformation.getCurrentUser();
} catch (IOException ie) {
RMAuditLogger.logFailure("UNKNOWN", auditConstant, queueName,
"ClientRMService", "Error getting UGI");
throw RPCUtil.getRemoteException(ie);
}
// Check if user has access on the managed queue
if (!queueACLsManager.checkAccess(callerUGI, QueueACL.SUBMIT_APPLICATIONS,
queueName)) {
RMAuditLogger.logFailure(
callerUGI.getShortUserName(),
auditConstant,
"User doesn't have permissions to "
+ QueueACL.SUBMIT_APPLICATIONS.toString(), "ClientRMService",
AuditConstants.UNAUTHORIZED_USER);
throw RPCUtil.getRemoteException(new AccessControlException("User "
+ callerUGI.getShortUserName() + " cannot perform operation "
+ QueueACL.SUBMIT_APPLICATIONS.name() + " on queue" + queueName));
}
return callerUGI.getShortUserName();
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager
private String checkReservationACLs(String queueName, String auditConstant)
throws YarnException {
UserGroupInformation callerUGI;
try {
callerUGI = UserGroupInformation.getCurrentUser();
} catch (IOException ie) {
RMAuditLogger.logFailure("UNKNOWN", auditConstant, queueName,
"ClientRMService", "Error getting UGI");
throw RPCUtil.getRemoteException(ie);
}
// Check if user has access on the managed queue
if (!queueACLsManager.checkAccess(callerUGI, QueueACL.SUBMIT_APPLICATIONS,
queueName)) {
RMAuditLogger.logFailure(
callerUGI.getShortUserName(),
auditConstant,
"User doesn't have permissions to "
+ QueueACL.SUBMIT_APPLICATIONS.toString(), "ClientRMService",
AuditConstants.UNAUTHORIZED_USER);
throw RPCUtil.getRemoteException(new AccessControlException("User "
+ callerUGI.getShortUserName() + " cannot perform operation "
+ QueueACL.SUBMIT_APPLICATIONS.name() + " on queue" + queueName));
}
return callerUGI.getShortUserName();
}
}
内容来源于网络,如有侵权,请联系作者删除!