On 26/06/2015 11:48, Alan Burlison (JIRA) wrote:
Summary: MapReduceClient's primitives.h is toxic and should be
extirpated
I've added an analysis of where primitives.h is used. I believe the
correct solution is in several parts, some of which will require
modifications to the patch for HADOOP-11665:
1. Probe for platform-specific endian-independent macros (e.g. htonl
etc) and set up HADOOP_GETNNXX aliases for them if they are available.
This should be added to the patch for HADOOP-11665.
2. If we can't find platform-specific versions, do endianness detection
via CMake's standard module and use that to define HADOOP_GETNNXX
aliases for the gcc byteswap builtins, as per the current patch for
HADOOP-11665.
3. Make the new macros globally available and use them to provide the
endian fixes fixes already in the patch for HADOOP-11665
4. Delete primitives.h from MR Client as per the comments in
MAPREDUCE-6417. Memory copy and comparison operations should be done
using the standard libc functions for those operations.
5. Go through all the current MR Client code examining all the places
where byteswaps are done and (in nearly all cases I suspect) replace
them with the endian-independence macros introduced by HADOOP-11665.
Thoughts?
--
Alan Burlison
--