public void startLocalizeAllFunctions() throws HiveException {
    Hive hive = Hive.get(false);
    // Do not allow embedded metastore in LLAP unless we are in test.
    try {
      hive.getMSC(HiveConf.getBoolVar(conf, ConfVars.HIVE_IN_TEST), true);
    } catch (MetaException e) {
      throw new HiveException(e);
    }
    List<Function> fns = hive.getAllFunctions();
    for (Function fn : fns) {
      String fqfn = fn.getDbName() + "." + fn.getFunctionName();
      List<ResourceUri> resources = fn.getResourceUris();
      if (resources == null || resources.isEmpty()) continue; // Nothing to localize.
      FnResources result = new FnResources();
      resourcesByFn.put(fqfn, result);
      workQueue.add(new LocalizeFn(fqfn, resources, result, fn.getClassName(), false));
    }
    workQueue.add(new RefreshClassloader());
  }
This class localizes and manages jars for the functions allowed inside LLAP.
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/FunctionLocalizer.java