Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 D61B110B7C for ; Fri, 11 Mar 2016 18:47:39 +0000 (UTC) Received: (qmail 97502 invoked by uid 500); 11 Mar 2016 18:47:39 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 97417 invoked by uid 500); 11 Mar 2016 18:47:39 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 97354 invoked by uid 99); 11 Mar 2016 18:47:39 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Mar 2016 18:47:39 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0712A2C1F64 for ; Fri, 11 Mar 2016 18:47:39 +0000 (UTC) Date: Fri, 11 Mar 2016 18:47:39 +0000 (UTC) From: "Wei-Chiu Chuang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-9350) Avoid creating temprorary strings in Block.toString() and getBlockName() 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/HDFS-9350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15191363#comment-15191363 ] Wei-Chiu Chuang commented on HDFS-9350: --------------------------------------- [~cnauroth], you're absolutely right about it. In HDFS-7284, the original intent was to print just the Block portion, not the subclass. We added the static method because typecasting doesn't change runtime binding. If the goal is to avoid creating temp strings, I think we could create a static appendStringTo() method, and call the static method instead. > Avoid creating temprorary strings in Block.toString() and getBlockName() > ------------------------------------------------------------------------ > > Key: HDFS-9350 > URL: https://issues.apache.org/jira/browse/HDFS-9350 > Project: Hadoop HDFS > Issue Type: Improvement > Components: performance > Affects Versions: 2.7.1 > Reporter: Staffan Friberg > Assignee: Staffan Friberg > Priority: Minor > Fix For: 2.9.0 > > Attachments: HDFS-9350.001.patch > > > Minor change to use StringBuilders directly to avoid creating temporary strings of Long and Block name when doing toString on a Block. -- This message was sent by Atlassian JIRA (v6.3.4#6332)