Interface LibraryCacheManager.ClassLoaderHandle

All Known Subinterfaces:
LibraryCacheManager.ClassLoaderLease
Enclosing interface:
LibraryCacheManager

public static interface LibraryCacheManager.ClassLoaderHandle
Handle to retrieve a user code class loader for the associated job.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.flink.util.UserCodeClassLoader
    getOrResolveClassLoader(Collection<PermanentBlobKey> requiredJarFiles, Collection<URL> requiredClasspaths)
    Gets or resolves the user code class loader for the associated job.
  • Method Details

    • getOrResolveClassLoader

      org.apache.flink.util.UserCodeClassLoader getOrResolveClassLoader(Collection<PermanentBlobKey> requiredJarFiles, Collection<URL> requiredClasspaths) throws IOException
      Gets or resolves the user code class loader for the associated job.

      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.

      Parameters:
      requiredJarFiles - requiredJarFiles the user code class loader needs to load
      requiredClasspaths - requiredClasspaths the user code class loader needs to be started with
      Returns:
      the user code class loader fulfilling the requirements
      Throws:
      IOException - if the required jar files cannot be downloaded
      IllegalStateException - if the cached user code class loader does not fulfill the requirements