public class BlobLibraryCacheManager extends Object implements LibraryCacheManager
PermanentBlobService and create a class loader with references to them.| Constructor and Description |
|---|
BlobLibraryCacheManager(PermanentBlobService blobService,
FlinkUserCodeClassLoaders.ResolveOrder classLoaderResolveOrder,
String[] alwaysParentFirstPatterns) |
| Modifier and Type | Method and Description |
|---|---|
ClassLoader |
getClassLoader(org.apache.flink.api.common.JobID jobId)
Returns the user code class loader associated with id.
|
boolean |
hasClassLoader(org.apache.flink.api.common.JobID jobId)
True if the LibraryCacheManager has a user code class loader registered
for the given job id.
|
void |
registerJob(org.apache.flink.api.common.JobID id,
Collection<PermanentBlobKey> requiredJarFiles,
Collection<URL> requiredClasspaths)
Registers a job with its required jar files and classpaths.
|
void |
registerTask(org.apache.flink.api.common.JobID jobId,
ExecutionAttemptID task,
Collection<PermanentBlobKey> requiredJarFiles,
Collection<URL> requiredClasspaths)
Registers a job task execution with its required jar files and classpaths.
|
void |
shutdown()
Shutdown method which may release created class loaders.
|
void |
unregisterJob(org.apache.flink.api.common.JobID id)
Unregisters a job from the library cache manager.
|
void |
unregisterTask(org.apache.flink.api.common.JobID jobId,
ExecutionAttemptID task)
Unregisters a job task execution from the library cache manager.
|
public BlobLibraryCacheManager(PermanentBlobService blobService, FlinkUserCodeClassLoaders.ResolveOrder classLoaderResolveOrder, String[] alwaysParentFirstPatterns)
public void registerJob(org.apache.flink.api.common.JobID id,
Collection<PermanentBlobKey> requiredJarFiles,
Collection<URL> requiredClasspaths)
throws IOException
LibraryCacheManagerClassLoader.registerJob in interface LibraryCacheManagerid - job IDrequiredJarFiles - collection of blob keys identifying the required jar filesrequiredClasspaths - collection of classpaths that are added to the user code class loaderIOException - if any error occurs when retrieving the required jar filescounterpart of this methodpublic void registerTask(org.apache.flink.api.common.JobID jobId,
ExecutionAttemptID task,
@Nullable
Collection<PermanentBlobKey> requiredJarFiles,
@Nullable
Collection<URL> requiredClasspaths)
throws IOException
LibraryCacheManagerClassLoader.registerTask in interface LibraryCacheManagerjobId - job IDrequiredJarFiles - collection of blob keys identifying the required jar filesrequiredClasspaths - collection of classpaths that are added to the user code class loaderIOException - if any error occurs when retrieving the required jar filescounterpart of this methodpublic void unregisterJob(org.apache.flink.api.common.JobID id)
LibraryCacheManager
Note: this is the counterpart of LibraryCacheManager.registerJob(JobID, Collection,
Collection) and it will not remove any job task execution added via LibraryCacheManager.registerTask(JobID, ExecutionAttemptID, Collection, Collection)!
unregisterJob in interface LibraryCacheManagerid - job IDcounterpart of this methodpublic void unregisterTask(org.apache.flink.api.common.JobID jobId,
ExecutionAttemptID task)
LibraryCacheManager
Note: this is the counterpart of LibraryCacheManager.registerTask(JobID,
ExecutionAttemptID, Collection, Collection) and it will not remove any job added via
LibraryCacheManager.registerJob(JobID, Collection, Collection)!
unregisterTask in interface LibraryCacheManagerjobId - job IDcounterpart of this methodpublic ClassLoader getClassLoader(org.apache.flink.api.common.JobID jobId)
LibraryCacheManagergetClassLoader in interface LibraryCacheManagerjobId - identifying the jobpublic void shutdown()
LibraryCacheManagershutdown in interface LibraryCacheManagerpublic boolean hasClassLoader(@Nonnull org.apache.flink.api.common.JobID jobId)
LibraryCacheManagerhasClassLoader in interface LibraryCacheManagerjobId - identifying the job for which to check the class loaderCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.