[ 
https://issues.apache.org/jira/browse/MAPREDUCE-6394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14635878#comment-14635878
 ] 

Jason Lowe commented on MAPREDUCE-6394:
---------------------------------------

Thanks for the analysis and patch, Ray!  Sorry for the delay in reviewing.

General comment: If the file is going to import a particular version of 
Counters then I don't see the need to go changing it in many but not all places 
in the file.  It should either remove the import and explicitly list the fully 
qualified classname in each instance or only list it when it's not using the 
one that was imported.  My preference is for the latter, as this is already 
done for mapred vs. mapreduce and similar situations like this.  It also makes 
the patch smaller.

In the PBImpl files, I don't see why we need a separate boolean to track 
whether we've converted rawCounters into counters.  If counters is null and 
rawCounters isn't, we should convert and null out rawCounters otherwise we 
shouldn't.  Am I missing the case where the separate boolean is really needed 
to distinguish?

Also in the PBImpl files, it looks like building the protobuf is incorrect if 
someone sets the raw counters and then tries to build.  The build method simply 
checks if counters is not null to see if they should be included, but they will 
be null if only rawCounters was set and nobody called getCounters before 
calling getProto.  That's an example where unit tests would have been useful, 
since the patch adds a new interface to those PBImpls that isn't currently 
covered by tests.


> Speed up Task processing loop in HsTasksBlock#render()
> ------------------------------------------------------
>
>                 Key: MAPREDUCE-6394
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6394
>             Project: Hadoop Map/Reduce
>          Issue Type: Sub-task
>          Components: jobhistoryserver
>    Affects Versions: 2.7.0
>            Reporter: Ray Chiang
>            Assignee: Ray Chiang
>              Labels: supportability
>         Attachments: MAPREDUCE-6394.001.patch, MAPREDUCE-6394.002.patch, 
> MAPREDUCE-6394.003.patch, MAPREDUCE-6394.004.patch, MAPREDUCE-6394.005.patch, 
> MAPREDUCE-6394.006.patch
>
>
> In HsTasksBlock#render(), there is a loop to create a Javascript table which 
> slows down immensely on jobs with a large number of tasks (200k or more).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to