@Override
    public void write(Kryo kryo, Output output, Map map) {
      super.write(kryo, output, map);
      CopyOnFirstWriteProperties p = (CopyOnFirstWriteProperties) map;
      Properties ip = p.getInterned();
      kryo.writeObjectOrNull(output, ip, Properties.class);
    }
CopyOnFirstWriteProperties needs a special serializer, since it extends Properties,
which implements Map, so MapSerializer would be used for it by default. Yet it has
the additional 'interned' field that the standard MapSerializer doesn't handle
properly. But FieldSerializer doesn't work for it as well, because the Hashtable
superclass declares most of its fields transient.
ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java