hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r747891 - in /hadoop/core/trunk: CHANGES.txt src/test/org/apache/hadoop/fs/TestCopyFiles.java
Date Wed, 25 Feb 2009 18:43:54 GMT
Author: szetszwo
Date: Wed Feb 25 18:43:53 2009
New Revision: 747891

URL: http://svn.apache.org/viewvc?rev=747891&view=rev
Log:
HADOOP-5305. Increase number of files and print debug messages in TestCopyFiles.  (szetszwo)

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestCopyFiles.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=747891&r1=747890&r2=747891&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed Feb 25 18:43:53 2009
@@ -235,6 +235,9 @@
     HADOOP-5278. Fixes a problem to do with logging the finish time of a task during
     recovery (after a JobTracker restart). (Amar Kamat via ddas)
 
+    HADOOP-5305. Increase number of files and print debug messages in
+    TestCopyFiles.  (szetszwo)
+
 Release 0.20.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestCopyFiles.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestCopyFiles.java?rev=747891&r1=747890&r2=747891&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestCopyFiles.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestCopyFiles.java Wed Feb 25 18:43:53
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(); }



Mime
View raw message