public class HDataStorage extends java.lang.Object implements DataStorage
RAW_CAPACITY_KEY, RAW_USED_KEY, USED_BYTES_KEY
Constructor and Description |
---|
HDataStorage(java.util.Properties properties) |
HDataStorage(java.net.URI uri,
java.util.Properties properties) |
Modifier and Type | Method and Description |
---|---|
HPath[] |
asCollection(java.lang.String pattern) |
ContainerDescriptor |
asContainer(ContainerDescriptor container) |
ContainerDescriptor |
asContainer(ContainerDescriptor parent,
ContainerDescriptor child) |
ContainerDescriptor |
asContainer(ContainerDescriptor parent,
java.lang.String child) |
ContainerDescriptor |
asContainer(java.lang.String name)
Created an entity handle for a container.
|
ContainerDescriptor |
asContainer(java.lang.String parent,
java.lang.String child) |
ElementDescriptor |
asElement(ContainerDescriptor parent,
ElementDescriptor child) |
ElementDescriptor |
asElement(ContainerDescriptor parent,
java.lang.String child) |
ElementDescriptor |
asElement(ElementDescriptor element) |
ElementDescriptor |
asElement(java.lang.String name)
Creates an entity handle for an object (no containment
relation) from a String
|
ElementDescriptor |
asElement(java.lang.String parent,
java.lang.String child) |
void |
close()
Clean-up and releasing of resources.
|
ContainerDescriptor |
getActiveContainer() |
java.util.Properties |
getConfiguration()
Provides configuration information about the storage itself.
|
org.apache.hadoop.fs.FileSystem |
getHFS() |
java.util.Map<java.lang.String,java.lang.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(java.lang.String name) |
void |
setActiveContainer(ContainerDescriptor container) |
void |
updateConfiguration(java.util.Properties newConfiguration)
Provides a way to change configuration parameters
at the Data Storage level.
|
public HDataStorage(java.net.URI uri, java.util.Properties properties)
public HDataStorage(java.util.Properties properties)
public void init()
DataStorage
init
in interface DataStorage
public void close() throws java.io.IOException
DataStorage
close
in interface DataStorage
java.io.IOException
public java.util.Properties getConfiguration()
DataStorage
getConfiguration
in interface DataStorage
public void updateConfiguration(java.util.Properties newConfiguration) throws DataStorageException
DataStorage
updateConfiguration
in interface DataStorage
newConfiguration
- - the new configuration settingsDataStorageException
public java.util.Map<java.lang.String,java.lang.Object> getStatistics() throws java.io.IOException
DataStorage
getStatistics
in interface DataStorage
java.io.IOException
public ElementDescriptor asElement(java.lang.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(java.lang.String parent, java.lang.String child) throws DataStorageException
asElement
in interface DataStorage
DataStorageException
public ElementDescriptor asElement(ContainerDescriptor parent, java.lang.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(java.lang.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(java.lang.String parent, java.lang.String child) throws DataStorageException
asContainer
in interface DataStorage
DataStorageException
public ContainerDescriptor asContainer(ContainerDescriptor parent, java.lang.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(java.lang.String name) throws DataStorageException
isContainer
in interface DataStorage
DataStorageException
public HPath[] asCollection(java.lang.String pattern) throws DataStorageException
asCollection
in interface DataStorage
DataStorageException
public org.apache.hadoop.fs.FileSystem getHFS()
Copyright © 2007-2012 The Apache Software Foundation