for (Map.Entry<Datum, Datum> entry : map.entrySet()) {
DATUM_SER_DE.serialize(entry.getKey(), out);
DATUM_SER_DE.serialize(entry.getValue(), out);
}
} catch (IOException e) {
throw new SerDeException(e);
}
} else {
throw new IllegalArgumentException(
"MapDatum.SerDe serializer requires MapDatum"
);