public class FileCache extends Object
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 and Description |
---|
FileCache(String[] tempDirectories,
PermanentBlobService blobService) |
Modifier and Type | Method and Description |
---|---|
Future<org.apache.flink.core.fs.Path> |
createTmpFile(String name,
org.apache.flink.api.common.cache.DistributedCache.DistributedCacheEntry entry,
org.apache.flink.api.common.JobID jobID,
ExecutionAttemptID executionId)
If the file doesn't exists locally, retrieve the file from the blob-service.
|
void |
releaseJob(org.apache.flink.api.common.JobID jobId,
ExecutionAttemptID executionId) |
void |
shutdown()
Shuts down the file cache by cancelling all.
|
public FileCache(String[] tempDirectories, PermanentBlobService blobService) throws IOException
IOException
public void shutdown()
public Future<org.apache.flink.core.fs.Path> createTmpFile(String name, org.apache.flink.api.common.cache.DistributedCache.DistributedCacheEntry entry, org.apache.flink.api.common.JobID jobID, ExecutionAttemptID executionId) throws Exception
entry
- The cache entry descriptor (path, executable flag)jobID
- The ID of the job for which the file is copied.Exception
public void releaseJob(org.apache.flink.api.common.JobID jobId, ExecutionAttemptID executionId)
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.