You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by su...@apache.org on 2012/11/30 19:38:55 UTC
svn commit: r1415784 - in
/hadoop/common/trunk/hadoop-common-project/hadoop-common: CHANGES.txt
src/test/java/org/apache/hadoop/fs/viewfs/ViewFileSystemTestSetup.java
src/test/java/org/apache/hadoop/fs/viewfs/ViewFsTestSetup.java
Author: suresh
Date: Fri Nov 30 18:38:53 2012
New Revision: 1415784
URL: http://svn.apache.org/viewvc?rev=1415784&view=rev
Log:
HADOOP-8958. ViewFs:Non absolute mount name failures when running multiple tests on Windows. Contributed by Chris Nauroth.
Modified:
hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/ViewFileSystemTestSetup.java
hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/ViewFsTestSetup.java
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1415784&r1=1415783&r2=1415784&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Fri Nov 30 18:38:53 2012
@@ -453,6 +453,9 @@ Release 2.0.3-alpha - Unreleased
HADOOP-9064. Augment DelegationTokenRenewer API to cancel the tokens on
calls to removeRenewAction. (kkambatl via tucu)
+ HADOOP-8958. ViewFs:Non absolute mount name failures when running
+ multiple tests on Windows. (Chris Nauroth via suresh)
+
Release 2.0.2-alpha - 2012-09-07
INCOMPATIBLE CHANGES
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/ViewFileSystemTestSetup.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/ViewFileSystemTestSetup.java?rev=1415784&r1=1415783&r2=1415784&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/ViewFileSystemTestSetup.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/ViewFileSystemTestSetup.java Fri Nov 30 18:38:53 2012
@@ -26,6 +26,7 @@ import org.apache.hadoop.fs.FileSystemTe
import org.apache.hadoop.fs.FsConstants;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.viewfs.ConfigUtil;
+import org.apache.hadoop.util.Shell;
import org.mortbay.log.Log;
@@ -123,8 +124,11 @@ public class ViewFileSystemTestSetup {
* in the target file system.
*/
static void linkUpFirstComponents(Configuration conf, String path, FileSystem fsTarget, String info) {
- int indexOf2ndSlash = path.indexOf('/', 1);
- String firstComponent = path.substring(0, indexOf2ndSlash);
+ int indexOfEnd = path.indexOf('/', 1);
+ if (Shell.WINDOWS) {
+ indexOfEnd = path.indexOf('/', indexOfEnd + 1);
+ }
+ String firstComponent = path.substring(0, indexOfEnd);
URI linkTarget = fsTarget.makeQualified(new Path(firstComponent)).toUri();
ConfigUtil.addLink(conf, firstComponent, linkTarget);
Log.info("Added link for " + info + " "
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/ViewFsTestSetup.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/ViewFsTestSetup.java?rev=1415784&r1=1415783&r2=1415784&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/ViewFsTestSetup.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/ViewFsTestSetup.java Fri Nov 30 18:38:53 2012
@@ -25,6 +25,7 @@ import org.apache.hadoop.fs.FileContextT
import org.apache.hadoop.fs.FsConstants;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.viewfs.ConfigUtil;
+import org.apache.hadoop.util.Shell;
import org.mortbay.log.Log;
@@ -120,8 +121,11 @@ public class ViewFsTestSetup {
*/
static void linkUpFirstComponents(Configuration conf, String path,
FileContext fsTarget, String info) {
- int indexOf2ndSlash = path.indexOf('/', 1);
- String firstComponent = path.substring(0, indexOf2ndSlash);
+ int indexOfEnd = path.indexOf('/', 1);
+ if (Shell.WINDOWS) {
+ indexOfEnd = path.indexOf('/', indexOfEnd + 1);
+ }
+ String firstComponent = path.substring(0, indexOfEnd);
URI linkTarget = fsTarget.makeQualified(new Path(firstComponent)).toUri();
ConfigUtil.addLink(conf, firstComponent, linkTarget);
Log.info("Added link for " + info + " "