|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.backend.hadoop.executionengine.Launcher
public abstract class Launcher
Provides core processing implementation for the backend of Pig if ExecutionEngine chosen decides to delegate it's work to this class. Also contains set of utility methods, including ones centered around Hadoop.
Nested Class Summary | |
---|---|
class |
Launcher.JobControlThreadExceptionHandler
An exception handler class to handle exceptions thrown by the job controller thread Its a local class. |
Field Summary | |
---|---|
protected Map<FileSpec,Exception> |
failureMap
|
protected org.apache.hadoop.mapred.jobcontrol.JobControl |
jc
|
protected Exception |
jobControlException
|
protected String |
jobControlExceptionStackTrace
|
protected long |
totalHadoopTimeSpent
|
Constructor Summary | |
---|---|
protected |
Launcher()
|
Method Summary | |
---|---|
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(org.apache.hadoop.mapred.TaskReport[] taskReports)
|
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(org.apache.hadoop.mapred.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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String jobControlExceptionStackTrace
protected Exception jobControlException
protected long totalHadoopTimeSpent
protected Map<FileSpec,Exception> failureMap
protected org.apache.hadoop.mapred.jobcontrol.JobControl jc
Constructor Detail |
---|
protected Launcher()
Method Detail |
---|
public void reset()
public abstract PigStats launchPig(PhysicalPlan php, String grpName, PigContext pc) throws Exception
php
- grpName
- pc
-
Exception
public 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 print
VisitorException
IOException
PlanException
public abstract void kill() throws BackendException
BackendException
public abstract void killJob(String jobID, org.apache.hadoop.conf.Configuration conf) throws BackendException
BackendException
protected boolean isComplete(double prog)
protected long computeTimeSpent(org.apache.hadoop.mapred.TaskReport[] taskReports)
protected void getErrorMessages(org.apache.hadoop.mapred.TaskReport[] reports, String type, boolean errNotDbg, PigContext pigContext) throws Exception
Exception
protected 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 submitted
IOException
public long getTotalHadoopTimeSpent()
public Exception getExceptionFromString(String stackTrace) throws Exception
stackTrace
- The string representation of
printStackTrace
Handles
internal PigException and its subclasses that override the
toString
method
Exception
public StackTraceElement getStackTraceElement(String line) throws Exception
line
- the string representation of a stack trace returned by
printStackTrace
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |