Return-Path: X-Original-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4589410AFE for ; Wed, 3 Jul 2013 14:09:25 +0000 (UTC) Received: (qmail 81149 invoked by uid 500); 3 Jul 2013 14:09:24 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 81082 invoked by uid 500); 3 Jul 2013 14:09:24 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 81025 invoked by uid 99); 3 Jul 2013 14:09:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jul 2013 14:09:24 +0000 Date: Wed, 3 Jul 2013 14:09:24 +0000 (UTC) From: "Hudson (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MAPREDUCE-5359) JobHistory should not use File.separator to match timestamp in path MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MAPREDUCE-5359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13698994#comment-13698994 ] Hudson commented on MAPREDUCE-5359: ----------------------------------- Integrated in Hadoop-Mapreduce-trunk #1476 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1476/]) MAPREDUCE-5359. JobHistory should not use File.separator to match timestamp in path. Contributed by Chuan Liu. (Revision 1499153) Result = SUCCESS cnauroth : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1499153 Files : * /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt * /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JobHistoryUtils.java > 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 > Fix For: 3.0.0, 2.1.0-beta > > 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