Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-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 52E287188 for ; Wed, 12 Oct 2011 03:17:40 +0000 (UTC) Received: (qmail 8575 invoked by uid 500); 12 Oct 2011 03:17:40 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 8531 invoked by uid 500); 12 Oct 2011 03:17:38 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 8498 invoked by uid 99); 12 Oct 2011 03:17:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Oct 2011 03:17:36 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Oct 2011 03:17:34 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 090CF30422F for ; Wed, 12 Oct 2011 03:17:13 +0000 (UTC) Date: Wed, 12 Oct 2011 03:17:13 +0000 (UTC) From: "Harsh J (Assigned) (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <913213156.3539.1318389433057.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Assigned] (HADOOP-6490) Path.normalize should use StringUtils.replace in favor of String.replace MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-6490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Harsh J reassigned HADOOP-6490: ------------------------------- Assignee: Uma Maheswara Rao G +1. TestPath passes with all its existing Normalization tests. Pushing. > Path.normalize should use StringUtils.replace in favor of String.replace > ------------------------------------------------------------------------ > > Key: HADOOP-6490 > URL: https://issues.apache.org/jira/browse/HADOOP-6490 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 0.20.1 > Reporter: Zheng Shao > Assignee: Uma Maheswara Rao G > Priority: Minor > Labels: newbie > Attachments: HADOOP-6490.patch > > > in our environment, we are seeing that the JobClient is going out of memory because Path.normalizePath(String) is called several tens of thousands of times, and each time it calls "String.replace" twice. > java.lang.String.replace compiles a regex to do the job which is very costly. > We should use org.apache.commons.lang.StringUtils.replace which is much faster and consumes almost no extra memory. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira