You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sz...@apache.org on 2011/05/24 00:02:54 UTC
svn commit: r1126778 - in /hadoop/common/branches/yahoo-merge: ./
src/contrib/ec2/ src/docs/ src/java/ src/java/org/apache/hadoop/fs/
src/java/org/apache/hadoop/fs/shell/ src/test/core/
src/test/core/org/apache/hadoop/cli/
Author: szetszwo
Date: Mon May 23 22:02:53 2011
New Revision: 1126778
URL: http://svn.apache.org/viewvc?rev=1126778&view=rev
Log:
svn merge -c 1095761 from trunk for HADOOP-7233.
Added:
hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/Ls.java
- copied unchanged from r1095761, hadoop/common/trunk/src/java/org/apache/hadoop/fs/shell/Ls.java
Modified:
hadoop/common/branches/yahoo-merge/ (props changed)
hadoop/common/branches/yahoo-merge/CHANGES.txt (contents, props changed)
hadoop/common/branches/yahoo-merge/src/contrib/ec2/ (props changed)
hadoop/common/branches/yahoo-merge/src/docs/ (props changed)
hadoop/common/branches/yahoo-merge/src/java/ (props changed)
hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShell.java
hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/Command.java
hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/Count.java
hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/FsCommand.java
hadoop/common/branches/yahoo-merge/src/test/core/ (props changed)
hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/cli/testConf.xml
Propchange: hadoop/common/branches/yahoo-merge/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:02:53 2011
@@ -1,2 +1,2 @@
-/hadoop/common/trunk:1043117,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1100026
+/hadoop/common/trunk:1043117,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1100026
/hadoop/core/branches/branch-0.19/core:713112
Modified: hadoop/common/branches/yahoo-merge/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/CHANGES.txt?rev=1126778&r1=1126777&r2=1126778&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/CHANGES.txt (original)
+++ hadoop/common/branches/yahoo-merge/CHANGES.txt Mon May 23 22:02:53 2011
@@ -32,6 +32,9 @@ Trunk (unreleased changes)
HADOOP-7230. Move "fs -help" shell command tests from HDFS to COMMOM; see
also HDFS-1844. (Daryn Sharp via szetszwo)
+ HADOOP-7233. Refactor ls to conform to new FsCommand class. (Daryn Sharp
+ via szetszwo)
+
OPTIMIZATIONS
BUG FIXES
Propchange: hadoop/common/branches/yahoo-merge/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:02:53 2011
@@ -1,4 +1,4 @@
-/hadoop/common/trunk/CHANGES.txt:1043117,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1092832,1094750,1095121,1100026
+/hadoop/common/trunk/CHANGES.txt:1043117,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1092832,1094750,1095121,1095761,1100026
/hadoop/core/branches/branch-0.18/CHANGES.txt:727226
/hadoop/core/branches/branch-0.19/CHANGES.txt:713112
/hadoop/core/trunk/CHANGES.txt:776175-785643,785929-786278
Propchange: hadoop/common/branches/yahoo-merge/src/contrib/ec2/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:02:53 2011
@@ -1,3 +1,3 @@
-/hadoop/common/trunk/src/contrib/ec2:1043117,1078148,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1100026
+/hadoop/common/trunk/src/contrib/ec2:1043117,1078148,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1100026
/hadoop/core/branches/branch-0.19/core/src/contrib/ec2:713112
/hadoop/core/trunk/src/contrib/ec2:776175-784663
Propchange: hadoop/common/branches/yahoo-merge/src/docs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:02:53 2011
@@ -1,2 +1,2 @@
-/hadoop/common/trunk/src/docs:1043117,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1100026
+/hadoop/common/trunk/src/docs:1043117,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1100026
/hadoop/core/branches/branch-0.19/src/docs:713112
Propchange: hadoop/common/branches/yahoo-merge/src/java/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:02:53 2011
@@ -1,3 +1,3 @@
-/hadoop/common/trunk/src/java:1043117,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1100026
+/hadoop/common/trunk/src/java:1043117,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1100026
/hadoop/core/branches/branch-0.19/core/src/java:713112
/hadoop/core/trunk/src/core:776175-785643,785929-786278
Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShell.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShell.java?rev=1126778&r1=1126777&r2=1126778&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShell.java (original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FsShell.java Mon May 23 22:02:53 2011
@@ -609,87 +609,6 @@ public class FsShell extends Configured
}
}
-
- /**
- * Get a listing of all files in that match the file pattern <i>srcf</i>.
- * @param srcf a file pattern specifying source files
- * @param recursive if need to list files in subdirs
- * @throws IOException
- * @see org.apache.hadoop.fs.FileSystem#globStatus(Path)
- */
- private int ls(String srcf, boolean recursive) throws IOException {
- Path srcPath = new Path(srcf);
- FileSystem srcFs = srcPath.getFileSystem(this.getConf());
- FileStatus[] srcs = srcFs.globStatus(srcPath);
- if (srcs==null || srcs.length==0) {
- throw new FileNotFoundException("Cannot access " + srcf +
- ": No such file or directory.");
- }
-
- boolean printHeader = (srcs.length == 1) ? true: false;
- int numOfErrors = 0;
- for(int i=0; i<srcs.length; i++) {
- numOfErrors += ls(srcs[i], srcFs, recursive, printHeader);
- }
- return numOfErrors == 0 ? 0 : -1;
- }
-
- /* list all files under the directory <i>src</i>
- * ideally we should provide "-l" option, that lists like "ls -l".
- */
- private int ls(FileStatus src, FileSystem srcFs, boolean recursive,
- boolean printHeader) throws IOException {
- final String cmd = recursive? "lsr": "ls";
- final FileStatus[] items = shellListStatus(cmd, srcFs, src);
- if (items == null) {
- return 1;
- } else {
- int numOfErrors = 0;
- if (!recursive && printHeader) {
- if (items.length != 0) {
- System.out.println("Found " + items.length + " items");
- }
- }
-
- int maxReplication = 3, maxLen = 10, maxOwner = 0,maxGroup = 0;
-
- for(int i = 0; i < items.length; i++) {
- FileStatus stat = items[i];
- int replication = String.valueOf(stat.getReplication()).length();
- int len = String.valueOf(stat.getLen()).length();
- int owner = String.valueOf(stat.getOwner()).length();
- int group = String.valueOf(stat.getGroup()).length();
-
- if (replication > maxReplication) maxReplication = replication;
- if (len > maxLen) maxLen = len;
- if (owner > maxOwner) maxOwner = owner;
- if (group > maxGroup) maxGroup = group;
- }
-
- for (int i = 0; i < items.length; i++) {
- FileStatus stat = items[i];
- Path cur = stat.getPath();
- String mdate = dateForm.format(new Date(stat.getModificationTime()));
-
- System.out.print((stat.isDirectory() ? "d" : "-") +
- stat.getPermission() + " ");
- System.out.printf("%"+ maxReplication +
- "s ", (stat.isFile() ? stat.getReplication() : "-"));
- if (maxOwner > 0)
- System.out.printf("%-"+ maxOwner + "s ", stat.getOwner());
- if (maxGroup > 0)
- System.out.printf("%-"+ maxGroup + "s ", stat.getGroup());
- System.out.printf("%"+ maxLen + "d ", stat.getLen());
- System.out.print(mdate + " ");
- System.out.println(cur.toUri().getPath());
- if (recursive && stat.isDirectory()) {
- numOfErrors += ls(stat,srcFs, recursive, printHeader);
- }
- }
- return numOfErrors;
- }
- }
-
/**
* Show the size of a partition in the filesystem that contains
* the specified <i>path</i>.
@@ -1387,7 +1306,7 @@ public class FsShell extends Configured
String summary = "hadoop fs is the command to execute fs commands. " +
"The full syntax is: \n\n" +
"hadoop fs [-fs <local | file system URI>] [-conf <configuration file>]\n\t" +
- "[-D <property=value>] [-ls <path>] [-lsr <path>] [-df [<path>]] [-du [-s] [-h] <path>]\n\t" +
+ "[-D <property=value>] [-df [<path>]] [-du [-s] [-h] <path>]\n\t" +
"[-dus <path>] [-mv <src> <dst>] [-cp <src> <dst>] [-rm [-skipTrash] <src>]\n\t" +
"[-rmr [-skipTrash] <src>] [-put <localsrc> ... <dst>] [-copyFromLocal <localsrc> ... <dst>]\n\t" +
"[-moveFromLocal <localsrc> ... <dst>] [" +
@@ -1416,21 +1335,6 @@ public class FsShell extends Configured
"\t\tappear first on the command line. Exactly one additional\n" +
"\t\targument must be specified. \n";
-
- String ls = "-ls <path>: \tList the contents that match the specified file pattern. If\n" +
- "\t\tpath is not specified, the contents of /user/<currentUser>\n" +
- "\t\twill be listed. Directory entries are of the form \n" +
- "\t\t\tdirName (full path) <dir> \n" +
- "\t\tand file entries are of the form \n" +
- "\t\t\tfileName(full path) <r n> size \n" +
- "\t\twhere n is the number of replicas specified for the file \n" +
- "\t\tand size is the size of the file, in bytes.\n";
-
- String lsr = "-lsr <path>: \tRecursively list the contents that match the specified\n" +
- "\t\tfile pattern. Behaves very similarly to hadoop fs -ls,\n" +
- "\t\texcept that the data is shown for all the entries in the\n" +
- "\t\tsubtree.\n";
-
String df = "-df [<path>]: \tShows the capacity, free and used space of the filesystem.\n"+
"\t\tIf the filesystem has multiple partitions, and no path to a particular partition\n"+
"\t\tis specified, then the status of the root partitions will be shown.\n";
@@ -1560,17 +1464,13 @@ public class FsShell extends Configured
Command instance = commandFactory.getInstance("-" + cmd);
if (instance != null) {
- System.out.println(instance.getDescription());
+ printHelp(instance);
} else if ("fs".equals(cmd)) {
System.out.println(fs);
} else if ("conf".equals(cmd)) {
System.out.println(conf);
} else if ("D".equals(cmd)) {
System.out.println(D);
- } else if ("ls".equals(cmd)) {
- System.out.println(ls);
- } else if ("lsr".equals(cmd)) {
- System.out.println(lsr);
} else if ("df".equals(cmd)) {
System.out.println(df);
} else if ("du".equals(cmd)) {
@@ -1631,13 +1531,11 @@ public class FsShell extends Configured
System.out.println(summary);
for (String thisCmdName : commandFactory.getNames()) {
instance = commandFactory.getInstance(thisCmdName);
- System.out.println(instance.getUsage());
+ System.out.println("\t[" + instance.getUsage() + "]");
}
System.out.println("\t[-help [cmd]]\n");
System.out.println(fs);
- System.out.println(ls);
- System.out.println(lsr);
System.out.println(df);
System.out.println(du);
System.out.println(dus);
@@ -1665,14 +1563,29 @@ public class FsShell extends Configured
System.out.println(chgrp);
for (String thisCmdName : commandFactory.getNames()) {
- instance = commandFactory.getInstance(thisCmdName);
- System.out.println(instance.getDescription());
+ printHelp(commandFactory.getInstance(thisCmdName));
}
System.out.println(help);
}
}
+ // TODO: will eventually auto-wrap the text, but this matches the expected
+ // output for the hdfs tests...
+ private void printHelp(Command instance) {
+ boolean firstLine = true;
+ for (String line : instance.getDescription().split("\n")) {
+ String prefix;
+ if (firstLine) {
+ prefix = instance.getUsage() + ":\t";
+ firstLine = false;
+ } else {
+ prefix = "\t\t";
+ }
+ System.out.println(prefix + line);
+ }
+ }
+
/**
* Apply operation specified by 'cmd' on all parameters
* starting from argv[startindex].
@@ -1707,10 +1620,6 @@ public class FsShell extends Configured
delete(argv[i], true, rmSkipTrash);
} else if ("-df".equals(cmd)) {
df(argv[i]);
- } else if ("-ls".equals(cmd)) {
- exitCode = ls(argv[i], false);
- } else if ("-lsr".equals(cmd)) {
- exitCode = ls(argv[i], true);
} else if ("-touchz".equals(cmd)) {
touchz(argv[i]);
} else if ("-text".equals(cmd)) {
@@ -1766,8 +1675,7 @@ public class FsShell extends Configured
} else if ("-D".equals(cmd)) {
System.err.println("Usage: java FsShell" +
" [-D <[property=value>]");
- } else if ("-ls".equals(cmd) || "-lsr".equals(cmd) ||
- "-du".equals(cmd) || "-dus".equals(cmd) ||
+ } else if ("-du".equals(cmd) || "-dus".equals(cmd) ||
"-touchz".equals(cmd) || "-mkdir".equals(cmd) ||
"-text".equals(cmd)) {
System.err.println("Usage: java FsShell" +
@@ -1807,8 +1715,6 @@ public class FsShell extends Configured
System.err.println("Usage: java FsShell [" + TAIL_USAGE + "]");
} else {
System.err.println("Usage: java FsShell");
- System.err.println(" [-ls <path>]");
- System.err.println(" [-lsr <path>]");
System.err.println(" [-df [<path>]]");
System.err.println(" [-du [-s] [-h] <path>]");
System.err.println(" [-dus <path>]");
@@ -1948,18 +1854,6 @@ public class FsShell extends Configured
"-chown".equals(cmd) ||
"-chgrp".equals(cmd)) {
exitCode = FsShellPermissions.changePermissions(fs, cmd, argv, i, this);
- } else if ("-ls".equals(cmd)) {
- if (i < argv.length) {
- exitCode = doall(cmd, argv, i);
- } else {
- exitCode = ls(Path.CUR_DIR, false);
- }
- } else if ("-lsr".equals(cmd)) {
- if (i < argv.length) {
- exitCode = doall(cmd, argv, i);
- } else {
- exitCode = ls(Path.CUR_DIR, true);
- }
} else if ("-mv".equals(cmd)) {
exitCode = rename(argv, getConf());
} else if ("-cp".equals(cmd)) {
Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/Command.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/Command.java?rev=1126778&r1=1126777&r2=1126778&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/Command.java (original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/Command.java Mon May 23 22:02:53 2011
@@ -79,6 +79,14 @@ abstract public class Command extends Co
name = cmdName;
}
+ protected void setRecursive(boolean flag) {
+ recursive = flag;
+ }
+
+ protected boolean isRecursive() {
+ return recursive;
+ }
+
/**
* Execute the command on the input path
*
@@ -138,7 +146,8 @@ abstract public class Command extends Co
displayError(e);
}
- return (numErrors == 0) ? exitCode : 1;
+ // TODO: -1 should be reserved for syntax error, 1 should be failure
+ return (numErrors == 0) ? exitCode : -1;
}
/**
@@ -244,7 +253,18 @@ abstract public class Command extends Co
protected void processNonexistentPathArgument(PathData item)
throws IOException {
// TODO: this should be more posix-like: ex. "No such file or directory"
- throw new FileNotFoundException("Can not find listing for " + item);
+ throw new FileNotFoundException(getFnfText(item.path));
+ }
+
+ /**
+ * TODO: A crutch until the text is standardized across commands...
+ * Eventually an exception that takes the path as an argument will
+ * replace custom text
+ * @param path the thing that doesn't exist
+ * @returns String in printf format
+ */
+ protected String getFnfText(Path path) {
+ throw new RuntimeException(path + ": No such file or directory");
}
/**
@@ -309,7 +329,7 @@ abstract public class Command extends Co
if (stats != null && stats.length == 0) { // glob failed to match
// TODO: this should be more posix-like: ex. "No such file or directory"
- throw new FileNotFoundException("Can not find listing for " + pattern);
+ throw new FileNotFoundException(getFnfText(path));
}
List<PathData> items = new LinkedList<PathData>();
@@ -371,7 +391,9 @@ abstract public class Command extends Co
* @return "name options"
*/
public String getUsage() {
- return getCommandField("USAGE");
+ String cmd = "-" + getCommandName();
+ String usage = getCommandField("USAGE");
+ return usage.isEmpty() ? cmd : cmd + " " + usage;
}
/**
Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/Count.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/Count.java?rev=1126778&r1=1126777&r2=1126778&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/Count.java (original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/Count.java Mon May 23 22:02:53 2011
@@ -26,6 +26,7 @@ import org.apache.hadoop.classification.
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.ContentSummary;
import org.apache.hadoop.fs.FsShell;
+import org.apache.hadoop.fs.Path;
/**
* Count the number of directories, files, bytes, quota, and remaining quota.
@@ -43,13 +44,13 @@ public class Count extends FsCommand {
}
public static final String NAME = "count";
- public static final String USAGE = "-" + NAME + " [-q] <path> ...";
- public static final String DESCRIPTION = CommandUtils.formatDescription(USAGE,
- "Count the number of directories, files and bytes under the paths",
- "that match the specified file pattern. The output columns are:",
- "DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME or",
- "QUOTA REMAINING_QUATA SPACE_QUOTA REMAINING_SPACE_QUOTA ",
- " DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME");
+ public static final String USAGE = "[-q] <path> ...";
+ public static final String DESCRIPTION =
+ "Count the number of directories, files and bytes under the paths\n" +
+ "that match the specified file pattern. The output columns are:\n" +
+ "DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME or\n" +
+ "QUOTA REMAINING_QUATA SPACE_QUOTA REMAINING_SPACE_QUOTA \n" +
+ " DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME";
private boolean showQuotas;
@@ -86,4 +87,10 @@ public class Count extends FsCommand {
ContentSummary summary = src.fs.getContentSummary(src.path);
out.println(summary.toString(showQuotas) + src.path);
}
+
+ // TODO: remove when the error is commonized...
+ @Override
+ protected String getFnfText(Path path) {
+ return "Can not find listing for " + path;
+ }
}
Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/FsCommand.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/FsCommand.java?rev=1126778&r1=1126777&r2=1126778&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/FsCommand.java (original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/shell/FsCommand.java Mon May 23 22:02:53 2011
@@ -42,7 +42,8 @@ abstract public class FsCommand extends
* @param factory where to register the class
*/
public static void registerCommands(CommandFactory factory) {
- Count.registerCommands(factory);
+ factory.registerCommands(Count.class);
+ factory.registerCommands(Ls.class);
}
protected FsCommand() {}
Propchange: hadoop/common/branches/yahoo-merge/src/test/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 22:02:53 2011
@@ -1,3 +1,3 @@
-/hadoop/common/trunk/src/test/core:1043117,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1100026
+/hadoop/common/trunk/src/test/core:1043117,1078148,1080396,1081598,1082329,1082787-1082788,1084769,1085043,1085122,1086309,1087844,1090039,1090485,1091618,1091902,1091970,1092519,1092565,1094750,1095121,1095761,1100026
/hadoop/core/branches/branch-0.19/core/src/test/core:713112
/hadoop/core/trunk/src/test/core:776175-785643,785929-786278
Modified: hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/cli/testConf.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/cli/testConf.xml?rev=1126778&r1=1126777&r2=1126778&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/cli/testConf.xml (original)
+++ hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/cli/testConf.xml Mon May 23 22:02:53 2011
@@ -54,7 +54,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^-ls <path>:( |\t)*List the contents that match the specified file pattern. If( )*</expected-output>
+ <expected-output>^-ls \[<path> \.\.\.\]:( |\t)*List the contents that match the specified file pattern. If( )*</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
@@ -101,7 +101,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^-lsr <path>:( |\t)*Recursively list the contents that match the specified( )*</expected-output>
+ <expected-output>^-lsr \[<path> \.\.\.\]:( |\t)*Recursively list the contents that match the specified( )*</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
@@ -222,7 +222,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^-count \[-q\] <path> \.\.\.: Count the number of directories, files and bytes under the paths( )*</expected-output>
+ <expected-output>^-count \[-q\] <path> \.\.\.:( |\t)*Count the number of directories, files and bytes under the paths( )*</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>