HDFS-2963. Console Output is confusing while executing metasave (dfsadmin command). Contributed by Andrew Wang

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1374040 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eli Collins 2012-08-16 20:35:50 +00:00
parent 4524655afd
commit cf93dfba4e
4 changed files with 8 additions and 7 deletions

View File

@ -399,6 +399,9 @@ Branch-2 ( Unreleased changes )
HDFS-3796. Speed up edit log tests by avoiding fsync() (todd)
HDFS-2963. Console Output is confusing while executing metasave
(dfsadmin command). (Andrew Wang via eli)
OPTIMIZATIONS
HDFS-2982. Startup performance suffers when there are many edit log

View File

@ -754,15 +754,15 @@ public class DFSAdmin extends FsShell {
* Usage: java DFSAdmin -metasave filename
* @param argv List of of command line parameters.
* @param idx The index of the command that is being processed.
* @exception IOException if an error accoured wile accessing
* @exception IOException if an error occurred while accessing
* the file or path.
*/
public int metaSave(String[] argv, int idx) throws IOException {
String pathname = argv[idx];
DistributedFileSystem dfs = getDFS();
dfs.metaSave(pathname);
System.out.println("Created file " + pathname + " on server " +
dfs.getUri());
System.out.println("Created metasave file " + pathname + " in the log " +
"directory of namenode " + dfs.getUri());
return 0;
}

View File

@ -94,9 +94,7 @@ public class TestHDFSCLI extends CLITestHelperDFS {
protected Result execute(CLICommand cmd) throws Exception {
return cmd.getExecutor(namenode).executeCommand(cmd.getCmd());
}
//TODO: The test is failing due to the change in HADOOP-7360.
// HDFS-2038 is going to fix it. Disable the test for the moment.
@Test
@Override
public void testAll () {

View File

@ -15986,7 +15986,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
<expected-output>Created file metafile on server hdfs:\/\/[-.a-zA-Z0-9\.:]+</expected-output>
<expected-output>Created metasave file metafile in the log directory of namenode hdfs:\/\/[-.a-zA-Z0-9\.:]+</expected-output>
</comparator>
</comparators>
</test>