You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Colin Patrick McCabe (JIRA)" <ji...@apache.org> on 2015/05/26 23:58:20 UTC

[jira] [Commented] (HADOOP-11505) hadoop-mapreduce-client-nativetask uses bswap where be32toh is needed, doesn't work on non-x86

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

Colin Patrick McCabe commented on HADOOP-11505:
-----------------------------------------------

It seems that the code was written with "bswap" (byte swap) used where "network-to-host" (ntohl, ntohs) was actually what was intended.  On a big-endian architecture, no byte swapping is needed in these cases.  There are already standard functions for converting between network and host byte order such as be32toh, be64toh, so we should use those.

> hadoop-mapreduce-client-nativetask uses bswap where be32toh is needed, doesn't work on non-x86
> ----------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-11505
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11505
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>              Labels: BB2015-05-TBR
>         Attachments: HADOOP-11505.001.patch
>
>
> hadoop-mapreduce-client-nativetask fails to use x86 optimizations in some cases.  Also, on some alternate, non-x86, non-ARM architectures the generated code is incorrect.  Thanks to Steve Loughran and Edward Nevill for finding this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)