org.springframework.data.hadoop.pig
Interface PigOperations

All Known Implementing Classes:
PigTemplate

public interface PigOperations

Interface specifying a basic set of Pig operations. Implemented by PigTemplate. Not often used directly, but a useful option to enhance testability, as it can easily be mocked or stubbed.

Author:
Costin Leau

Method Summary
<T> T
execute(PigCallback<T> action)
          Executes the action specified by the given callback object within an active PigServer.
 List<ExecJob> executeScript(Iterable<PigScript> scripts)
          Executes multiple scripts that result in a list of job executions.
 List<ExecJob> executeScript(PigScript script)
          Executes the given script identified by location and arguments that results in a list of job executions.
 List<ExecJob> executeScript(String script)
          Executes the given Pig Latin that results in a list of job executions.
 List<ExecJob> executeScript(String script, Map<?,?> arguments)
          Executes the given Pig Latin with arguments that results in a list of job executions.
 

Method Detail

execute

<T> T execute(PigCallback<T> action)
          throws DataAccessException
Executes the action specified by the given callback object within an active PigServer.

Parameters:
action - callback object that specifies the Hive action
Returns:
the action result object
Throws:
DataAccessException

executeScript

List<ExecJob> executeScript(String script)
                            throws DataAccessException
Executes the given Pig Latin that results in a list of job executions. The script is interpreted as a URL or if that fails, as a Pig Latin statement.

Parameters:
script - script URL or pig latin statement
Returns:
list of job executions
Throws:
DataAccessException

executeScript

List<ExecJob> executeScript(String script,
                            Map<?,?> arguments)
                            throws DataAccessException
Executes the given Pig Latin with arguments that results in a list of job executions. The script is interpreted as a URL or if that fails, as a Pig Latin statement.

Parameters:
script - script URL or pig latin statement
arguments - script arguments
Returns:
list of job executions
Throws:
DataAccessException

executeScript

List<ExecJob> executeScript(PigScript script)
                            throws DataAccessException
Executes the given script identified by location and arguments that results in a list of job executions.

Parameters:
script - script location and arguments
Returns:
list of job executions
Throws:
DataAccessException

executeScript

List<ExecJob> executeScript(Iterable<PigScript> scripts)
                            throws DataAccessException
Executes multiple scripts that result in a list of job executions.

Parameters:
scripts - scripts location and arguments
Returns:
list of job executions
Throws:
DataAccessException