hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-5359) JobHistory should not use File.separator to match timestamp in path
Date Tue, 02 Jul 2013 23:35:20 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-5359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13698394#comment-13698394
] 

Chris Nauroth commented on MAPREDUCE-5359:
------------------------------------------

{quote}
-1 tests included. The patch doesn't appear to include any new or modified tests.
Please justify why no new tests are needed for this patch.
Also please list what manual steps were performed to verify this patch.
{quote}

This patch fixes existing tests on Windows, so no new tests are needed.
                
> JobHistory should not use File.separator to match timestamp in path
> -------------------------------------------------------------------
>
>                 Key: MAPREDUCE-5359
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5359
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 3.0.0, 2.1.0-beta
>            Reporter: Chuan Liu
>            Assignee: Chuan Liu
>            Priority: Minor
>         Attachments: MAPREDUCE-5359-trunk.2.patch, MAPREDUCE-5359-trunk.patch
>
>
> In {{HistoryFileManager.getTimestampPartFromPath()}} method, we use the following regular
expression to match the timestamp in a Path object. 
> {code:java}
> "\\d{4}" + "\\" + File.separator +  "\\d{2}" + "\\" + File.separator + "\\d{2}"
> {code}
> This is incorrect because Path uses backslash even for Windows path while File.separator
is platform dependent, and is a forward slash on Windows.
> This leads to failure matching the timestamp on Windows. One consequence is that {{addDirectoryToSerialNumberIndex()}}
also failed. Later, {{getFileInfo()}} will fail if the job info is not in cache or intermediate
directory.
> The test case {{TestJobHistoryParsing.testScanningOldDirs()}} tests exactly the above
scenario and fails on Windows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message