public class PigStreamingUDF extends PigStreamingBase
Constructor and Description |
---|
PigStreamingUDF() |
PigStreamingUDF(Schema.FieldSchema topLevelFs) |
Modifier and Type | Method and Description |
---|---|
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.
|
byte[] |
getRecordDelim() |
WritableByteArray |
serializeToBytes(Tuple t)
Given a tuple, produce an array of bytes to be passed to the streaming
executable.
|
deserialize, serialize
public PigStreamingUDF()
public PigStreamingUDF(Schema.FieldSchema topLevelFs)
public WritableByteArray serializeToBytes(Tuple t) throws IOException
PigStreamingBase
serializeToBytes
in class PigStreamingBase
t
- Tuple to serializeIOException
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 LoadCasterpublic 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 byte[] getRecordDelim()
Copyright © 2007-2012 The Apache Software Foundation