org.apache.pig
Interface PigToStream

All Known Implementing Classes:
PigStreaming

@InterfaceAudience.Public
@InterfaceStability.Stable
public interface PigToStream

The interface used for the custom mapping of a Tuple to a byte array. The byte array is fed to the stdin of the streaming process. This interface, together with StreamToPig, is designed to provide a common protocol for data exchange between Pig runtime and streaming executables. Typically, a user implements this interface for a particular type of stream command and specifies the implementation class in the Pig DEFINE statement.

Since:
Pig 0.7

Method Summary
 byte[] serialize(Tuple t)
          Given a tuple, produce an array of bytes to be passed to the streaming executable.
 

Method Detail

serialize

byte[] serialize(Tuple t)
                 throws IOException
Given a tuple, produce an array of bytes to be passed to the streaming executable.

Parameters:
t - Tuple to serialize
Returns:
Serialized form of the tuple
Throws:
IOException


Copyright © ${year} The Apache Software Foundation