Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-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 998BF102BC for ; Thu, 8 Aug 2013 20:22:50 +0000 (UTC) Received: (qmail 15023 invoked by uid 500); 8 Aug 2013 20:22:50 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 14994 invoked by uid 500); 8 Aug 2013 20:22:50 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 14985 invoked by uid 99); 8 Aug 2013 20:22:50 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Aug 2013 20:22:50 +0000 Date: Thu, 8 Aug 2013 20:22:50 +0000 (UTC) From: "Siddharth Seth (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-1045) Improve toString implementation for PBImpls 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/YARN-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13733934#comment-13733934 ] Siddharth Seth commented on YARN-1045: -------------------------------------- Thanks for taking this up Jian. Did you get a chance to run all MR and YARN unit tests locally - in case we're relying on the toString format anywhere. > Improve toString implementation for PBImpls > ------------------------------------------- > > Key: YARN-1045 > URL: https://issues.apache.org/jira/browse/YARN-1045 > Project: Hadoop YARN > Issue Type: Improvement > Affects Versions: 2.0.4-alpha > Reporter: Siddharth Seth > Assignee: Jian He > Attachments: YARN-1045.patch > > > The generic toString implementation that is used in most of the PBImpls {code}getProto().toString().replaceAll("\\n", ", ").replaceAll("\\s+", " ");{code} is rather inefficient - replacing "\n" and "\s" to generate a one line string. Instead, we can use {code}TextFormat.shortDebugString(getProto());{code}. > If we can get this into 2.1.0 - great, otherwise the next release. -- 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