private static void generateAvroStructFromClass(String serClassName, StringBuilder sb)
      throws SerDeException {
    Class<?> serClass;
    try {
      serClass = JavaUtils.loadClass(serClassName);
    } catch (ClassNotFoundException e) {
      throw new SerDeException("Error obtaining descriptor for " + serClassName, e);
    }

    Schema schema = ReflectData.get().getSchema(serClass);

    generateAvroStructFromSchema(schema, sb);
  }
Auto-generate the avro struct from class

@param serClassName serialization class for avro struct
@param sb StringBuilder to hold the generated struct
@throws SerDeException if something goes wrong while generating the struct
hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseSerDeHelper.java