From 841dda010bc586c66dfa2dbb5f2532b1d131d9aa Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Thu, 16 Aug 2012 20:37:32 +0000 Subject: [PATCH] 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 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java | 6 +++--- .../src/test/java/org/apache/hadoop/cli/TestHDFSCLI.java | 4 +--- .../hadoop-hdfs/src/test/resources/testHDFSConf.xml | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index e04984b0798..7e99a525b04 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -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 diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java index 211220803eb..8ddfdcabf85 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java @@ -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; } diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cli/TestHDFSCLI.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cli/TestHDFSCLI.java index ebe7b5d1f67..ba09559cb45 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cli/TestHDFSCLI.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cli/TestHDFSCLI.java @@ -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 () { diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml index d05dcc65718..a29508ce55c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml @@ -15986,7 +15986,7 @@ RegexpComparator - Created file metafile on server hdfs:\/\/[-.a-zA-Z0-9\.:]+ + Created metasave file metafile in the log directory of namenode hdfs:\/\/[-.a-zA-Z0-9\.:]+