On Dec 2, 2007, at 2:20 AM, André Martin wrote:
Hi Camilo,
probably it's because you are using out.write instead of
out.writeInt - my guess...
Your guess is right. Those should be out.writeInt. Another suggestion
is that you should be defining the raw comparators to get better
performance from the sort. Look at the implementation of IntWritable
for how to do it.
A meta-suggestion is to look at the record io class. In particular,
your class would look like:
module org.apache.hadoop.sample {
class ClassAttributeValueKey {
int classification;
int attribute;
int value;
}
}
save it to a file named mykey.jr and run bin/rcc mykey.jr to generate
the java source code.
-- Owen