public class FileCache extends Object
| Constructor and Description |
|---|
FileCache() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(Path sourcePath,
Path targetPath,
boolean executable) |
FutureTask<Path> |
createTmpFile(String name,
DistributedCache.DistributedCacheEntry entry,
JobID jobID)
If the file doesn't exists locally, it will copy the file to the temp directory.
|
void |
deleteTmpFile(String name,
DistributedCache.DistributedCacheEntry entry,
JobID jobID)
Deletes the local file after a 5 second delay.
|
Path |
getTempDir(JobID jobID,
String childPath) |
void |
shutdown() |
public FutureTask<Path> createTmpFile(String name, DistributedCache.DistributedCacheEntry entry, JobID jobID)
name - file identifierentry - entry containing all relevant informationjobID - public void deleteTmpFile(String name, DistributedCache.DistributedCacheEntry entry, JobID jobID)
name - file identifierentry - entry containing all relevant informationjobID - public void shutdown()
public static void copy(Path sourcePath, Path targetPath, boolean executable) throws IOException
IOExceptionCopyright © 2015 The Apache Software Foundation. All rights reserved.