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 63936E896 for ; Tue, 5 Feb 2013 22:39:14 +0000 (UTC) Received: (qmail 97798 invoked by uid 500); 5 Feb 2013 22:39:14 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 97749 invoked by uid 500); 5 Feb 2013 22:39:14 -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 97736 invoked by uid 99); 5 Feb 2013 22:39:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2013 22:39:14 +0000 Date: Tue, 5 Feb 2013 22:39:13 +0000 (UTC) From: "Chu Tong (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events 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-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chu Tong updated MAPREDUCE-4822: -------------------------------- Status: Patch Available (was: Open) > Unnecessary conversions in History Events > ----------------------------------------- > > Key: MAPREDUCE-4822 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822 > Project: Hadoop Map/Reduce > Issue Type: Improvement > Components: jobhistoryserver > Affects Versions: 0.23.4 > Reporter: Robert Joseph Evans > Assignee: Chu Tong > Priority: Trivial > Labels: patch > Fix For: 0.24.0 > > Attachments: MAPREDUCE-4822.patch > > > There are a number of conversions in the Job History Event classes that are totally unnecessary. It appears that they were originally used to convert from the internal avro format, but now many of them do not pull the values from the avro they store them internally. > For example: > {code:title=TaskAttemptFinishedEvent.java} > /** Get the task type */ > public TaskType getTaskType() { > return TaskType.valueOf(taskType.toString()); > } > {code} > The code currently is taking an enum, converting it to a string and then asking the same enum to convert it back to an enum. If java work properly this should be a noop and a reference to the original taskType should be returned. > There are several places that a string is having toString called on it, and since strings are immutable it returns a reference to itself. > The various ids are not immutable and probably should not be changed at this point. -- 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