hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anu Engineer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-15551) Avoid use of Java8 streams in Configuration.addTags
Date Fri, 22 Jun 2018 02:32:00 GMT

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

Anu Engineer commented on HADOOP-15551:
---------------------------------------

[~tlipcon] Thank you very much for catching this and fixing this. This came via Ozone.

 

> Avoid use of Java8 streams in Configuration.addTags
> ---------------------------------------------------
>
>                 Key: HADOOP-15551
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15551
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: performance
>    Affects Versions: 3.2
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Major
>             Fix For: 3.2.0
>
>         Attachments: hadoop-15551.txt
>
>
> Configuration.addTags oddly uses Arrays.stream instead of a more conventional mechanism.
When profiling a simple program that uses Configuration, I found that addTags was taking tens
of millis of CPU to do very little work the first time it's called, accounting for ~8% of
total profiler samples in my program.
> {code}
> [9] 4.52% 253 self: 0.00% 0 java/lang/invoke/MethodHandleNatives.linkCallSite
> [9] 3.71% 208 self: 0.00% 0 java/lang/invoke/MethodHandleNatives.linkMethodHandleConstant
> {code}
> I don't know much about the implementation details of the Streams stuff, but it seems
it's probably meant more for cases with very large arrays or somesuch. Switching to a normal
Set.addAll() call eliminates this from the profile.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message