[
https://issues.apache.org/jira/browse/MAPREDUCE-6730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15370167#comment-15370167
]
ASF GitHub Bot commented on MAPREDUCE-6730:
-------------------------------------------
GitHub user SahilKang reopened a pull request:
https://github.com/apache/hadoop/pull/114
MAPREDUCE-6730 Use StandardCharsets instead of String overload
Use String.getBytes(StandardCharsets.UTF_8) instead of
String.getBytes(String).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/SahilKang/hadoop trunk
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/hadoop/pull/114.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #114
----
commit f234dd88bce1189de9a5286eb7326453f9997d0a
Author: Sahil Kang <[email protected]>
Date: 2016-07-11T04:32:57Z
MAPREDUCE-6730 Use StandardCharsets
Use String.getBytes(StandardCharsets.UTF_8) instead of
String.getBytes(String).
----
> Use StandardCharsets instead of String overload
> -----------------------------------------------
>
> Key: MAPREDUCE-6730
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-6730
> Project: Hadoop Map/Reduce
> Issue Type: Improvement
> Reporter: Sahil Kang
> Priority: Minor
>
> In TextOutputFormat.java, instead of:
> {code:java}
> private static final String utf8 = "UTF-8";
> private static final byte[] newline;
> static {
> try {
> newline = "\n".getBytes(utf8);
> } catch (UnsupportedException uee) {
> threw new IllegalArgumentException("can't find " + utf8 + " encoding");
> }
> }
> {code}
> Let's do something like:
> {code:java}
> private static final byte[] newline = "\n".getBytes(StandardCharsets.UTF_8);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]