Skip to content

Instantly share code, notes, and snippets.

@Stivo
Stivo / TupleWritable.scala
Created June 14, 2012 13:49
Performance fixes for crunch's join
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
// No static typeinfo on Tuples
public void readFields(DataInput in) throws IOException {
int card = WritableUtils.readVInt(in);
if (values == null || values.length != card) {
values = new Writable[card];
}