public final class BlobLibraryCacheManager extends TimerTask implements LibraryCacheManager
This class is thread-safe.
| Constructor and Description |
|---|
BlobLibraryCacheManager(BlobService blobService,
Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBlobServerPort() |
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.
|
int |
getNumberOfReferenceHolders(JobID jobId) |
void |
registerJob(JobID id,
Collection<BlobKey> requiredJarFiles)
Registers a job with its required jar files.
|
void |
registerTask(JobID jobId,
ExecutionAttemptID task,
Collection<BlobKey> requiredJarFiles)
Registers a job task execution with its required jar files.
|
void |
run()
Cleans up blobs which are not referenced anymore
|
void |
shutdown()
Shutdown method
|
void |
unregisterJob(JobID id)
Unregisters a job from the library cache manager.
|
void |
unregisterTask(JobID jobId,
ExecutionAttemptID task)
Unregisters a job from the library cache manager.
|
cancel, scheduledExecutionTimepublic BlobLibraryCacheManager(BlobService blobService, Configuration configuration)
public void registerJob(JobID id, Collection<BlobKey> requiredJarFiles) throws IOException
LibraryCacheManagerregisterJob in interface LibraryCacheManagerid - job IDrequiredJarFiles - collection of blob keys identifying the required jar filesIOExceptionpublic void registerTask(JobID jobId, ExecutionAttemptID task, Collection<BlobKey> requiredJarFiles) throws IOException
LibraryCacheManagerregisterTask in interface LibraryCacheManagerjobId - job IDrequiredJarFiles - collection of blob keys identifying the required jar filesIOExceptionpublic void unregisterJob(JobID id)
LibraryCacheManagerunregisterJob in interface LibraryCacheManagerid - job IDpublic void unregisterTask(JobID jobId, ExecutionAttemptID task)
LibraryCacheManagerunregisterTask in interface LibraryCacheManagerjobId - job IDpublic ClassLoader getClassLoader(JobID id)
LibraryCacheManagergetClassLoader in interface LibraryCacheManagerid - identifying the jobpublic File getFile(BlobKey blobKey) throws IOException
LibraryCacheManagergetFile in interface LibraryCacheManagerblobKey - identifying the requested fileIOExceptionpublic int getBlobServerPort()
public void shutdown()
throws IOException
LibraryCacheManagershutdown in interface LibraryCacheManagerIOExceptionpublic void run()
public int getNumberOfReferenceHolders(JobID jobId)
Copyright © 2015 The Apache Software Foundation. All rights reserved.