public abstract class HPath extends java.lang.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,
java.lang.String child) |
HPath(HDataStorage fs,
java.lang.String pathString) |
HPath(HDataStorage fs,
java.lang.String parent,
org.apache.hadoop.fs.Path child) |
HPath(HDataStorage fs,
java.lang.String parent,
java.lang.String child) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ElementDescriptor other) |
void |
copy(ElementDescriptor dstName,
boolean removeSrc) |
void |
copy(ElementDescriptor dstName,
java.util.Properties dstConfiguration,
boolean removeSrc)
Copy entity from an existing one, possibly residing in a
different Data Storage.
|
java.io.OutputStream |
create() |
abstract java.io.OutputStream |
create(java.util.Properties configuration)
Opens a stream onto which an entity can be written to.
|
void |
delete()
Remove entity from the Data Storage.
|
boolean |
equals(java.lang.Object obj) |
boolean |
exists()
Checks whether the entity exists or not
|
java.util.Properties |
getConfiguration()
Retrieve configuration information for entity
|
DataStorage |
getDataStorage() |
org.apache.hadoop.fs.FileSystem |
getHFS() |
org.apache.hadoop.fs.Path |
getPath() |
java.util.Map<java.lang.String,java.lang.Object> |
getStatistics()
List entity statistics
|
int |
hashCode() |
abstract java.io.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
|
java.lang.String |
toString() |
void |
updateConfiguration(java.util.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, java.lang.String parent, java.lang.String child)
public HPath(HDataStorage fs, org.apache.hadoop.fs.Path parent, java.lang.String child)
public HPath(HDataStorage fs, java.lang.String parent, org.apache.hadoop.fs.Path child)
public HPath(HDataStorage fs, java.lang.String pathString)
public HPath(HDataStorage fs, org.apache.hadoop.fs.Path path)
public DataStorage getDataStorage()
getDataStorage in interface ElementDescriptorpublic abstract java.io.OutputStream create(java.util.Properties configuration)
throws java.io.IOException
ElementDescriptorcreate in interface ElementDescriptorconfiguration - information at the object levelDataStorageExceptionjava.io.IOExceptionpublic void copy(ElementDescriptor dstName, java.util.Properties dstConfiguration, boolean removeSrc) throws java.io.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...java.io.IOExceptionpublic abstract java.io.InputStream open()
throws java.io.IOException
open in interface ElementDescriptorjava.io.IOExceptionpublic abstract SeekableInputStream sopen() throws java.io.IOException
sopen in interface ElementDescriptorjava.io.IOExceptionpublic boolean exists()
throws java.io.IOException
ElementDescriptorexists in interface ElementDescriptorjava.io.IOExceptionpublic void rename(ElementDescriptor newName) throws java.io.IOException
ElementDescriptorrename in interface ElementDescriptornewName - new name of entityDataStorageExceptionjava.io.IOExceptionpublic void delete()
throws java.io.IOException
ElementDescriptordelete in interface ElementDescriptorDataStorageExceptionjava.io.IOExceptionpublic void setPermission(org.apache.hadoop.fs.permission.FsPermission permission)
throws java.io.IOException
java.io.IOExceptionpublic java.util.Properties getConfiguration()
throws java.io.IOException
ElementDescriptorgetConfiguration in interface ElementDescriptorjava.io.IOExceptionpublic void updateConfiguration(java.util.Properties newConfig)
throws java.io.IOException
ElementDescriptorupdateConfiguration in interface ElementDescriptornewConfig - configurationDataStorageExceptionjava.io.IOExceptionpublic java.util.Map<java.lang.String,java.lang.Object> getStatistics()
throws java.io.IOException
ElementDescriptorgetStatistics in interface ElementDescriptorjava.io.IOExceptionpublic java.io.OutputStream create()
throws java.io.IOException
create in interface ElementDescriptorjava.io.IOExceptionpublic void copy(ElementDescriptor dstName, boolean removeSrc) throws java.io.IOException
copy in interface ElementDescriptorjava.io.IOExceptionpublic org.apache.hadoop.fs.Path getPath()
public org.apache.hadoop.fs.FileSystem getHFS()
public boolean systemElement()
ElementDescriptorsystemElement in interface ElementDescriptorpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int compareTo(ElementDescriptor other)
compareTo in interface java.lang.Comparable<ElementDescriptor>public int hashCode()
hashCode in class java.lang.ObjectCopyright © 2007-2025 The Apache Software Foundation