You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-dev@hadoop.apache.org by "Chuan Liu (JIRA)" <ji...@apache.org> on 2013/06/28 08:08:20 UTC
[jira] [Created] (MAPREDUCE-5359) JobHistory should not use
File.separator to match timestamp in path
Chuan Liu created MAPREDUCE-5359:
------------------------------------
Summary: 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
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