@SuppressWarnings("unchecked")
  public void write(DataOutput out) throws IOException {
    // serial
    out.writeLong(serialVersionUID);
    // schema as string
    out.writeUTF(schema.getName());
    // schema version number
    out.writeInt(schema.getVersionNumber());
    // need a schema serial as well
    int size = properties.size();
    // number of properties
    out.writeInt(size);
    for (Map.Entry<String, Object> entry : properties.entrySet()) {
      String name = entry.getKey();
      // key as string
      out.writeUTF(name);
      PropertyType type = schema.getPropertyType(name);
      // value
      type.write(out, entry.getValue());
    }
  }
The Serialization method.

@param out the output stream
@throws IOException if IO fail
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/PropertyMap.java