org.apache.pig.backend.local.datastorage
Class LocalFile
java.lang.Object
org.apache.pig.backend.local.datastorage.LocalPath
org.apache.pig.backend.local.datastorage.LocalFile
- All Implemented Interfaces:
- Comparable<ElementDescriptor>, ElementDescriptor
public class LocalFile
- extends LocalPath
Fields inherited from class org.apache.pig.backend.local.datastorage.LocalPath |
fs, path |
Constructor Summary |
LocalFile(LocalDataStorage fs,
File path)
|
LocalFile(LocalDataStorage fs,
File parent,
File child)
|
LocalFile(LocalDataStorage fs,
File parent,
String child)
|
LocalFile(LocalDataStorage fs,
String path)
|
LocalFile(LocalDataStorage fs,
String parent,
File child)
|
LocalFile(LocalDataStorage fs,
String parent,
String child)
|
Methods inherited from class org.apache.pig.backend.local.datastorage.LocalPath |
compareTo, copy, create, delete, exists, getConfiguration, getCurPath, getDataStorage, getPath, getStatistics, rename, systemElement, toString, updateConfiguration |
LocalFile
public LocalFile(LocalDataStorage fs,
String path)
LocalFile
public LocalFile(LocalDataStorage fs,
File path)
LocalFile
public LocalFile(LocalDataStorage fs,
String parent,
String child)
LocalFile
public LocalFile(LocalDataStorage fs,
File parent,
File child)
LocalFile
public LocalFile(LocalDataStorage fs,
File parent,
String child)
LocalFile
public LocalFile(LocalDataStorage fs,
String parent,
File child)
create
public OutputStream create(Properties configuration)
throws IOException
- Description copied from interface:
ElementDescriptor
- Opens a stream onto which an entity can be written to.
- Specified by:
create
in interface ElementDescriptor
- Specified by:
create
in class LocalPath
- Parameters:
configuration
- information at the object level
- Returns:
- stream where to write
- Throws:
DataStorageException
IOException
copy
public void copy(ElementDescriptor dstName,
Properties dstConfiguration,
boolean removeSrc)
throws IOException
- Description copied from interface:
ElementDescriptor
- Copy entity from an existing one, possibly residing in a
different Data Storage.
- Specified by:
copy
in interface ElementDescriptor
- Specified by:
copy
in class LocalPath
- Parameters:
dstName
- name of entity to createdstConfiguration
- configuration for the new entityremoveSrc
- if src entity needs to be removed after copying it
- Throws:
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
open
public InputStream open(Properties configuration)
throws IOException
- Description copied from interface:
ElementDescriptor
- Open for read a given entity
- Returns:
- entity to read from
- Throws:
IOException
open
public InputStream open()
throws IOException
- Specified by:
open
in interface ElementDescriptor
- Specified by:
open
in class LocalPath
- Throws:
IOException
sopen
public SeekableInputStream sopen(Properties configuration)
throws IOException
- Description copied from interface:
ElementDescriptor
- Open an element in the Data Storage with support for random access
(seek operations).
- Returns:
- a seekable input stream
- Throws:
DataStorageException
IOException
sopen
public SeekableInputStream sopen()
throws IOException
- Specified by:
sopen
in interface ElementDescriptor
- Specified by:
sopen
in class LocalPath
- Throws:
IOException
Copyright © ${year} The Apache Software Foundation