org.apache.pig.impl.streaming
Class PigStreamingUDF
java.lang.Object
org.apache.pig.PigStreamingBase
org.apache.pig.impl.streaming.PigStreamingUDF
- All Implemented Interfaces:
- PigToStream, StreamToPig
public class PigStreamingUDF
- extends PigStreamingBase
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PigStreamingUDF
public PigStreamingUDF()
PigStreamingUDF
public PigStreamingUDF(Schema.FieldSchema topLevelFs)
serializeToBytes
public WritableByteArray serializeToBytes(Tuple t)
throws IOException
- Description copied from class:
PigStreamingBase
- Given a tuple, produce an array of bytes to be passed to the streaming
executable.
- Specified by:
serializeToBytes
in class PigStreamingBase
- Parameters:
t
- Tuple to serialize
- Returns:
- Serialized form of the tuple
- Throws:
IOException
getLoadCaster
public LoadCaster getLoadCaster()
throws IOException
- Description copied from class:
PigStreamingBase
- This will be called on the front end during planning and not on the back
end during execution.
- Specified by:
getLoadCaster
in interface StreamToPig
- Specified by:
getLoadCaster
in class PigStreamingBase
- Returns:
- the
LoadCaster
associated with this object, or null if
there is no such LoadCaster.
- Throws:
IOException
- if there is an exception during LoadCaster
deserialize
public Tuple deserialize(byte[] bytes,
int offset,
int length)
throws IOException
- Description copied from class:
PigStreamingBase
- Given a byte array from a streaming executable, produce a tuple.
- Specified by:
deserialize
in class PigStreamingBase
- Parameters:
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.
- Returns:
- Data as a Pig Tuple.
- Throws:
IOException
getRecordDelim
public byte[] getRecordDelim()
Copyright © 2007-2012 The Apache Software Foundation