hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raghu Angadi (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-1387) FindBugs -> Performance
Date Fri, 18 May 2007 18:06:16 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496983
] 

Raghu Angadi commented on HADOOP-1387:
--------------------------------------

I just took a quick look to see what kind of changes go into FindBug fixes.

regd :
{code}
--- src/webapps/job/analysejobhistory.jsp	(revision 539486)
+++ src/webapps/job/analysejobhistory.jsp	(working copy)
@@ -82,8 +82,8 @@
 	}
 	Comparator<JobHistory.Task> cMap = new Comparator<JobHistory.Task>(){
 	  public int compare(JobHistory.Task t1, JobHistory.Task t2){
-	    Long l1 = new Long(t1.getLong(Keys.FINISH_TIME) - t1.getLong(Keys.START_TIME)); 
-	    Long l2 = new Long(t2.getLong(Keys.FINISH_TIME) - t2.getLong(Keys.START_TIME)) ;
+	    Long l1 = t1.getLong(Keys.FINISH_TIME) - t1.getLong(Keys.START_TIME); 
+	    Long l2 = t2.getLong(Keys.FINISH_TIME) - t2.getLong(Keys.START_TIME);
 	    return l2.compareTo(l1); 
 	  }
 	}; 
{code}
Does this reduce an allocation? Should it be: {{long l1 =  ...;  long l2 = ...;}} . 

> FindBugs -> Performance 
> ------------------------
>
>                 Key: HADOOP-1387
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1387
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.12.3
>            Reporter: Arun C Murthy
>         Assigned To: Arun C Murthy
>             Fix For: 0.14.0
>
>         Attachments: HADOOP-1387_1_20070518.patch
>
>
> Fix the 'Performance' bugs shown up by findbugs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message