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:
parent
fd1000bcef
commit
add00d6d74
|
@ -31,6 +31,9 @@ Trunk - Unreleased
|
|||
YARN-524 TestYarnVersionInfo failing if generated properties doesn't
|
||||
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
|
||||
|
||||
YARN-158. Yarn creating package-info.java must not depend on sh.
|
||||
|
|
|
@ -307,7 +307,7 @@ public class LocalDirsHandlerService extends AbstractService {
|
|||
URI uriPath = (new Path(paths[i])).toUri();
|
||||
if (uriPath.getScheme() == null
|
||||
|| uriPath.getScheme().equals(FILE_SCHEME)) {
|
||||
validPaths.add(uriPath.getPath());
|
||||
validPaths.add(new Path(uriPath.getPath()).toString());
|
||||
} else {
|
||||
LOG.warn(paths[i] + " is not a valid path. Path should be with "
|
||||
+ FILE_SCHEME + " scheme or without scheme");
|
||||
|
|
|
@ -133,10 +133,10 @@ public class TestDiskFailures {
|
|||
dirSvc.init(conf);
|
||||
List<String> localDirs = dirSvc.getLocalDirs();
|
||||
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();
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue