public abstract class Launcher
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
Launcher() |
| Modifier and Type | Method and Description |
|---|---|
protected double |
calculateProgress(org.apache.hadoop.mapred.jobcontrol.JobControl jc,
org.apache.hadoop.mapred.JobClient jobClient)
Compute the progress of the current job submitted
through the JobControl object jc to the JobClient jobClient
|
protected long |
computeTimeSpent(org.apache.hadoop.mapred.TaskReport[] taskReports) |
abstract void |
explain(PhysicalPlan pp,
PigContext pc,
java.io.PrintStream ps,
java.lang.String format,
boolean verbose)
Explain how a pig job will be executed on the underlying
infrastructure.
|
protected void |
getErrorMessages(org.apache.hadoop.mapred.TaskReport[] reports,
java.lang.String type,
boolean errNotDbg,
PigContext pigContext) |
java.lang.StackTraceElement |
getStackTraceElement(java.lang.String line) |
protected void |
getStats(org.apache.hadoop.mapred.jobcontrol.Job job,
org.apache.hadoop.mapred.JobClient jobClient,
boolean errNotDbg,
PigContext pigContext) |
long |
getTotalHadoopTimeSpent() |
protected boolean |
isComplete(double prog) |
abstract PigStats |
launchPig(PhysicalPlan php,
java.lang.String grpName,
PigContext pc)
Method to launch pig for hadoop either for a cluster's
job tracker or for a local job runner.
|
protected double |
progressOfRunningJob(org.apache.hadoop.mapred.jobcontrol.Job j,
org.apache.hadoop.mapred.JobClient jobClient)
Returns the progress of a Job j which is part of a submitted
JobControl object.
|
void |
reset()
Resets the state after a launch
|
public void reset()
public abstract PigStats launchPig(PhysicalPlan php, java.lang.String grpName, PigContext pc) throws PlanException, VisitorException, java.io.IOException, ExecException, JobCreationException, java.lang.Exception
php - grpName - pc - PlanExceptionVisitorExceptionjava.io.IOExceptionExecExceptionJobCreationExceptionjava.lang.Exceptionpublic abstract void explain(PhysicalPlan pp, PigContext pc, java.io.PrintStream ps, java.lang.String format, boolean verbose) throws PlanException, VisitorException, java.io.IOException
pp - PhysicalPlan to explainpc - PigContext to use for configurationps - PrintStream to write output on.format - Format to write inverbose - Amount of information to printVisitorExceptionjava.io.IOExceptionPlanExceptionprotected boolean isComplete(double prog)
protected void getStats(org.apache.hadoop.mapred.jobcontrol.Job job,
org.apache.hadoop.mapred.JobClient jobClient,
boolean errNotDbg,
PigContext pigContext)
throws java.lang.Exception
java.lang.Exceptionprotected long computeTimeSpent(org.apache.hadoop.mapred.TaskReport[] taskReports)
protected void getErrorMessages(org.apache.hadoop.mapred.TaskReport[] reports,
java.lang.String type,
boolean errNotDbg,
PigContext pigContext)
throws java.lang.Exception
java.lang.Exceptionprotected double calculateProgress(org.apache.hadoop.mapred.jobcontrol.JobControl jc,
org.apache.hadoop.mapred.JobClient jobClient)
throws java.io.IOException
jc - - The JobControl object that has been submittedjobClient - - The JobClient to which it has been submittedjava.io.IOExceptionprotected double progressOfRunningJob(org.apache.hadoop.mapred.jobcontrol.Job j,
org.apache.hadoop.mapred.JobClient jobClient)
throws java.io.IOException
j - - The Job for which progress is requiredjobClient - - the JobClient to which it has been submittedjava.io.IOExceptionpublic long getTotalHadoopTimeSpent()
public java.lang.StackTraceElement getStackTraceElement(java.lang.String line)
throws java.lang.Exception
line - the string representation of a stack trace returned by printStackTracejava.lang.ExceptionCopyright © 2007-2012 The Apache Software Foundation