code: public static HiveRegister get(String hiveRegisterType, State props, Optional<String> metastoreURI) {
      try {
        return (HiveRegister) ConstructorUtils.invokeConstructor(Class.forName(hiveRegisterType), props, metastoreURI);
      } catch (ReflectiveOperationException e) {
        throw Throwables.propagate(e);
      }
    }
docs: Get an instance of {@link HiveRegister}.
  
  @param hiveRegisterType The name of a class that implements {@link HiveRegister}.
  @param props A {@link State} object used to instantiate the {@link HiveRegister} object.