|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.backend.local.datastorage.LocalPath
public abstract class LocalPath
Field Summary | |
---|---|
protected DataStorage |
fs
|
protected File |
path
|
Fields inherited from interface org.apache.pig.backend.datastorage.ElementDescriptor |
---|
BLOCK_REPLICATION_KEY, BLOCK_SIZE_KEY, LENGTH_KEY, MODIFICATION_TIME_KEY |
Constructor Summary | |
---|---|
LocalPath(LocalDataStorage fs,
File path)
|
|
LocalPath(LocalDataStorage fs,
File parent,
File child)
|
|
LocalPath(LocalDataStorage fs,
File parent,
String child)
|
|
LocalPath(LocalDataStorage fs,
String path)
|
|
LocalPath(LocalDataStorage fs,
String parent,
File child)
|
|
LocalPath(LocalDataStorage fs,
String parent,
String child)
|
Method Summary | |
---|---|
int |
compareTo(ElementDescriptor other)
|
void |
copy(ElementDescriptor dstName,
boolean removeSrc)
|
abstract 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 |
exists()
Checks whether the entity exists or not |
Properties |
getConfiguration()
Retrieve configuration information for entity |
protected File |
getCurPath()
|
DataStorage |
getDataStorage()
|
File |
getPath()
|
Map<String,Object> |
getStatistics()
List entity statistics |
abstract InputStream |
open()
|
void |
rename(ElementDescriptor newName)
Changes the name of an entity in the Data Storage |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.pig.backend.datastorage.ElementDescriptor |
---|
open, sopen |
Field Detail |
---|
protected DataStorage fs
protected File path
Constructor Detail |
---|
public LocalPath(LocalDataStorage fs, String path)
public LocalPath(LocalDataStorage fs, File path)
public LocalPath(LocalDataStorage fs, String parent, String child)
public LocalPath(LocalDataStorage fs, File parent, File child)
public LocalPath(LocalDataStorage fs, File parent, String child)
public LocalPath(LocalDataStorage fs, String parent, File child)
Method Detail |
---|
protected File getCurPath()
public DataStorage getDataStorage()
getDataStorage
in interface ElementDescriptor
public File getPath()
public abstract OutputStream create(Properties configuration) throws IOException
ElementDescriptor
create
in interface ElementDescriptor
configuration
- information at the object level
DataStorageException
IOException
public OutputStream create() throws IOException
create
in interface ElementDescriptor
IOException
public abstract void copy(ElementDescriptor dstName, Properties dstConfiguration, boolean removeSrc) throws IOException
ElementDescriptor
copy
in interface ElementDescriptor
dstName
- name of entity to createdstConfiguration
- configuration for the new entityremoveSrc
- if src entity needs to be removed after copying it
DataStorageException
- 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...
IOException
public void copy(ElementDescriptor dstName, boolean removeSrc) throws IOException
copy
in interface ElementDescriptor
IOException
public abstract InputStream open() throws IOException
open
in interface ElementDescriptor
IOException
public abstract SeekableInputStream sopen() throws IOException
sopen
in interface ElementDescriptor
IOException
public boolean exists() throws IOException
ElementDescriptor
exists
in interface ElementDescriptor
IOException
public void rename(ElementDescriptor newName) throws IOException
ElementDescriptor
rename
in interface ElementDescriptor
newName
- new name of entity
DataStorageException
IOException
public void delete() throws IOException
ElementDescriptor
delete
in interface ElementDescriptor
DataStorageException
IOException
public Properties getConfiguration() throws IOException
ElementDescriptor
getConfiguration
in interface ElementDescriptor
IOException
public void updateConfiguration(Properties newConfig) throws IOException
ElementDescriptor
updateConfiguration
in interface ElementDescriptor
newConfig
- configuration
DataStorageException
IOException
public Map<String,Object> getStatistics() throws IOException
ElementDescriptor
getStatistics
in interface ElementDescriptor
IOException
public int compareTo(ElementDescriptor other)
compareTo
in interface Comparable<ElementDescriptor>
public boolean systemElement()
ElementDescriptor
systemElement
in interface ElementDescriptor
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |