}
}
private void displayQueueAclsInfoForCurrentUser() throws IOException {
QueueAclsInfo[] queueAclsInfoList = jc.getQueueAclsForCurrentUser();
UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
if (queueAclsInfoList.length > 0) {
System.out.println("Queue acls for user : "
+ ugi.getShortUserName());
System.out.println("\nQueue Operations");
System.out.println("=====================");
for (QueueAclsInfo queueInfo : queueAclsInfoList) {
System.out.print(queueInfo.getQueueName() + " ");
String[] ops = queueInfo.getOperations();
int max = ops.length - 1;
for (int j = 0; j < ops.length; j++) {
System.out.print(ops[j].replaceFirst("acl-", ""));
if (j < max) {
System.out.print(",");
}
}
System.out.println();
}
} else {
System.out.println("User " +
ugi.getShortUserName() +
" does not have access to any queue. \n");
}
}