@Override
public void writeExternal(ObjectOutput out) throws IOException {
try {
// get the tableDesc from the map stored in the mapjoin operator
HashTableSinkObjectCtx ctx = MapJoinMetaData.get(
Integer.valueOf(metadataTag));
// Different processing for key and value
Writable outVal = ctx.getSerDe().serialize(obj, ctx.getStandardOI());
outVal.write(out);
} catch (SerDeException e) {
throw new IOException(e);
}
}