org.apache.pig.backend.hadoop.datastorage
Class HDataStorage

java.lang.Object
  extended by org.apache.pig.backend.hadoop.datastorage.HDataStorage
All Implemented Interfaces:
DataStorage

public class HDataStorage
extends Object
implements DataStorage


Field Summary
 
Fields inherited from interface org.apache.pig.backend.datastorage.DataStorage
RAW_CAPACITY_KEY, RAW_USED_KEY, USED_BYTES_KEY
 
Constructor Summary
HDataStorage(Properties properties)
           
HDataStorage(URI uri, Properties properties)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HDataStorage

public HDataStorage(URI uri,
                    Properties properties)

HDataStorage

public HDataStorage(Properties properties)
Method Detail

init

public void init()
Description copied from interface: DataStorage
Place holder for possible initialization activities.

Specified by:
init in interface DataStorage

close

public void close()
           throws IOException
Description copied from interface: DataStorage
Clean-up and releasing of resources.

Specified by:
close in interface DataStorage
Throws:
IOException

getConfiguration

public Properties getConfiguration()
Description copied from interface: DataStorage
Provides configuration information about the storage itself. For instance global data-replication policies if any, default values, ... Some of such values could be overridden at a finer granularity (e.g. on a specific object in the Data Storage)

Specified by:
getConfiguration in interface DataStorage
Returns:
- configuration information

updateConfiguration

public void updateConfiguration(Properties newConfiguration)
                         throws DataStorageException
Description copied from interface: DataStorage
Provides a way to change configuration parameters at the Data Storage level. For instance, change the data replication policy.

Specified by:
updateConfiguration in interface DataStorage
Parameters:
newConfiguration - - the new configuration settings
Throws:
DataStorageException

getStatistics

public Map<String,Object> getStatistics()
                                 throws IOException
Description copied from interface: DataStorage
Provides statistics on the Storage: capacity values, how much storage is in use...

Specified by:
getStatistics in interface DataStorage
Returns:
statistics on the Data Storage
Throws:
IOException

asElement

public ElementDescriptor asElement(String name)
                            throws DataStorageException
Description copied from interface: DataStorage
Creates an entity handle for an object (no containment relation) from a String

Specified by:
asElement in interface DataStorage
Parameters:
name - of the object
Returns:
an object descriptor
Throws:
DataStorageException - if name does not conform to naming convention enforced by the Data Storage.

asElement

public ElementDescriptor asElement(ElementDescriptor element)
                            throws DataStorageException
Specified by:
asElement in interface DataStorage
Throws:
DataStorageException

asElement

public ElementDescriptor asElement(String parent,
                                   String child)
                            throws DataStorageException
Specified by:
asElement in interface DataStorage
Throws:
DataStorageException

asElement

public ElementDescriptor asElement(ContainerDescriptor parent,
                                   String child)
                            throws DataStorageException
Specified by:
asElement in interface DataStorage
Throws:
DataStorageException

asElement

public ElementDescriptor asElement(ContainerDescriptor parent,
                                   ElementDescriptor child)
                            throws DataStorageException
Specified by:
asElement in interface DataStorage
Throws:
DataStorageException

asContainer

public ContainerDescriptor asContainer(String name)
                                throws DataStorageException
Description copied from interface: DataStorage
Created an entity handle for a container.

Specified by:
asContainer in interface DataStorage
Parameters:
name - of the container
Returns:
a container descriptor
Throws:
DataStorageException - if name does not conform to naming convention enforced by the Data Storage.

asContainer

public ContainerDescriptor asContainer(ContainerDescriptor container)
                                throws DataStorageException
Specified by:
asContainer in interface DataStorage
Throws:
DataStorageException

asContainer

public ContainerDescriptor asContainer(String parent,
                                       String child)
                                throws DataStorageException
Specified by:
asContainer in interface DataStorage
Throws:
DataStorageException

asContainer

public ContainerDescriptor asContainer(ContainerDescriptor parent,
                                       String child)
                                throws DataStorageException
Specified by:
asContainer in interface DataStorage
Throws:
DataStorageException

asContainer

public ContainerDescriptor asContainer(ContainerDescriptor parent,
                                       ContainerDescriptor child)
                                throws DataStorageException
Specified by:
asContainer in interface DataStorage
Throws:
DataStorageException

setActiveContainer

public void setActiveContainer(ContainerDescriptor container)
Specified by:
setActiveContainer in interface DataStorage

getActiveContainer

public ContainerDescriptor getActiveContainer()
Specified by:
getActiveContainer in interface DataStorage

isContainer

public boolean isContainer(String name)
                    throws DataStorageException
Specified by:
isContainer in interface DataStorage
Throws:
DataStorageException

asCollection

public HPath[] asCollection(String pattern)
                     throws DataStorageException
Specified by:
asCollection in interface DataStorage
Throws:
DataStorageException

getHFS

public org.apache.hadoop.fs.FileSystem getHFS()


Copyright © 2007-2012 The Apache Software Foundation