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()
DataStorage
init
in interface DataStorage
public void close() throws IOException
DataStorage
close
in interface DataStorage
IOException
public Properties getConfiguration()
DataStorage
getConfiguration
in interface DataStorage
public void updateConfiguration(Properties newConfiguration) throws DataStorageException
DataStorage
updateConfiguration
in interface DataStorage
newConfiguration
- - the new configuration settingsDataStorageException
public Map<String,Object> getStatistics() throws IOException
DataStorage
getStatistics
in interface DataStorage
IOException
public ElementDescriptor asElement(String name) throws DataStorageException
DataStorage
asElement
in interface DataStorage
name
- 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 DataStorage
DataStorageException
public ElementDescriptor asElement(String parent, String child) throws DataStorageException
asElement
in interface DataStorage
DataStorageException
public ElementDescriptor asElement(ContainerDescriptor parent, String child) throws DataStorageException
asElement
in interface DataStorage
DataStorageException
public ElementDescriptor asElement(ContainerDescriptor parent, ElementDescriptor child) throws DataStorageException
asElement
in interface DataStorage
DataStorageException
public ContainerDescriptor asContainer(String name) throws DataStorageException
DataStorage
asContainer
in interface DataStorage
name
- 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 DataStorage
DataStorageException
public ContainerDescriptor asContainer(String parent, String child) throws DataStorageException
asContainer
in interface DataStorage
DataStorageException
public ContainerDescriptor asContainer(ContainerDescriptor parent, String child) throws DataStorageException
asContainer
in interface DataStorage
DataStorageException
public ContainerDescriptor asContainer(ContainerDescriptor parent, ContainerDescriptor child) throws DataStorageException
asContainer
in interface DataStorage
DataStorageException
public void setActiveContainer(ContainerDescriptor container)
setActiveContainer
in interface DataStorage
public ContainerDescriptor getActiveContainer()
getActiveContainer
in interface DataStorage
public boolean isContainer(String name) throws DataStorageException
isContainer
in interface DataStorage
DataStorageException
public HPath[] asCollection(String pattern) throws DataStorageException
asCollection
in interface DataStorage
DataStorageException
public org.apache.hadoop.fs.FileSystem getHFS()
Copyright © 2007-2012 The Apache Software Foundation