hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r410666 - in /lucene/hadoop/trunk/src: java/org/apache/hadoop/util/CopyFiles.java test/org/apache/hadoop/fs/TestCopyFiles.java
Date Wed, 31 May 2006 20:56:26 GMT
Author: cutting
Date: Wed May 31 13:56:26 2006
New Revision: 410666

URL: http://svn.apache.org/viewvc?rev=410666&view=rev
Log:
Better fix for Windows.

Modified:
    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/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?rev=410666&r1=410665&r2=410666&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/util/CopyFiles.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/util/CopyFiles.java Wed May 31 13:56:26
2006
@@ -18,8 +18,6 @@
 
 import java.io.IOException;
 import java.net.URI;
-import java.net.URLEncoder;
-import java.net.URLDecoder;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -248,8 +246,8 @@
     URI srcurl = null;
     URI desturl = null;
     try {
-      srcurl = new URI(URLEncoder.encode(srcPath, "UTF-8"));
-      desturl = new URI(URLEncoder.encode(destPath, "UTF-8"));
+      srcurl = new URI(srcPath);
+      desturl = new URI(destPath);
     } catch (URISyntaxException ex) {
       throw new RuntimeException("URL syntax error.", ex);
     }
@@ -267,9 +265,9 @@
     srcfs = FileSystem.getNamed(srcFileSysName, conf);
     FileSystem destfs = FileSystem.getNamed(destFileSysName, conf);
  
-    srcPath = URLDecoder.decode(srcurl.getPath(), "UTF-8");
+    srcPath = srcurl.getPath();
     if ("".equals(srcPath)) { srcPath = "/"; }
-    destPath = URLDecoder.decode(desturl.getPath(), "UTF-8");
+    destPath = desturl.getPath();
     if ("".equals(destPath)) { destPath = "/"; }
     
     boolean isFile = false;

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?rev=410666&r1=410665&r2=410666&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestCopyFiles.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestCopyFiles.java Wed May 31 13:56:26
2006
@@ -32,9 +32,10 @@
 public class TestCopyFiles extends TestCase {
   
   private static final int NFILES = 20;
-  private static Path TEST_ROOT_DIR = new Path(
-          System.getProperty("test.build.data","/tmp"));
-  
+  private static String TEST_ROOT_DIR =
+    new Path(System.getProperty("test.build.data","/tmp"))
+    .toString().replace(" ","+");
+
   /** class MyFile contains enough information to recreate the contents of
    * a single file.
    */



Mime
View raw message