|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.PigStreamingBase
org.apache.pig.builtin.PigStreaming
public class PigStreaming
The default implementation of PigStreamingBase
.
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,
int offset,
int length)
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. |
WritableByteArray |
serializeToBytes(Tuple t)
Given a tuple, produce an array of bytes to be passed to the streaming executable. |
Methods inherited from class org.apache.pig.PigStreamingBase |
---|
deserialize, serialize |
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 WritableByteArray serializeToBytes(Tuple t) throws IOException
PigStreamingBase
serializeToBytes
in class PigStreamingBase
t
- Tuple to serialize
IOException
public Tuple deserialize(byte[] bytes, int offset, int length) throws IOException
PigStreamingBase
deserialize
in class PigStreamingBase
bytes
- bytes to deserialize.offset
- the offset in the byte array from which to deserialize.length
- the number of bytes from the offset of the byte array to deserialize.
IOException
public LoadCaster getLoadCaster() throws IOException
PigStreamingBase
getLoadCaster
in interface StreamToPig
getLoadCaster
in class PigStreamingBase
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 |