datafu.hourglass.mapreduce
Class DistributedCacheHelper

java.lang.Object
  extended by datafu.hourglass.mapreduce.DistributedCacheHelper

public class DistributedCacheHelper
extends java.lang.Object

Methods for working with the Hadoop distributed cache.

Author:
"Matthew Hayes"

Constructor Summary
DistributedCacheHelper()
           
 
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
 

Constructor Detail

DistributedCacheHelper

public DistributedCacheHelper()
Method Detail

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 configuration
path - 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 configuration
obj - Object to serialize
path - Path to serialize object to
Throws:
java.io.IOException


Matthew Hayes