public class FallbackLibraryCacheManager extends Object implements LibraryCacheManager
Constructor and Description |
---|
FallbackLibraryCacheManager() |
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getClassLoader(JobID id)
Returns the user code class loader associated with id.
|
File |
getFile(BlobKey blobKey)
Returns a file handle to the file identified by the blob key.
|
void |
registerJob(JobID id,
Collection<BlobKey> requiredJarFiles,
Collection<URL> requiredClasspaths)
Registers a job with its required jar files and classpaths.
|
void |
registerTask(JobID id,
ExecutionAttemptID execution,
Collection<BlobKey> requiredJarFiles,
Collection<URL> requiredClasspaths)
Registers a job task execution with its required jar files and classpaths.
|
void |
shutdown()
Shutdown method
|
void |
unregisterJob(JobID id)
Unregisters a job from the library cache manager.
|
void |
unregisterTask(JobID id,
ExecutionAttemptID execution)
Unregisters a job from the library cache manager.
|
public ClassLoader getClassLoader(JobID id)
LibraryCacheManager
getClassLoader
in interface LibraryCacheManager
id
- identifying the jobpublic File getFile(BlobKey blobKey) throws IOException
LibraryCacheManager
getFile
in interface LibraryCacheManager
blobKey
- identifying the requested fileIOException
public void registerJob(JobID id, Collection<BlobKey> requiredJarFiles, Collection<URL> requiredClasspaths)
LibraryCacheManager
registerJob
in interface LibraryCacheManager
id
- job IDrequiredJarFiles
- collection of blob keys identifying the required jar filesrequiredClasspaths
- collection of classpaths that are added to the user code class loaderpublic void registerTask(JobID id, ExecutionAttemptID execution, Collection<BlobKey> requiredJarFiles, Collection<URL> requiredClasspaths)
LibraryCacheManager
registerTask
in interface LibraryCacheManager
id
- job IDrequiredJarFiles
- collection of blob keys identifying the required jar filesrequiredClasspaths
- collection of classpaths that are added to the user code class loaderpublic void unregisterJob(JobID id)
LibraryCacheManager
unregisterJob
in interface LibraryCacheManager
id
- job IDpublic void unregisterTask(JobID id, ExecutionAttemptID execution)
LibraryCacheManager
unregisterTask
in interface LibraryCacheManager
id
- job IDpublic void shutdown()
LibraryCacheManager
shutdown
in interface LibraryCacheManager
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.