public class HDFSStorage extends Object implements TempletonStorage
TempletonStorage.Type| Modifier and Type | Field and Description |
|---|---|
static String |
JOB_PATH |
static String |
JOB_TRACKINGPATH |
static String |
OVERHEAD_PATH |
String |
storage_root |
STORAGE_CLASS, STORAGE_ROOT| Constructor and Description |
|---|
HDFSStorage() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeStorage()
For storage methods that require a connection, this is a hint
that it's time to close the connection.
|
boolean |
delete(TempletonStorage.Type type,
String id)
Delete a data grouping (all data for a jobid, all tracking data
for a job, etc.).
|
List<String> |
getAllForType(TempletonStorage.Type type)
Get the id of each data grouping of a given type in the storage
system.
|
String |
getField(TempletonStorage.Type type,
String id,
String key)
Get the value of one field for a given data type.
|
String |
getPath(TempletonStorage.Type type)
Get the path to storage based on the type.
|
static String |
getPath(TempletonStorage.Type type,
String root)
Static method to get the path based on the type.
|
void |
openStorage(org.apache.hadoop.conf.Configuration config)
For storage methods that require a connection, this is a hint
that it's time to open a connection.
|
void |
saveField(TempletonStorage.Type type,
String id,
String key,
String val)
Save a single key/value pair for a specific job id.
|
void |
startCleanup(org.apache.hadoop.conf.Configuration config)
Start the cleanup process for this storage type.
|
public String storage_root
public static final String JOB_PATH
public static final String JOB_TRACKINGPATH
public static final String OVERHEAD_PATH
public void startCleanup(org.apache.hadoop.conf.Configuration config)
TempletonStoragestartCleanup in interface TempletonStoragepublic void saveField(TempletonStorage.Type type, String id, String key, String val) throws NotFoundException
TempletonStoragesaveField in interface TempletonStoragetype - The data type (as listed above)id - The String id of this data grouping (jobid, etc.)key - The name of the field to saveval - The value of the field to saveNotFoundExceptionpublic String getField(TempletonStorage.Type type, String id, String key)
TempletonStoragegetField in interface TempletonStoragetype - The data type (as listed above)id - The String id of this data grouping (jobid, etc.)key - The name of the field to retrievepublic boolean delete(TempletonStorage.Type type, String id) throws NotFoundException
TempletonStoragedelete in interface TempletonStoragetype - The data type (as listed above)id - The String id of this data grouping (jobid, etc.)NotFoundExceptionpublic List<String> getAllForType(TempletonStorage.Type type)
TempletonStoragegetAllForType in interface TempletonStoragetype - The data type (as listed above)public void openStorage(org.apache.hadoop.conf.Configuration config)
throws IOException
TempletonStorageopenStorage in interface TempletonStorageIOExceptionpublic void closeStorage()
throws IOException
TempletonStoragecloseStorage in interface TempletonStorageIOExceptionpublic String getPath(TempletonStorage.Type type)
type - public static String getPath(TempletonStorage.Type type, String root)
type - root - Copyright © 2019 The Apache Software Foundation. All Rights Reserved.