Merge -c 1210738 from trunk to branch-0.23 to fix MAPREDUCE-3496.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1210739 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2011-12-06 01:37:25 +00:00
parent 6a70420d9d
commit 194f52bbad
2 changed files with 5 additions and 0 deletions

View File

@ -197,6 +197,9 @@ Release 0.23.1 - Unreleased
MAPREDUCE-3389. MRApps loads the 'mrapp-generated-classpath' file with MAPREDUCE-3389. MRApps loads the 'mrapp-generated-classpath' file with
classpath from the build machine. (tucu) classpath from the build machine. (tucu)
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.PrintWriter;
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 @@ class JobQueueClient extends Configured implements Tool {
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-", ""));