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 581F673E6 for ; Wed, 12 Oct 2011 03:27:37 +0000 (UTC) Received: (qmail 14177 invoked by uid 500); 12 Oct 2011 03:27:36 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 14043 invoked by uid 500); 12 Oct 2011 03:27:36 -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 13958 invoked by uid 99); 12 Oct 2011 03:27:35 -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:27:35 +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:27:33 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id F3F4D3045D0 for ; Wed, 12 Oct 2011 03:27:11 +0000 (UTC) Date: Wed, 12 Oct 2011 03:27:11 +0000 (UTC) From: "Hudson (Commented) (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <1574750797.3564.1318390032000.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (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:comment-tabpanel&focusedCommentId=13125563#comment-13125563 ] Hudson commented on HADOOP-6490: -------------------------------- Integrated in Hadoop-Hdfs-trunk-Commit #1137 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1137/]) HADOOP-6490. Use StringUtils over String#replace in Path#normalizePath. Contributed by Uma Maheswara Rao G. harsh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1182189 Files : * /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt * /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java > 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 > Fix For: 0.24.0 > > 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