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/branches/branch-2@1374042 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eli Collins 2012-08-16 20:37:32 +00:00
parent ac63450f02
commit 841dda010b
4 changed files with 8 additions and 7 deletions

View File

@ -214,6 +214,9 @@ Release 2.0.1-alpha - UNRELEASED
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>