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.
