MAPREDUCE-3496. Fixed client to print queue acls in consistent order. Contributed by Jonathan Eagles.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1210738 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2011-12-06 01:34:03 +00:00
parent 0a713035f2
commit a55599062c
2 changed files with 5 additions and 0 deletions

View File

@ -246,6 +246,9 @@ Release 0.23.1 - Unreleased
MAPREDUCE-3485. DISKS_FAILED -101 error code should be defined in same location as MAPREDUCE-3485. DISKS_FAILED -101 error code should be defined in same location as
ABORTED_CONTAINER_EXIT_STATUS. (Ravi Gummadi via mahadev) ABORTED_CONTAINER_EXIT_STATUS. (Ravi Gummadi via mahadev)
MAPREDUCE-3496. Fixed client to print queue acls in consistent order.
(Jonathan Eagles via acmurthy)
Release 0.23.0 - 2011-11-01 Release 0.23.0 - 2011-11-01
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -22,6 +22,7 @@
import java.io.Writer; import java.io.Writer;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import org.apache.hadoop.conf.Configured; import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.UserGroupInformation;
@ -200,6 +201,7 @@ private void displayQueueAclsInfoForCurrentUser() throws IOException {
for (QueueAclsInfo queueInfo : queueAclsInfoList) { for (QueueAclsInfo queueInfo : queueAclsInfoList) {
System.out.print(queueInfo.getQueueName() + " "); System.out.print(queueInfo.getQueueName() + " ");
String[] ops = queueInfo.getOperations(); String[] ops = queueInfo.getOperations();
Arrays.sort(ops);
int max = ops.length - 1; int max = ops.length - 1;
for (int j = 0; j < ops.length; j++) { for (int j = 0; j < ops.length; j++) {
System.out.print(ops[j].replaceFirst("acl-", "")); System.out.print(ops[j].replaceFirst("acl-", ""));