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 2009/04/04 00:58:57 UTC
svn commit: r761832 - in /hadoop/core/branches/branch-0.20: CHANGES.txt
src/test/org/apache/hadoop/fs/TestCopyFiles.java
Author: szetszwo
Date: Fri Apr 3 22:58:57 2009
New Revision: 761832
URL: http://svn.apache.org/viewvc?rev=761832&view=rev
Log:
HADOOP-5305. Increase number of files and print debug messages in TestCopyFiles. (szetszwo)
Modified:
hadoop/core/branches/branch-0.20/CHANGES.txt
hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/fs/TestCopyFiles.java
Modified: hadoop/core/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/CHANGES.txt?rev=761832&r1=761831&r2=761832&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.20/CHANGES.txt Fri Apr 3 22:58:57 2009
@@ -843,6 +843,9 @@
HADOOP-5227. Fix distcp so -update and -delete can be meaningfully
combined. (Tsz Wo (Nicholas), SZE via cdouglas)
+ HADOOP-5305. Increase number of files and print debug messages in
+ TestCopyFiles. (szetszwo)
+
Release 0.19.2 - Unreleased
BUG FIXES
Modified: hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/fs/TestCopyFiles.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/fs/TestCopyFiles.java?rev=761832&r1=761831&r2=761832&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/fs/TestCopyFiles.java (original)
+++ hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/fs/TestCopyFiles.java Fri Apr 3 22:58:57 2009
@@ -60,7 +60,7 @@
static final URI LOCAL_FS = URI.create("file:///");
private static final Random RAN = new Random();
- private static final int NFILES = 7;
+ private static final int NFILES = 20;
private static String TEST_ROOT_DIR =
new Path(System.getProperty("test.build.data","/tmp"))
.toString().replace(' ', '+');
@@ -564,6 +564,7 @@
Configuration conf = new Configuration();
dfs = new MiniDFSCluster(conf, 3, true, null);
FileSystem fs = dfs.getFileSystem();
+ final FsShell shell = new FsShell(conf);
namenode = fs.getUri().toString();
mr = new MiniMRCluster(3, namenode, 1);
MyFile[] files = createFiles(fs.getUri(), "/srcdat");
@@ -581,9 +582,13 @@
namenode+"/destdat"});
assertTrue("Source and destination directories do not match.",
checkFiles(fs, "/destdat", files));
- FileStatus[] logs = fs.listStatus(new Path(namenode+"/logs"));
+
+ String logdir = namenode + "/logs";
+ System.out.println(execCmd(shell, "-lsr", logdir));
+ FileStatus[] logs = fs.listStatus(new Path(logdir));
// rare case where splits are exact, logs.length can be 4
- assertTrue("Unexpected map count", logs.length == 5 || logs.length == 4);
+ assertTrue("Unexpected map count, logs.length=" + logs.length,
+ logs.length == 5 || logs.length == 4);
deldir(fs, "/destdat");
deldir(fs, "/logs");
@@ -593,8 +598,11 @@
namenode+"/logs",
namenode+"/srcdat",
namenode+"/destdat"});
+
+ System.out.println(execCmd(shell, "-lsr", logdir));
logs = fs.listStatus(new Path(namenode+"/logs"));
- assertTrue("Unexpected map count", logs.length == 2);
+ assertTrue("Unexpected map count, logs.length=" + logs.length,
+ logs.length == 2);
} finally {
if (dfs != null) { dfs.shutdown(); }
if (mr != null) { mr.shutdown(); }