public abstract class Launcher extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
Launcher.HangingJobKiller |
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 Map<FileSpec,Exception> |
failureMap |
protected org.apache.hadoop.mapred.jobcontrol.JobControl |
jc |
protected Exception |
jobControlException |
protected 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(Iterator<org.apache.hadoop.mapreduce.TaskReport> taskReports) |
void |
destroy() |
abstract void |
explain(PhysicalPlan pp,
PigContext pc,
PrintStream ps,
String format,
boolean verbose)
Explain how a pig job will be executed on the underlying infrastructure.
|
protected void |
getErrorMessages(Iterator<org.apache.hadoop.mapreduce.TaskReport> reports,
String type,
boolean errNotDbg,
PigContext pigContext) |
Exception |
getExceptionFromString(String stackTrace) |
StackTraceElement |
getStackTraceElement(String line) |
long |
getTotalHadoopTimeSpent() |
protected boolean |
isComplete(double prog) |
abstract void |
kill() |
abstract void |
killJob(String jobID,
org.apache.hadoop.conf.Configuration conf) |
abstract PigStats |
launchPig(PhysicalPlan php,
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(Throwable throwable) |
protected String jobControlExceptionStackTrace
protected Exception jobControlException
protected long totalHadoopTimeSpent
protected org.apache.hadoop.mapred.jobcontrol.JobControl jc
public void reset()
public abstract PigStats launchPig(PhysicalPlan php, String grpName, PigContext pc) throws Exception
php - grpName - pc - Exceptionpublic abstract void explain(PhysicalPlan pp, PigContext pc, PrintStream ps, String format, boolean verbose) throws PlanException, VisitorException, IOException
pp - PhysicalPlan to explainpc - PigContext to use for configurationps - PrintStream to write output on.format - Format to write inverbose - Amount of information to printVisitorExceptionIOExceptionPlanExceptionpublic abstract void kill()
throws BackendException
BackendExceptionpublic abstract void killJob(String jobID, org.apache.hadoop.conf.Configuration conf) throws BackendException
BackendExceptionprotected boolean isComplete(double prog)
protected long computeTimeSpent(Iterator<org.apache.hadoop.mapreduce.TaskReport> taskReports)
protected void getErrorMessages(Iterator<org.apache.hadoop.mapreduce.TaskReport> reports, String type, boolean errNotDbg, PigContext pigContext) throws Exception
Exceptionprotected double calculateProgress(org.apache.hadoop.mapred.jobcontrol.JobControl jc)
throws IOException
jc - - The JobControl object that has been submittedjobClient - - The JobClient to which it has been submittedIOExceptionpublic long getTotalHadoopTimeSpent()
protected void setJobException(Throwable throwable)
public Exception getExceptionFromString(String stackTrace) throws Exception
stackTrace - The string representation of
printStackTrace Handles
internal PigException and its subclasses that override the
toString methodExceptionpublic StackTraceElement getStackTraceElement(String line) throws Exception
line - the string representation of a stack trace returned by
printStackTraceExceptionpublic void destroy()
Copyright © 2007-2017 The Apache Software Foundation