You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/09/01 12:26:00 UTC

[jira] [Updated] (HADOOP-15551) Avoid use of Java8 streams in Configuration.addTags

     [ https://issues.apache.org/jira/browse/HADOOP-15551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated HADOOP-15551:
------------------------------------
    Labels: pull-request-available  (was: )

> 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.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.2.0
>
>         Attachments: hadoop-15551.txt
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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
(v8.3.4#803005)

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