hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhankun Tang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-8975) Use predefined Charset object StandardCharsets.UTF_8 instead of String "UTF-8"
Date Tue, 06 Nov 2018 09:53:00 GMT

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

Zhankun Tang commented on YARN-8975:
------------------------------------

[~leftnoteasy] , please help to review. Thanks.

> Use predefined Charset object StandardCharsets.UTF_8 instead of String "UTF-8"
> ------------------------------------------------------------------------------
>
>                 Key: YARN-8975
>                 URL: https://issues.apache.org/jira/browse/YARN-8975
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Zhankun Tang
>            Assignee: Zhankun Tang
>            Priority: Trivial
>         Attachments: YARN-8975-trunk.001.patch
>
>
> {code:java}
> Writer w = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");{code}
> Could be refactored to this to improve a little bit performance due to avoid string
lookup:
> {code:java}
> Writer w = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8);{code}



--
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