YARN-487. Modify path manipulation in LocalDirsHandlerService to let TestDiskFailures pass on Windows. Contributed by Chris Nauroth.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1466746 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2013-04-11 01:00:38 +00:00
parent fd1000bcef
commit add00d6d74
3 changed files with 6 additions and 3 deletions

View File

@ -31,6 +31,9 @@ Trunk - Unreleased
YARN-524 TestYarnVersionInfo failing if generated properties doesn't YARN-524 TestYarnVersionInfo failing if generated properties doesn't
include an SVN URL. (stevel) include an SVN URL. (stevel)
YARN-487. Modify path manipulation in LocalDirsHandlerService to let
TestDiskFailures pass on Windows. (Chris Nauroth via vinodkv)
BREAKDOWN OF HADOOP-8562 SUBTASKS BREAKDOWN OF HADOOP-8562 SUBTASKS
YARN-158. Yarn creating package-info.java must not depend on sh. YARN-158. Yarn creating package-info.java must not depend on sh.

View File

@ -307,7 +307,7 @@ public static String[] validatePaths(String[] paths) {
URI uriPath = (new Path(paths[i])).toUri(); URI uriPath = (new Path(paths[i])).toUri();
if (uriPath.getScheme() == null if (uriPath.getScheme() == null
|| uriPath.getScheme().equals(FILE_SCHEME)) { || uriPath.getScheme().equals(FILE_SCHEME)) {
validPaths.add(uriPath.getPath()); validPaths.add(new Path(uriPath.getPath()).toString());
} else { } else {
LOG.warn(paths[i] + " is not a valid path. Path should be with " LOG.warn(paths[i] + " is not a valid path. Path should be with "
+ FILE_SCHEME + " scheme or without scheme"); + FILE_SCHEME + " scheme or without scheme");

View File

@ -133,10 +133,10 @@ public void testDirFailuresOnStartup() throws IOException {
dirSvc.init(conf); dirSvc.init(conf);
List<String> localDirs = dirSvc.getLocalDirs(); List<String> localDirs = dirSvc.getLocalDirs();
Assert.assertEquals(1, localDirs.size()); Assert.assertEquals(1, localDirs.size());
Assert.assertEquals(localDir2, localDirs.get(0)); Assert.assertEquals(new Path(localDir2).toString(), localDirs.get(0));
List<String> logDirs = dirSvc.getLogDirs(); List<String> logDirs = dirSvc.getLogDirs();
Assert.assertEquals(1, logDirs.size()); Assert.assertEquals(1, logDirs.size());
Assert.assertEquals(logDir1, logDirs.get(0)); Assert.assertEquals(new Path(logDir1).toString(), logDirs.get(0));
} }
private void testDirsFailures(boolean localORLogDirs) throws IOException { private void testDirsFailures(boolean localORLogDirs) throws IOException {