You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "Wangda Tan (JIRA)" <ji...@apache.org> on 2018/11/28 23:34:00 UTC
[jira] [Resolved] (YARN-8975) [Submarine] Use predefined Charset
object StandardCharsets.UTF_8 instead of String "UTF-8"
[ https://issues.apache.org/jira/browse/YARN-8975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wangda Tan resolved YARN-8975.
------------------------------
Resolution: Fixed
Hadoop Flags: Reviewed
Fix Version/s: 3.3.0
Committed to trunk, thanks [~tangzhankun] and reviews from [~ajisakaa].
> [Submarine] 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
> Fix For: 3.3.0
>
> Attachments: YARN-8975-trunk.001.patch, YARN-8975-trunk.002.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-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-dev-help@hadoop.apache.org