[ https://issues.apache.org/jira/browse/MAPREDUCE-6672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15263102#comment-15263102 ]
Chris Nauroth commented on MAPREDUCE-6672: ------------------------------------------ Hello [~kis...@freemail.hu], thank you for finding this bug and providing a patch. I agree that ideally the fix should involve going through the {{Path}} class, because that already encapsulates the OS detection and special case handling for the Windows drive spec. Can you try testing the following? {code} private static final String TEST_DIR = new Path( new File(System.getProperty("test.build.data", "/tmp"), "terasort") .getAbsoluteFile().toURI()).toString(); {code} I expect this will work. Converting the {{File}} to {{URI}} explicitly captures that the scheme is "file:". Then, passing that {{URI}} through {{Path}} uses the Windows special-case path handling logic that we use throughout Hadoop. > TestTeraSort fails on Windows > ----------------------------- > > Key: MAPREDUCE-6672 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-6672 > Project: Hadoop Map/Reduce > Issue Type: Bug > Components: test > Affects Versions: 3.0.0, 2.8.0 > Environment: OS: Windows Server 2012 > JDK: Oracle 1.7.0_79 > Reporter: Tibor Kiss > Assignee: Tibor Kiss > Priority: Minor > Attachments: MAPREDUCE-6672.01.patch > > > TestTeraSort testcase fails on Windows. > The test case uses the build directory as test working directory. > Under Windows the build directory starts with a drive definition ( "C:" ), > which is interpreted as (an invalid) URI scheme. > The fix is trivial: Add URI scheme to the beginning of the working directory. > Error message: > {noformat} > Running org.apache.hadoop.examples.terasort.TestTeraSort > Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.647 sec <<< > FAILURE! - in org.apache.hadoop.examples.terasort.TestTeraSort > testTeraSort(org.apache.hadoop.examples.terasort.TestTeraSort) Time elapsed: > 3.359 sec <<< ERROR! > java.io.IOException: No FileSystem for scheme: C > at > org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2787) > at > org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2798) > at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:99) > at > org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2837) > at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2819) > at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:381) > at > org.apache.hadoop.mapreduce.filecache.ClientDistributedCacheManager.getFileStatus(ClientDistributedCacheManager.java:223) > at > org.apache.hadoop.mapreduce.filecache.ClientDistributedCacheManager.determineTimestamps(ClientDistributedCacheManager.java:93) > at > org.apache.hadoop.mapreduce.filecache.ClientDistributedCacheManager.determineTimestampsAndCacheVisibilities(ClientDistributedCacheManager.java:57) > at > org.apache.hadoop.mapreduce.JobResourceUploader.uploadFiles(JobResourceUploader.java:179) > at > org.apache.hadoop.mapreduce.JobSubmitter.copyAndConfigureFiles(JobSubmitter.java:98) > at > org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:193) > at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1341) > at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1338) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:415) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1742) > at org.apache.hadoop.mapreduce.Job.submit(Job.java:1338) > at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1359) > at org.apache.hadoop.examples.terasort.TeraSort.run(TeraSort.java:331) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) > at > org.apache.hadoop.examples.terasort.TestTeraSort.runTeraSort(TestTeraSort.java:75) > at > org.apache.hadoop.examples.terasort.TestTeraSort.testTeraSort(TestTeraSort.java:101) > Results : > Tests in error: > TestTeraSort.testTeraSort:101->runTeraSort:75 ╗ IO No FileSystem for > scheme: C > Tests run: 2, Failures: 0, Errors: 1, Skipped: 0 > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)