public abstract class Launcher
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
Launcher.JobControlThreadExceptionHandler
An exception handler class to handle exceptions thrown by the job controller thread
Its a local class.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<FileSpec,java.lang.Exception> |
failureMap |
protected org.apache.hadoop.mapred.jobcontrol.JobControl |
jc |
protected java.lang.Exception |
jobControlException |
protected java.lang.String |
jobControlExceptionStackTrace |
protected long |
totalHadoopTimeSpent |
Modifier | Constructor and Description |
---|---|
protected |
Launcher() |
Modifier and Type | Method and Description |
---|---|
protected double |
calculateProgress(org.apache.hadoop.mapred.jobcontrol.JobControl jc)
Compute the progress of the current job submitted through the JobControl
object jc to the JobClient jobClient
|
protected long |
computeTimeSpent(java.util.Iterator<org.apache.hadoop.mapred.TaskReport> taskReports) |
void |
destroy() |
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(java.util.Iterator<org.apache.hadoop.mapred.TaskReport> reports,
java.lang.String type,
boolean errNotDbg,
PigContext pigContext) |
java.lang.Exception |
getExceptionFromString(java.lang.String stackTrace) |
java.lang.StackTraceElement |
getStackTraceElement(java.lang.String line) |
long |
getTotalHadoopTimeSpent() |
protected boolean |
isComplete(double prog) |
abstract void |
kill() |
abstract void |
killJob(java.lang.String jobID,
org.apache.hadoop.conf.Configuration conf) |
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.
|
void |
reset()
Resets the state after a launch
|
protected void |
setJobException(java.lang.Throwable throwable) |
protected java.lang.String jobControlExceptionStackTrace
protected java.lang.Exception jobControlException
protected long totalHadoopTimeSpent
protected java.util.Map<FileSpec,java.lang.Exception> failureMap
protected org.apache.hadoop.mapred.jobcontrol.JobControl jc
public void reset()
public abstract PigStats launchPig(PhysicalPlan php, java.lang.String grpName, PigContext pc) throws java.lang.Exception
php
- grpName
- pc
- java.lang.Exception
public 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 printVisitorException
java.io.IOException
PlanException
public abstract void kill() throws BackendException
BackendException
public abstract void killJob(java.lang.String jobID, org.apache.hadoop.conf.Configuration conf) throws BackendException
BackendException
protected boolean isComplete(double prog)
protected long computeTimeSpent(java.util.Iterator<org.apache.hadoop.mapred.TaskReport> taskReports)
protected void getErrorMessages(java.util.Iterator<org.apache.hadoop.mapred.TaskReport> reports, java.lang.String type, boolean errNotDbg, PigContext pigContext) throws java.lang.Exception
java.lang.Exception
protected double calculateProgress(org.apache.hadoop.mapred.jobcontrol.JobControl jc) throws java.io.IOException
jc
- - The JobControl object that has been submittedjobClient
- - The JobClient to which it has been submittedjava.io.IOException
public long getTotalHadoopTimeSpent()
protected void setJobException(java.lang.Throwable throwable)
public java.lang.Exception getExceptionFromString(java.lang.String stackTrace) throws java.lang.Exception
stackTrace
- The string representation of
printStackTrace
Handles
internal PigException and its subclasses that override the
toString
methodjava.lang.Exception
public java.lang.StackTraceElement getStackTraceElement(java.lang.String line) throws java.lang.Exception
line
- the string representation of a stack trace returned by
printStackTrace
java.lang.Exception
public void destroy()
Copyright © 2007-2012 The Apache Software Foundation