public class FileCache extends Object
<system-tmp-dir>/tmp_<jobID>/
".Constructor and Description |
---|
FileCache(org.apache.flink.configuration.Configuration config) |
Modifier and Type | Method and Description |
---|---|
static void |
copy(org.apache.flink.core.fs.Path sourcePath,
org.apache.flink.core.fs.Path targetPath,
boolean executable) |
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)
If the file doesn't exists locally, it will copy the file to the temp directory.
|
void |
deleteTmpFile(String name,
org.apache.flink.api.common.JobID jobID)
Deletes the local file after a 5 second delay.
|
void |
shutdown()
Shuts down the file cache by cancelling all
|
public FileCache(org.apache.flink.configuration.Configuration config) 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)
name
- The name under which the file is registered.entry
- The cache entry descriptor (path, executable flag)jobID
- The ID of the job for which the file is copied.public void deleteTmpFile(String name, org.apache.flink.api.common.JobID jobID)
name
- The name under which the file is registered.jobID
- The ID of the job for which the file is copied.public static void copy(org.apache.flink.core.fs.Path sourcePath, org.apache.flink.core.fs.Path targetPath, boolean executable) throws IOException
IOException
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.