|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.crunch.util.DistCache
public class DistCache
Provides functions for working with Hadoop's distributed cache. These include:
Constructor Summary | |
---|---|
DistCache()
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DistCache()
Method Detail |
---|
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |