|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.builtin.PigStreaming
public class PigStreaming
The default implementation of PigToStream
and StreamToPig
interfaces. It converts tuples into fieldDel
separated lines
and fieldDel
separated lines into tuples.
Constructor Summary | |
---|---|
PigStreaming()
The constructor that uses the default field delimiter. |
|
PigStreaming(String delimiter)
The constructor that accepts a user-specified field delimiter. |
Method Summary | |
---|---|
Tuple |
deserialize(byte[] bytes)
Given a byte array from a streaming executable, produce a tuple. |
LoadCaster |
getLoadCaster()
This will be called on the front end during planning and not on the back end during execution. |
byte[] |
serialize(Tuple t)
Given a tuple, produce an array of bytes to be passed to the streaming executable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PigStreaming()
public PigStreaming(String delimiter)
delimiter
- a String
specifying the field
delimiter.Method Detail |
---|
public byte[] serialize(Tuple t) throws IOException
PigToStream
serialize
in interface PigToStream
t
- Tuple to serialize
IOException
public Tuple deserialize(byte[] bytes) throws IOException
StreamToPig
deserialize
in interface StreamToPig
bytes
- to deserialize.
IOException
public LoadCaster getLoadCaster() throws IOException
StreamToPig
getLoadCaster
in interface StreamToPig
LoadCaster
associated with this object, or null if
there is no such LoadCaster.
IOException
- if there is an exception during LoadCaster
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |