hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1404871 - in /hadoop/common/branches/branch-1-win: CHANGES.branch-1-win.txt src/core/org/apache/hadoop/fs/FileUtil.java
Date Fri, 02 Nov 2012 04:21:09 GMT
Author: suresh
Date: Fri Nov  2 04:21:09 2012
New Revision: 1404871

URL: http://svn.apache.org/viewvc?rev=1404871&view=rev
Log:
HADOOP-8949. Remove FileUtil.CygPathCommand dead code. Contributed by Chris Nauroth.

Modified:
    hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
    hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/FileUtil.java

Modified: hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt?rev=1404871&r1=1404870&r2=1404871&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt (original)
+++ hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt Fri Nov  2 04:21:09 2012
@@ -194,3 +194,6 @@ Branch-hadoop-1-win - unreleased
 
     HADOOP-8872. FileSystem#length returns zero for symlinks on 
     windows+java6. (Ivan Mitic via suresh)
+
+    HADOOP-8949. Remove FileUtil.CygPathCommand dead code. (Chris Nauroth via 
+    suresh)

Modified: hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/FileUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/FileUtil.java?rev=1404871&r1=1404870&r2=1404871&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/FileUtil.java (original)
+++ hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/FileUtil.java Fri Nov
 2 04:21:09 2012
@@ -379,32 +379,6 @@ public class FileUtil {
   }
 
   /**
-   * This class is only used on windows to invoke the cygpath command.
-   */
-  private static class CygPathCommand extends Shell {
-    String[] command;
-    String result;
-    CygPathCommand(String path) throws IOException {
-      command = new String[]{"cygpath", "-u", path};
-      run();
-    }
-    String getResult() throws IOException {
-      return result;
-    }
-    protected String[] getExecString() {
-      return command;
-    }
-    protected void parseExecResult(BufferedReader lines) throws IOException {
-      String line = lines.readLine();
-      if (line == null) {
-        throw new IOException("Can't convert '" + command[2] + 
-                              " to a cygwin path");
-      }
-      result = line;
-    }
-  }
-
-  /**
    * Convert a os-native filename to a path that works for the shell.
    * @param filename The filename to convert
    * @return The unix pathname
@@ -607,18 +581,6 @@ public class FileUtil {
     }
     return shExec.getExitCode();
   }
-  
-  private static String copyStderr(Process p) throws IOException {
-    InputStream err = p.getErrorStream();
-    StringBuilder result = new StringBuilder();
-    byte[] buff = new byte[4096];
-    int len = err.read(buff);
-    while (len > 0) {
-      result.append(new String(buff, 0 , len));
-      len = err.read(buff);
-    }
-    return result.toString();
-  }
 
   /**
    * Change the permissions on a filename.



Mime
View raw message