org.springframework.data.hadoop.pig
Interface PigCallback<T>


public interface PigCallback<T>

Callback interface for Pig code. To be used with PigTemplate execute method, assumably often as anonymous classes within a method implementation.

Author:
Costin Leau

Method Summary
 T doInPig(PigServer pig)
          Gets called by PigTemplate.execute(PigCallback) with an active PigServer.
 

Method Detail

doInPig

T doInPig(PigServer pig)
          throws ExecException,
                 IOException
Gets called by PigTemplate.execute(PigCallback) with an active PigServer. Does not need to care about activating or closing the PigServer, or handling exceptions.

Parameters:
pig - active pig server
Returns:
action result
Throws:
ExecException - if thrown by Pig API
IOException - if thrown by Pig API