datafu.hourglass.mapreduce
Class DistributedCacheHelper
java.lang.Object
datafu.hourglass.mapreduce.DistributedCacheHelper
public class DistributedCacheHelper
- extends java.lang.Object
Methods for working with the Hadoop distributed cache.
- Author:
- "Matthew Hayes"
Method Summary |
static java.lang.Object |
readObject(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
Deserializes an object from a path in HDFS. |
static void |
writeObject(org.apache.hadoop.conf.Configuration conf,
java.lang.Object obj,
org.apache.hadoop.fs.Path path)
Serializes an object to a path in HDFS and adds the file to the distributed cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DistributedCacheHelper
public DistributedCacheHelper()
readObject
public static java.lang.Object readObject(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
throws java.io.IOException
- Deserializes an object from a path in HDFS.
- Parameters:
conf
- Hadoop configurationpath
- Path to deserialize from
- Returns:
- Deserialized object
- Throws:
java.io.IOException
writeObject
public static void writeObject(org.apache.hadoop.conf.Configuration conf,
java.lang.Object obj,
org.apache.hadoop.fs.Path path)
throws java.io.IOException
- Serializes an object to a path in HDFS and adds the file to the distributed cache.
- Parameters:
conf
- Hadoop configurationobj
- Object to serializepath
- Path to serialize object to
- Throws:
java.io.IOException
Matthew Hayes