UserCodeClassLoader getOrResolveClassLoader(Collection<PermanentBlobKey> requiredJarFiles, Collection<URL> requiredClasspaths) throws IOException
In order to retrieve the user code class loader the caller has to specify the required jars and class paths. Upon calling this method first for a job, it will make sure that the required jars are present and potentially cache the created user code class loader. Every subsequent call to this method, will ensure that created user code class loader can fulfill the required jar files and class paths.
requiredJarFiles- requiredJarFiles the user code class loader needs to load
requiredClasspaths- requiredClasspaths the user code class loader needs to be started with
IOException- if the required jar files cannot be downloaded
IllegalStateException- if the cached user code class loader does not fulfill the requirements
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.