hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r556687 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/util/CopyFiles.java src/test/org/apache/hadoop/fs/TestCopyFiles.java
Date Mon, 16 Jul 2007 18:15:40 GMT
Author: cutting
Date: Mon Jul 16 11:15:39 2007
New Revision: 556687

URL: http://svn.apache.org/viewvc?view=rev&rev=556687
Log:
HADOOP-1599.  Fix distcp on Windows.  Contributed by Senthil.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/util/CopyFiles.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestCopyFiles.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=556687&r1=556686&r2=556687
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon Jul 16 11:15:39 2007
@@ -354,6 +354,8 @@
 110. HADOOP-1524.  Permit user task logs to appear as they're
      created.  (Michael Bieniosek via cutting)
 
+111. HADOOP-1599.  Fix distcp bug on Windows.  (Senthil Subramanian via cutting)
+
 
 Release 0.13.0 - 2007-06-08
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/util/CopyFiles.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/util/CopyFiles.java?view=diff&rev=556687&r1=556686&r2=556687
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/util/CopyFiles.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/util/CopyFiles.java Mon Jul 16 11:15:39
2007
@@ -805,7 +805,7 @@
       } else if (destPath == null) {
         destPath = args[idx];
       } else if ("-log".equals(args[idx])) {
-        logPath = new Path(args[++idx]);
+        logPath = new Path(toURI(args[++idx]).getPath());
       } else {
         System.out.println(usage);
         return -1;
@@ -829,14 +829,14 @@
     try {
       URI srcURI = toURI(srcPath);
       FileSystem srcfs = FileSystem.get(srcURI, conf);
-      if (!srcfs.exists(new Path(srcPath))) {
+      if (!srcfs.exists(new Path(srcURI.getPath()))) {
         System.out.println(srcPath + " does not exist.");
         return -1;
       }
 
       URI destURI = toURI(destPath);
       FileSystem destfs = FileSystem.get(destURI, conf);
-      if (destfs.exists(new Path(destPath))) {
+      if (destfs.exists(new Path(destURI.getPath()))) {
         System.out.println("WARNING: " + destPath + " already exists.");
       }
 

Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestCopyFiles.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestCopyFiles.java?view=diff&rev=556687&r1=556686&r2=556687
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestCopyFiles.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestCopyFiles.java Mon Jul 16 11:15:39
2007
@@ -241,14 +241,14 @@
         new CopyFiles().doMain(conf, new String[] {"hdfs://"+namenode+"/srcdat",
                                                    "file://"+TEST_ROOT_DIR+"/destdat",
                                                    "-log",
-                                                   TEST_ROOT_DIR+"/logs"});
+                                                   "/logs"});
         assertTrue("Source and destination directories do not match.",
                    checkFiles("local", TEST_ROOT_DIR+"/destdat", files));
         FileSystem fs = FileSystem.get(URI.create("hdfs://"+namenode+"/logs"), conf);
         assertTrue("Log directory doesnot exist.",
-                    fs.exists(new Path(TEST_ROOT_DIR+"/logs")));
+                    fs.exists(new Path("/logs")));
         deldir("local", TEST_ROOT_DIR+"/destdat");
-        deldir("local", TEST_ROOT_DIR+"/logs");
+        deldir(namenode, "/logs");
         deldir(namenode, "/srcdat");
       }
     } finally {



Mime
View raw message