hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Strange output in modified TeraSort
Date Wed, 22 Sep 2010 10:27:32 GMT
On 21/09/10 12:13, Matthew John wrote:
> Hi all ,
>
>        I am working on a Sort function which takes in records of 40 bytes ( 8
> bytes longwritable key and 32 bytes bytes byteswritable key ) and sorts them
> and output them. For this I have got a modified Terasort working (thanks to
> Jeff !) . Since the long long type in c  and java long are not compatible,
> (for eg . 1 in C long long -->  0001 0000 0000 0000 and in Java long -->  0000
> 0000 0000 0100 )

Looks like there are endian-ness issues. Why not have the C-side code 
use the x86 BSWAP operation and put things into Java order before the 
code goes near it; this is probably the most efficient way to do the 
reordering.

Mime
View raw message