hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vrushali C (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-5336) Limit the flow name size & consider cleanup for hex chars
Date Fri, 25 Jan 2019 05:08:00 GMT

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

Vrushali C commented on YARN-5336:
----------------------------------

Thanks Sushil! Patch 002 looks better but there is one place L206 in TimelineUtils.java. 

I was wondering about the following, what do you think:

{code}
    if (length <= 0) {
	      length = flowName.length();
    }
    return flowName.substring(0, length);
{code}

>From Java 1.7.0_06, that String.substring now has a linear complexity instead of a constant
one. Reference bug:https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4513622 

So:
- let's update code to use StringUtils for the substring.
- Also, when length is <=0, let's simply return the flowname instead of calculating the
entire substring again as the flowname. This will help improve the time performance of the
code. 





> Limit the flow name size & consider cleanup for hex chars
> ---------------------------------------------------------
>
>                 Key: YARN-5336
>                 URL: https://issues.apache.org/jira/browse/YARN-5336
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>            Reporter: Vrushali C
>            Assignee: Sushil Ks
>            Priority: Major
>              Labels: YARN-5355
>         Attachments: YARN-5336.001.patch, YARN-5336.002.patch
>
>
> As recommended by [~jrottinghuis] , need to add in some limit (default and configurable)
for accepting key values to be written to the backend.



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

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


Mime
View raw message