public static void addKryoTypeHook(Class<?> clazz, Hook hook) {
    kryoTypeHooks.put(clazz, hook);
  }
Must be called before any serialization takes place (e.g. in some static/service init)!
Not thread safe.

Will not work if different classes are added in different order on two sides of the
communication, due to explicit class registration that we use causing class ID mismatch.
Some processing might be added for this later (e.g. sorting the overrides here if the order
is hard to enforce, and making sure they are added symmetrically everywhere, or just
reverting back to hardcoding stuff if all else fails).
For now, this seems to work, but Kryo seems pretty brittle. Seems to be ok to add class on
read side but not write side, the other way doesn't work. Kryo needs a proper event system,
otherwise this is all rather brittle.
ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java