|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@InterfaceAudience.Public @InterfaceStability.Stable public interface StreamToPig
The interface is used for the custom mapping of a byte array, received from
the stdout of the streaming process, to a Tuple
.
This interface, together with PigToStream
, is designed to provide
a common protocol for data exchange between Pig runtime and streaming
executables.
The method getLoadCaster
is called by Pig to convert the
fields in the byte array to typed fields of the Tuple based on a given
schema.
Typically, user implements this interface for a particular type of
stream command and specifies the implementation class in the Pig DEFINE
statement.
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. |
Method Detail |
---|
Tuple deserialize(byte[] bytes) throws IOException
bytes
- to deserialize.
IOException
LoadCaster getLoadCaster() throws IOException
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 |