public abstract class HPath extends Object implements ElementDescriptor
| Modifier and Type | Field and Description |
|---|---|
protected HDataStorage |
fs |
protected org.apache.hadoop.fs.Path |
path |
BLOCK_REPLICATION_KEY, BLOCK_SIZE_KEY, LENGTH_KEY, MODIFICATION_TIME_KEY| Constructor and Description |
|---|
HPath(HDataStorage fs,
org.apache.hadoop.fs.Path path) |
HPath(HDataStorage fs,
org.apache.hadoop.fs.Path parent,
org.apache.hadoop.fs.Path child) |
HPath(HDataStorage fs,
org.apache.hadoop.fs.Path parent,
String child) |
HPath(HDataStorage fs,
String pathString) |
HPath(HDataStorage fs,
String parent,
org.apache.hadoop.fs.Path child) |
HPath(HDataStorage fs,
String parent,
String child) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ElementDescriptor other) |
void |
copy(ElementDescriptor dstName,
boolean removeSrc) |
void |
copy(ElementDescriptor dstName,
Properties dstConfiguration,
boolean removeSrc)
Copy entity from an existing one, possibly residing in a
different Data Storage.
|
OutputStream |
create() |
abstract OutputStream |
create(Properties configuration)
Opens a stream onto which an entity can be written to.
|
void |
delete()
Remove entity from the Data Storage.
|
boolean |
equals(Object obj) |
boolean |
exists()
Checks whether the entity exists or not
|
Properties |
getConfiguration()
Retrieve configuration information for entity
|
DataStorage |
getDataStorage() |
org.apache.hadoop.fs.FileSystem |
getHFS() |
org.apache.hadoop.fs.Path |
getPath() |
Map<String,Object> |
getStatistics()
List entity statistics
|
int |
hashCode() |
abstract InputStream |
open() |
void |
rename(ElementDescriptor newName)
Changes the name of an entity in the Data Storage
|
void |
setPermission(org.apache.hadoop.fs.permission.FsPermission permission) |
abstract SeekableInputStream |
sopen() |
boolean |
systemElement()
Defines whether the element is visible to users or
contains system's metadata
|
String |
toString() |
void |
updateConfiguration(Properties newConfig)
Update configuration information for this entity
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitopen, sopenprotected org.apache.hadoop.fs.Path path
protected HDataStorage fs
public HPath(HDataStorage fs, org.apache.hadoop.fs.Path parent, org.apache.hadoop.fs.Path child)
public HPath(HDataStorage fs, String parent, String child)
public HPath(HDataStorage fs, org.apache.hadoop.fs.Path parent, String child)
public HPath(HDataStorage fs, String parent, org.apache.hadoop.fs.Path child)
public HPath(HDataStorage fs, String pathString)
public HPath(HDataStorage fs, org.apache.hadoop.fs.Path path)
public DataStorage getDataStorage()
getDataStorage in interface ElementDescriptorpublic abstract OutputStream create(Properties configuration) throws IOException
ElementDescriptorcreate in interface ElementDescriptorconfiguration - information at the object levelDataStorageExceptionIOExceptionpublic void copy(ElementDescriptor dstName, Properties dstConfiguration, boolean removeSrc) throws IOException
ElementDescriptorcopy in interface ElementDescriptordstName - name of entity to createdstConfiguration - configuration for the new entityremoveSrc - if src entity needs to be removed after copying itDataStorageException - for instance, configuration
information for new entity is not compatible with
configuration information at the Data
Storage level, user does not have privileges to read from
source entity or write to destination storage...IOExceptionpublic abstract InputStream open() throws IOException
open in interface ElementDescriptorIOExceptionpublic abstract SeekableInputStream sopen() throws IOException
sopen in interface ElementDescriptorIOExceptionpublic boolean exists()
throws IOException
ElementDescriptorexists in interface ElementDescriptorIOExceptionpublic void rename(ElementDescriptor newName) throws IOException
ElementDescriptorrename in interface ElementDescriptornewName - new name of entityDataStorageExceptionIOExceptionpublic void delete()
throws IOException
ElementDescriptordelete in interface ElementDescriptorDataStorageExceptionIOExceptionpublic void setPermission(org.apache.hadoop.fs.permission.FsPermission permission)
throws IOException
IOExceptionpublic Properties getConfiguration() throws IOException
ElementDescriptorgetConfiguration in interface ElementDescriptorIOExceptionpublic void updateConfiguration(Properties newConfig) throws IOException
ElementDescriptorupdateConfiguration in interface ElementDescriptornewConfig - configurationDataStorageExceptionIOExceptionpublic Map<String,Object> getStatistics() throws IOException
ElementDescriptorgetStatistics in interface ElementDescriptorIOExceptionpublic OutputStream create() throws IOException
create in interface ElementDescriptorIOExceptionpublic void copy(ElementDescriptor dstName, boolean removeSrc) throws IOException
copy in interface ElementDescriptorIOExceptionpublic org.apache.hadoop.fs.Path getPath()
public org.apache.hadoop.fs.FileSystem getHFS()
public boolean systemElement()
ElementDescriptorsystemElement in interface ElementDescriptorpublic int compareTo(ElementDescriptor other)
compareTo in interface Comparable<ElementDescriptor>Copyright © 2007-2017 The Apache Software Foundation