Spring for Apache Hadoop

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(org.apache.pig.PigServer pig)
          Gets called by PigTemplate.execute(PigCallback) with an active PigServer.
 

Method Detail

doInPig

T doInPig(org.apache.pig.PigServer pig)
          throws org.apache.pig.backend.executionengine.ExecException,
                 java.io.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:
org.apache.pig.backend.executionengine.ExecException - if thrown by Pig API
java.io.IOException - if thrown by Pig API

Spring for Apache Hadoop