public class DistributedCacheUtils extends Object
DistributedCache
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.fs.Path |
copyAndAdd(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf)
Copy a file to HDFS if it is local, and adds it to the distributed cache.
|
static org.apache.hadoop.fs.Path |
copyToHdfs(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf)
Copy a file to HDFS if it is local.
|
static com.google.common.base.Optional<org.apache.hadoop.fs.Path> |
getLocalCacheFile(org.apache.hadoop.conf.Configuration conf,
String pathToMatch)
Get local path to file from a DistributedCache.
|
public static com.google.common.base.Optional<org.apache.hadoop.fs.Path> getLocalCacheFile(org.apache.hadoop.conf.Configuration conf, String pathToMatch)
conf
- ConfigurationpathToMatch
- Path that was used to insert into DistributedCachepublic static org.apache.hadoop.fs.Path copyToHdfs(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
path
- path to fileconf
- Configurationpublic static org.apache.hadoop.fs.Path copyAndAdd(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
path
- path to fileconf
- ConfigurationCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.