public class DistCache extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DIST_CACHE_REPLICATION
Configuration key for setting the replication factor for files distributed using the Crunch
DistCache helper class.
|
Constructor and Description |
---|
DistCache() |
Modifier and Type | Method and Description |
---|---|
static void |
addCacheFile(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf) |
static void |
addJarDirToDistributedCache(org.apache.hadoop.conf.Configuration conf,
File jarDirectory)
Adds all jars under the specified directory to the distributed cache of
jobs using the provided configuration.
|
static void |
addJarDirToDistributedCache(org.apache.hadoop.conf.Configuration conf,
String jarDirectory)
Adds all jars under the directory at the specified path to the distributed
cache of jobs using the provided configuration.
|
static void |
addJarToDistributedCache(org.apache.hadoop.conf.Configuration conf,
File jarFile)
Adds the specified jar to the distributed cache of jobs using the provided
configuration.
|
static void |
addJarToDistributedCache(org.apache.hadoop.conf.Configuration conf,
String jarFile)
Adds the jar at the specified path to the distributed cache of jobs using
the provided configuration.
|
static String |
findContainingJar(Class<?> jarClass)
Finds the path to a jar that contains the class provided, if any.
|
static org.apache.hadoop.fs.Path |
getPathToCacheFile(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf) |
static Object |
read(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path) |
static void |
write(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path,
Object value) |
public static final String DIST_CACHE_REPLICATION
public static void write(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path, Object value) throws IOException
IOException
public static Object read(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path) throws IOException
IOException
public static void addCacheFile(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
public static org.apache.hadoop.fs.Path getPathToCacheFile(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
public static void addJarToDistributedCache(org.apache.hadoop.conf.Configuration conf, File jarFile) throws IOException
conf
- The configuration used to add the jar to the distributed cache.jarFile
- The jar file to add to the distributed cache.IOException
- If the jar file does not exist or there is a problem accessing
the file.public static void addJarToDistributedCache(org.apache.hadoop.conf.Configuration conf, String jarFile) throws IOException
conf
- The configuration used to add the jar to the distributed cache.jarFile
- The path to the jar file to add to the distributed cache.IOException
- If the jar file does not exist or there is a problem accessing
the file.public static String findContainingJar(Class<?> jarClass) throws IOException
JobConf
class.jarClass
- The class the jar file should contain.null
if no such jar exists.IOException
- If there is a problem searching for the jar file.public static void addJarDirToDistributedCache(org.apache.hadoop.conf.Configuration conf, File jarDirectory) throws IOException
conf
- The configuration used to add jars to the distributed cache.jarDirectory
- A directory containing jar files to add to the distributed cache.IOException
- If the directory does not exist or there is a problem accessing
the directory.public static void addJarDirToDistributedCache(org.apache.hadoop.conf.Configuration conf, String jarDirectory) throws IOException
conf
- The configuration used to add jars to the distributed cache.jarDirectory
- The path to a directory containing jar files to add to the
distributed cache.IOException
- If the directory does not exist or there is a problem accessing
the directory.Copyright © 2016 The Apache Software Foundation. All rights reserved.