public class HadoopFileSystemStore
extends java.lang.Object
Constructor and Description |
---|
HadoopFileSystemStore(org.apache.hadoop.fs.FileSystem fs)
Creates a new storage service on the given HDFS file system using default Java serialization.
|
HadoopFileSystemStore(org.apache.hadoop.fs.FileSystem fs,
SerializationService serial)
Creates a new storage service on the given HDFS file system using the given serializer
|
Modifier and Type | Method and Description |
---|---|
<T> T |
recall(org.apache.hadoop.fs.Path path,
java.lang.Class<T> type)
Retrieves the object stored at the given path in HDFS.
|
<T> T |
recall(java.lang.String pathName,
java.lang.Class<T> type)
Retrieves the object stored at the given path name in HDFS.
|
void |
setSerializer(SerializationService service) |
void |
store(org.apache.hadoop.fs.Path path,
Storable obj)
Store the given object at into the HDFS file system at the given path.
|
void |
store(java.lang.String pathName,
Storable value)
Store the given object into the HDFS file system at the given path name.
|
public HadoopFileSystemStore(org.apache.hadoop.fs.FileSystem fs)
public HadoopFileSystemStore(org.apache.hadoop.fs.FileSystem fs, SerializationService serial)
public void store(java.lang.String pathName, Storable value) throws java.io.IOException
pathName
- The location to store the object.value
- The object to store.java.io.IOException
- If a problem occurs storing the object.public void store(org.apache.hadoop.fs.Path path, Storable obj) throws java.io.IOException
path
- The HDFS path descriptor.obj
- The object to store.java.io.IOException
- If a problem occurs storing the object at the given path.public <T> T recall(java.lang.String pathName, java.lang.Class<T> type) throws java.io.IOException
pathName
- The path name where the object is stored.type
- The type of object being retrieved.java.io.IOException
- If a problem occurs retrieving the object.public <T> T recall(org.apache.hadoop.fs.Path path, java.lang.Class<T> type) throws java.io.IOException
path
- The HDFS path descriptor to the object.type
- The type of object being retrieved.java.io.IOException
- If a problem occurs retrieving the object.public void setSerializer(SerializationService service)