public class DistributedCacheHelper
extends java.lang.Object
Constructor and Description |
---|
DistributedCacheHelper() |
Modifier and Type | Method and Description |
---|---|
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.
|
public static java.lang.Object readObject(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path) throws java.io.IOException
conf
- Hadoop configurationpath
- Path to deserialize fromjava.io.IOException
- IOExceptionpublic static void writeObject(org.apache.hadoop.conf.Configuration conf, java.lang.Object obj, org.apache.hadoop.fs.Path path) throws java.io.IOException
conf
- Hadoop configurationobj
- Object to serializepath
- Path to serialize object tojava.io.IOException
- IOException