public Function build(Configuration conf) throws MetaException {
    try {
      if (owner != null) {
        owner = SecurityUtils.getUser();
      }
    } catch (IOException e) {
      throw MetaStoreUtils.newMetaException(e);
    }
    if (catName == null) catName = MetaStoreUtils.getDefaultCatalog(conf);
    Function f = new Function(funcName, dbName, className, owner, ownerType, createTime, funcType,
        resourceUris);
    f.setCatName(catName);
    return f;
  }
Class for creating Thrift Function objects for tests, and API usage.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/client/builder/FunctionBuilder.java