org.apache.pig.backend.hadoop.executionengine.mapreduceExec
Class MapReduceLauncher

java.lang.Object
  extended by org.apache.pig.backend.hadoop.executionengine.mapreduceExec.MapReduceLauncher

public class MapReduceLauncher
extends Object

This is that Main-Class for the Pig Jar file. It will setup a Pig jar file to run with the proper libraries. It will also provide a basic shell if - or -e is used as the name of the Jar file.

Author:
breed

Nested Class Summary
static class MapReduceLauncher.PigWritableComparator
           
 
Field Summary
static org.apache.hadoop.conf.Configuration config
           
static HExecutionEngine execEngine
           
static String LOG_DIR
           
static int mrJobNumber
           
static int numMRJobs
           
static long totalHadoopTimeSpent
           
 
Constructor Summary
MapReduceLauncher()
           
 
Method Summary
static void initQueryStatus(int numMRJobsIn)
           
 boolean launchPig(POMapreduce pom)
          Submit a Pig job to hadoop.
static void setConf(org.apache.hadoop.conf.Configuration configuration)
           
static void setExecEngine(HExecutionEngine executionEngine)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

totalHadoopTimeSpent

public static long totalHadoopTimeSpent

numMRJobs

public static int numMRJobs

mrJobNumber

public static int mrJobNumber

config

public static org.apache.hadoop.conf.Configuration config

execEngine

public static HExecutionEngine execEngine

LOG_DIR

public static final String LOG_DIR
See Also:
Constant Field Values
Constructor Detail

MapReduceLauncher

public MapReduceLauncher()
Method Detail

setConf

public static void setConf(org.apache.hadoop.conf.Configuration configuration)

setExecEngine

public static void setExecEngine(HExecutionEngine executionEngine)

initQueryStatus

public static void initQueryStatus(int numMRJobsIn)

launchPig

public boolean launchPig(POMapreduce pom)
                  throws IOException
Submit a Pig job to hadoop.

Parameters:
mapFuncs - a list of map functions to apply to the inputs. The cardinality of the list should be the same as input's cardinality.
groupFuncs - a list of grouping functions to apply to the inputs. The cardinality of the list should be the same as input's cardinality.
reduceFunc - the reduce function.
mapTasks - the number of map tasks to use.
reduceTasks - the number of reduce tasks to use.
input - a list of inputs
output - the path of the output.
Returns:
an indicator of success or failure.
Throws:
IOException


Copyright © ${year} The Apache Software Foundation