hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandy Ryza (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-5777) Support utf-8 text with BOM (byte order marker)
Date Mon, 02 Jun 2014 16:13:03 GMT

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

Sandy Ryza commented on MAPREDUCE-5777:
---------------------------------------

Thanks for the patch Zhihai.  It looks good, just a few nits:

{code}
+        int newMaxLineLength = (int) Math.min(3L + (long) maxLineLength,
+            Integer.MAX_VALUE);
{code}
Why use longs here?

{code}
+          LOG.info("Found UTF-8 BOM and Skipped it");
{code}
"Skipped" shouldn't be capitalized.

Can we move the new code into a sub-method, skipUtfByteOrderMark?

> Support utf-8 text with BOM (byte order marker)
> -----------------------------------------------
>
>                 Key: MAPREDUCE-5777
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5777
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>    Affects Versions: 0.22.0, 2.2.0
>            Reporter: bc Wong
>            Assignee: zhihai xu
>         Attachments: MAPREDUCE-5777.000.patch, MAPREDUCE-5777.001.patch, MAPREDUCE-5777.002.patch,
MAPREDUCE-5777.003.patch
>
>
> UTF-8 text may have a BOM. TextInputFormat, KeyValueTextInputFormat and friends should
recognize the BOM and not treat it as actual data.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message