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 Details

  • Method Details

    • shutdown

      public void shutdown()
      Shuts down the file cache by cancelling all.
    • createTmpFile

      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
      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(org.apache.flink.api.common.JobID jobId, ExecutionAttemptID executionId)