public final class BlobLibraryCacheManager extends TimerTask implements LibraryCacheManager
| Constructor and Description |
|---|
BlobLibraryCacheManager(BlobService blobService,
long cleanupInterval) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBlobServerPort() |
ClassLoader |
getClassLoader(org.apache.flink.api.common.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(org.apache.flink.api.common.JobID jobId) |
void |
registerJob(org.apache.flink.api.common.JobID id,
Collection<BlobKey> 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<BlobKey> requiredJarFiles,
Collection<URL> requiredClasspaths)
Registers a job task execution with its required jar files and classpaths.
|
void |
run()
Cleans up blobs which are not referenced anymore
|
void |
shutdown()
Shutdown method
|
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 from the library cache manager.
|
cancel, scheduledExecutionTimepublic BlobLibraryCacheManager(BlobService blobService, long cleanupInterval)
public void registerJob(org.apache.flink.api.common.JobID id,
Collection<BlobKey> requiredJarFiles,
Collection<URL> requiredClasspaths)
throws IOException
LibraryCacheManagerregisterJob 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 loaderIOExceptionpublic void registerTask(org.apache.flink.api.common.JobID jobId,
ExecutionAttemptID task,
Collection<BlobKey> requiredJarFiles,
Collection<URL> requiredClasspaths)
throws IOException
LibraryCacheManagerregisterTask 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 loaderIOExceptionpublic void unregisterJob(org.apache.flink.api.common.JobID id)
LibraryCacheManagerunregisterJob in interface LibraryCacheManagerid - job IDpublic void unregisterTask(org.apache.flink.api.common.JobID jobId,
ExecutionAttemptID task)
LibraryCacheManagerunregisterTask in interface LibraryCacheManagerjobId - job IDpublic ClassLoader getClassLoader(org.apache.flink.api.common.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(org.apache.flink.api.common.JobID jobId)
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.