Class FileCache
- java.lang.Object
-
- org.apache.flink.runtime.filecache.FileCache
-
public class FileCache extends Object
The FileCache is used to access registered cache files when a task is deployed.Files and zipped directories are retrieved from the
PermanentBlobService
. The life-cycle of these files is managed by the blob-service.Retrieved directories will be expanded in "
<system-tmp-dir>/tmp_<jobID>/
" and deleted when the task is unregistered after a 5 second delay, unless a new task requests the file in the meantime.
-
-
Constructor Summary
Constructors Constructor Description FileCache(String[] tempDirectories, PermanentBlobService blobService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Future<Path>
createTmpFile(String name, DistributedCache.DistributedCacheEntry entry, JobID jobID, ExecutionAttemptID executionId)
If the file doesn't exists locally, retrieve the file from the blob-service.void
releaseJob(JobID jobId, ExecutionAttemptID executionId)
void
shutdown()
Shuts down the file cache by cancelling all.
-
-
-
Constructor Detail
-
FileCache
public FileCache(String[] tempDirectories, PermanentBlobService blobService) throws IOException
- Throws:
IOException
-
-
Method Detail
-
shutdown
public void shutdown()
Shuts down the file cache by cancelling all.
-
createTmpFile
public Future<Path> createTmpFile(String name, DistributedCache.DistributedCacheEntry entry, JobID jobID, ExecutionAttemptID executionId) throws Exception
If the file doesn't exists locally, retrieve the file from the blob-service.- Parameters:
entry
- The cache entry descriptor (path, executable flag)jobID
- The ID of the job for which the file is copied.- Returns:
- The handle to the task that copies the file.
- Throws:
Exception
-
releaseJob
public void releaseJob(JobID jobId, ExecutionAttemptID executionId)
-
-