org.apache.pig.scripting
Class BoundScript

java.lang.Object
  extended by org.apache.pig.scripting.BoundScript

public class BoundScript
extends Object

This represents an instance of a bound pipeline.


Method Summary
 void describe(String alias)
          Describe the schema of an alias in this pipeline.
 void explain()
          Explain this pipeline.
 void illustrate()
          Run illustrate for this pipeline.
 List<PigStats> run()
          Run multiple instances of bound pipeline on Hadoop in parallel.
 List<PigStats> run(Properties prop)
          Run multiple instances of bound pipeline on Hadoop in parallel.
 List<PigStats> run(String propfile)
          Run multiple instances of bound pipeline on Hadoop in parallel.
 PigStats runSingle()
          Run a pipeline on Hadoop.
 PigStats runSingle(Properties prop)
          Run a pipeline on Hadoop.
 PigStats runSingle(String propfile)
          Run a pipeline on Hadoop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

runSingle

public PigStats runSingle()
                   throws IOException
Run a pipeline on Hadoop. If there are no stores in this pipeline then nothing will be run.

Returns:
PigStats, null if there is no bound query to run.
Throws:
IOException

runSingle

public PigStats runSingle(Properties prop)
                   throws IOException
Run a pipeline on Hadoop. If there are no stores in this pipeline then nothing will be run.

Parameters:
prop - Map of properties that Pig should set when running the script. This is intended for use with scripting languages that do not support the Properties object.
Returns:
PigStats, null if there is no bound query to run.
Throws:
IOException

runSingle

public PigStats runSingle(String propfile)
                   throws IOException
Run a pipeline on Hadoop. If there are no stores in this pipeline then nothing will be run.

Parameters:
propfile - File with properties that Pig should set when running the script.
Returns:
PigStats, null if there is no bound query to run.
Throws:
IOException

run

public List<PigStats> run()
                   throws IOException
Run multiple instances of bound pipeline on Hadoop in parallel. If there are no stores in this pipeline then nothing will be run. Bind is called first with the list of maps of variables to bind.

Returns:
a list of PigStats, one for each map of variables passed to bind.
Throws:
IOException

run

public List<PigStats> run(Properties prop)
                   throws IOException
Run multiple instances of bound pipeline on Hadoop in parallel.

Parameters:
prop - Map of properties that Pig should set when running the script. This is intended for use with scripting languages that do not support the Properties object.
Returns:
a list of PigStats, one for each map of variables passed to bind.
Throws:
IOException

run

public List<PigStats> run(String propfile)
                   throws IOException
Run multiple instances of bound pipeline on Hadoop in parallel.

Parameters:
propfile - File with properties that Pig should set when running the script.
Returns:
a list of PigResults, one for each map of variables passed to bind.
Throws:
IOException

illustrate

public void illustrate()
                throws IOException
Run illustrate for this pipeline. Results will be printed to stdout.

Throws:
IOException - if illustrate fails.

explain

public void explain()
             throws IOException
Explain this pipeline. Results will be printed to stdout.

Throws:
IOException - if explain fails.

describe

public void describe(String alias)
              throws IOException
Describe the schema of an alias in this pipeline. Results will be printed to stdout.

Parameters:
alias - to be described
Throws:
IOException - if describe fails.


Copyright © 2007-2012 The Apache Software Foundation