public interface LibraryCacheManager
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getClassLoader(JobID id)
Returns the user code class loader associated with id.
|
boolean |
hasClassLoader(JobID jobId)
True if the LibraryCacheManager has a user code class loader registered
for the given job id.
|
void |
registerJob(JobID id,
Collection<PermanentBlobKey> requiredJarFiles,
Collection<URL> requiredClasspaths)
Registers a job with its required jar files and classpaths.
|
void |
registerTask(JobID id,
ExecutionAttemptID execution,
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(JobID id)
Unregisters a job from the library cache manager.
|
void |
unregisterTask(JobID id,
ExecutionAttemptID execution)
Unregisters a job task execution from the library cache manager.
|
ClassLoader getClassLoader(JobID id)
id
- identifying the jobvoid registerJob(JobID id, Collection<PermanentBlobKey> requiredJarFiles, Collection<URL> requiredClasspaths) throws IOException
ClassLoader
.id
- 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 method
void registerTask(JobID id, ExecutionAttemptID execution, Collection<PermanentBlobKey> requiredJarFiles, Collection<URL> requiredClasspaths) throws IOException
ClassLoader
.id
- 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 method
void unregisterTask(JobID id, ExecutionAttemptID execution)
Note: this is the counterpart of registerTask(JobID,
ExecutionAttemptID, Collection, Collection)
and it will not remove any job added via
registerJob(JobID, Collection, Collection)
!
id
- job IDcounterpart of this method
void unregisterJob(JobID id)
Note: this is the counterpart of registerJob(JobID, Collection,
Collection)
and it will not remove any job task execution added via registerTask(JobID, ExecutionAttemptID, Collection, Collection)
!
id
- job IDcounterpart of this method
void shutdown()
boolean hasClassLoader(@Nonnull JobID jobId)
jobId
- identifying the job for which to check the class loaderCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.