public static MessageEncoder getInstance(Configuration conf, String config) {
    String clazz =
            MetastoreConf.get(conf, config);
    try {
      Class<?> clazzObject = MessageFactory.class.getClassLoader().loadClass(clazz);
      return (MessageEncoder) requiredMethod(clazzObject).invoke(null);
    } catch (Exception e) {
      String message = "could not load the configured class " + clazz;
      LOG.error(message, e);
      throw new IllegalStateException(message, e);
    }
  }
Abstract Factory for the construction of HCatalog message instances.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/MessageFactory.java