private void localizeFunctionResources(String fqfn, List<ResourceUri> resources,
      String className, FnResources result, boolean doRefreshClassloader) throws URISyntaxException, IOException {
    // We will download into fn-scoped subdirectories to avoid name collisions (we assume there
    // are no collisions within the same fn). That doesn't mean we download for every fn.
    if (LOG.isInfoEnabled()) {
      LOG.info("Localizing " + resources.size() + " resources for " + fqfn);
    }
    for (ResourceUri resource : resources) {
      URI srcUri = ResourceDownloader.createURI(resource.getUri());
      ResourceType rt = FunctionUtils.getResourceType(resource.getResourceType());
      localizeOneResource(fqfn, srcUri, rt, result);
    }
    recentlyLocalizedClasses.add(className);
    if (doRefreshClassloader) {
      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