private static Descriptor loadDescriptor(Class<? extends Message> protoClass)
      throws SerDeException {
    try {
      Method method = protoClass.getMethod("getDescriptor", (Class<?>[])null);
      return (Descriptor)method.invoke(null, (Object[])null);
    } catch (InvocationTargetException | NoSuchMethodException | SecurityException |
        IllegalAccessException | IllegalArgumentException e) {
      throw new SerDeException("Error trying to get descriptor for class: " + protoClass.getName(),
          e);
    }
  }
SerDe to convert ProtoWritable messages to Hive formats.
The serde supports the following properties:
<ul>
  <li>proto.class: This is required and specifies the class to be used to read the messages.</li>
  <li>proto.maptypes: This is optional it declares set of protobuf types that have to be
      converted to map objects instead of struct type. It is applied only on a repeated struct
      field. The message should have 2 fields, first is used as key and second is used as value.
  </li>
</ul>
ql/src/java/org/apache/hadoop/hive/ql/io/protobuf/ProtobufSerDe.java