org.apache.pig.builtin
Class PigDump
java.lang.Object
org.apache.pig.builtin.PigDump
- All Implemented Interfaces:
- StoreFunc
public class PigDump
- extends Object
- implements StoreFunc
Method Summary |
void |
bindTo(OutputStream os)
Specifies the OutputStream to write to. |
void |
finish()
Do any kind of post processing because the last tuple has been
stored. |
Class |
getStorePreparationClass()
Specify a backend specific class to use to prepare for
storing output. |
void |
putNext(Tuple f)
Write a tuple the output stream to which this instance was
previously bound. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
recordDelimiter
public static String recordDelimiter
PigDump
public PigDump()
bindTo
public void bindTo(OutputStream os)
throws IOException
- Description copied from interface:
StoreFunc
- Specifies the OutputStream to write to. This will be called before
store(Tuple) is invoked.
- Specified by:
bindTo
in interface StoreFunc
- Parameters:
os
- The stream to write tuples to.
- Throws:
IOException
finish
public void finish()
throws IOException
- Description copied from interface:
StoreFunc
- Do any kind of post processing because the last tuple has been
stored. DO NOT CLOSE THE STREAM in this method. The stream will be
closed later outside of this function.
- Specified by:
finish
in interface StoreFunc
- Throws:
IOException
putNext
public void putNext(Tuple f)
throws IOException
- Description copied from interface:
StoreFunc
- Write a tuple the output stream to which this instance was
previously bound.
- Specified by:
putNext
in interface StoreFunc
- Parameters:
f
- the tuple to store.
- Throws:
IOException
getStorePreparationClass
public Class getStorePreparationClass()
throws IOException
- Description copied from interface:
StoreFunc
- Specify a backend specific class to use to prepare for
storing output. In the Hadoop case, this can return an
OutputFormat that will be used instead of PigOutputFormat. The
framework will call this function and if a Class is returned
that implements OutputFormat it will be used. For more details on how
the OutputFormat should interact with Pig, see
PigOutputFormat.getRecordWriter(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf, String, org.apache.hadoop.util.Progressable)
- Specified by:
getStorePreparationClass
in interface StoreFunc
- Returns:
- Backend specific class used to prepare for storing output.
If the
StoreFunc
implementation does not have a class to prepare
for storing output, it can return null and a default Pig implementation
will be used to prepare for storing output.
- Throws:
IOException
- if the class does not implement the expected
interface(s).
Copyright © ${year} The Apache Software Foundation