hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject svn commit: r565943 - in /lucene/hadoop/branches/branch-0.14: CHANGES.txt src/java/org/apache/hadoop/fs/FileUtil.java src/test/org/apache/hadoop/dfs/TestDFSUpgradeFromImage.java
Date Tue, 14 Aug 2007 22:05:08 GMT
Author: nigel
Date: Tue Aug 14 15:05:07 2007
New Revision: 565943

URL: http://svn.apache.org/viewvc?view=rev&rev=565943
Log:
Merge -r 565939:565940 from trunk to 0.14 branch.  Fixes: HADOOP-1714.

Modified:
    lucene/hadoop/branches/branch-0.14/CHANGES.txt
    lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/fs/FileUtil.java
    lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/dfs/TestDFSUpgradeFromImage.java

Modified: lucene/hadoop/branches/branch-0.14/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/CHANGES.txt?view=diff&rev=565943&r1=565942&r2=565943
==============================================================================
--- lucene/hadoop/branches/branch-0.14/CHANGES.txt (original)
+++ lucene/hadoop/branches/branch-0.14/CHANGES.txt Tue Aug 14 15:05:07 2007
@@ -520,6 +520,9 @@
 154. HADOOP-1716.  Fix a Pipes wordcount example to remove the 'file:'
      schema from its output path.  (omalley via cutting)
 
+155. HADOOP-1714.  Fix TestDFSUpgradeFromImage to work on Windows.
+     (Raghu Angadi via nigel)
+
 
 Release 0.13.0 - 2007-06-08
 

Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/fs/FileUtil.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/fs/FileUtil.java?view=diff&rev=565943&r1=565942&r2=565943
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/fs/FileUtil.java (original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/fs/FileUtil.java Tue Aug
14 15:05:07 2007
@@ -307,16 +307,26 @@
 
   /**
    * Convert a os-native filename to a path that works for the shell.
-   * @param file The filename to convert
+   * @param filename The filename to convert
    * @return The unix pathname
    * @throws IOException on windows, there can be problems with the subprocess
    */
-  public static String makeShellPath(File file) throws IOException {
+  public static String makeShellPath(String filename) throws IOException {
     if (Path.WINDOWS) {
-      return new CygPathCommand(file.toString()).getResult();
+      return new CygPathCommand(filename).getResult();
     } else {
-      return file.toString();
-    }
+      return filename;
+    }    
+  }
+  
+  /**
+   * Convert a os-native filename to a path that works for the shell.
+   * @param file The filename to convert
+   * @return The unix pathname
+   * @throws IOException on windows, there can be problems with the subprocess
+   */
+  public static String makeShellPath(File file) throws IOException {
+    return makeShellPath(file.toString());
   }
 
   /**

Modified: lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/dfs/TestDFSUpgradeFromImage.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/dfs/TestDFSUpgradeFromImage.java?view=diff&rev=565943&r1=565942&r2=565943
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/dfs/TestDFSUpgradeFromImage.java
(original)
+++ lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/dfs/TestDFSUpgradeFromImage.java
Tue Aug 14 15:05:07 2007
@@ -70,7 +70,8 @@
     }
     
     LOG.info("Unpacking the tar file " + tarFile);
-    String[] cmd = { "tar", "-zxf", tarFile, "-C", dataDir };
+    String[] cmd = { "tar", "-zxf", FileUtil.makeShellPath(tarFile), 
+                     "-C", FileUtil.makeShellPath(dataDir) };
     Command.execCommand(cmd);
     
     //Now read the reference info



Mime
View raw message