public class HDataStorage extends Object implements DataStorage
RAW_CAPACITY_KEY, RAW_USED_KEY, USED_BYTES_KEY| Constructor and Description |
|---|
HDataStorage(Properties properties) |
HDataStorage(URI uri,
Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
HPath[] |
asCollection(String pattern) |
ContainerDescriptor |
asContainer(ContainerDescriptor container) |
ContainerDescriptor |
asContainer(ContainerDescriptor parent,
ContainerDescriptor child) |
ContainerDescriptor |
asContainer(ContainerDescriptor parent,
String child) |
ContainerDescriptor |
asContainer(String name)
Created an entity handle for a container.
|
ContainerDescriptor |
asContainer(String parent,
String child) |
ElementDescriptor |
asElement(ContainerDescriptor parent,
ElementDescriptor child) |
ElementDescriptor |
asElement(ContainerDescriptor parent,
String child) |
ElementDescriptor |
asElement(ElementDescriptor element) |
ElementDescriptor |
asElement(String name)
Creates an entity handle for an object (no containment
relation) from a String
|
ElementDescriptor |
asElement(String parent,
String child) |
void |
close()
Clean-up and releasing of resources.
|
ContainerDescriptor |
getActiveContainer() |
Properties |
getConfiguration()
Provides configuration information about the storage itself.
|
org.apache.hadoop.fs.FileSystem |
getHFS() |
Map<String,Object> |
getStatistics()
Provides statistics on the Storage: capacity values, how much
storage is in use...
|
void |
init()
Place holder for possible initialization activities.
|
boolean |
isContainer(String name) |
void |
setActiveContainer(ContainerDescriptor container) |
void |
updateConfiguration(Properties newConfiguration)
Provides a way to change configuration parameters
at the Data Storage level.
|
public HDataStorage(URI uri, Properties properties)
public HDataStorage(Properties properties)
public void init()
DataStorageinit in interface DataStoragepublic void close()
throws IOException
DataStorageclose in interface DataStorageIOExceptionpublic Properties getConfiguration()
DataStoragegetConfiguration in interface DataStoragepublic void updateConfiguration(Properties newConfiguration) throws DataStorageException
DataStorageupdateConfiguration in interface DataStoragenewConfiguration - - the new configuration settingsDataStorageExceptionpublic Map<String,Object> getStatistics() throws IOException
DataStoragegetStatistics in interface DataStorageIOExceptionpublic ElementDescriptor asElement(String name) throws DataStorageException
DataStorageasElement in interface DataStoragename - of the objectDataStorageException - if name does not conform to naming
convention enforced by the Data Storage.public ElementDescriptor asElement(ElementDescriptor element) throws DataStorageException
asElement in interface DataStorageDataStorageExceptionpublic ElementDescriptor asElement(String parent, String child) throws DataStorageException
asElement in interface DataStorageDataStorageExceptionpublic ElementDescriptor asElement(ContainerDescriptor parent, String child) throws DataStorageException
asElement in interface DataStorageDataStorageExceptionpublic ElementDescriptor asElement(ContainerDescriptor parent, ElementDescriptor child) throws DataStorageException
asElement in interface DataStorageDataStorageExceptionpublic ContainerDescriptor asContainer(String name) throws DataStorageException
DataStorageasContainer in interface DataStoragename - of the containerDataStorageException - if name does not conform to naming
convention enforced by the Data Storage.public ContainerDescriptor asContainer(ContainerDescriptor container) throws DataStorageException
asContainer in interface DataStorageDataStorageExceptionpublic ContainerDescriptor asContainer(String parent, String child) throws DataStorageException
asContainer in interface DataStorageDataStorageExceptionpublic ContainerDescriptor asContainer(ContainerDescriptor parent, String child) throws DataStorageException
asContainer in interface DataStorageDataStorageExceptionpublic ContainerDescriptor asContainer(ContainerDescriptor parent, ContainerDescriptor child) throws DataStorageException
asContainer in interface DataStorageDataStorageExceptionpublic void setActiveContainer(ContainerDescriptor container)
setActiveContainer in interface DataStoragepublic ContainerDescriptor getActiveContainer()
getActiveContainer in interface DataStoragepublic boolean isContainer(String name) throws DataStorageException
isContainer in interface DataStorageDataStorageExceptionpublic HPath[] asCollection(String pattern) throws DataStorageException
asCollection in interface DataStorageDataStorageExceptionpublic org.apache.hadoop.fs.FileSystem getHFS()
Copyright © 2007-2017 The Apache Software Foundation