Skip to content

Commit d46d46c

Browse files
committed
Fixed serializers
1 parent 35f5c09 commit d46d46c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/main/java/ldbc/socialnet/dbgen/util/MapReduceKeyComparator.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,11 @@ public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2){
5656
int block1 = readInt(b1, s1);
5757
int block2 = readInt(b2, s2);
5858
if( block1 != block2 ) return block1 - block2;
59-
int key1[] = {readInt(b1,s1+4), readInt(b1,s1+8), readInt(b1,s1+12)};
60-
int key2[] = {readInt(b2,s2+4), readInt(b2,s2+8), readInt(b2,s2+12)};
61-
if( key1[0] != key2[0]) return key1[0] - key2[0];
62-
if( key1[1] != key2[1]) return key1[1] - key2[1];
63-
if( key1[2] != key2[2]) return key1[2] - key2[2];
64-
long id1 = readLong(b1,s1+16);
65-
long id2 = readLong(b2,s2+16);
59+
int key1 = readInt(b1,s1+4);
60+
int key2 = readInt(b2,s2+4);
61+
if( key1 != key2) return key1 - key2;
62+
long id1 = readLong(b1,s1+8);
63+
long id2 = readLong(b2,s2+8);
6664
return (int)(id1 - id2);
6765
}
6866
}

0 commit comments

Comments
 (0)