org.apache.pig.tools.pigstats
Interface PigProgressNotificationListener

All Superinterfaces:
EventListener

@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface PigProgressNotificationListener
extends EventListener

Should be implemented by an object that wants to receive notifications from PigRunner.


Method Summary
 void initialPlanNotification(String scriptId, MROperPlan plan)
          Invoked before any MR jobs are run with the plan that is to be executed.
 void jobFailedNotification(String scriptId, JobStats jobStats)
          Invoked when a MR job fails.
 void jobFinishedNotification(String scriptId, JobStats jobStats)
          Invoked just after a MR job is completed successfully.
 void jobsSubmittedNotification(String scriptId, int numJobsSubmitted)
          Invoked just before submitting a batch of MR jobs.
 void jobStartedNotification(String scriptId, String assignedJobId)
          Invoked after a MR job is started.
 void launchCompletedNotification(String scriptId, int numJobsSucceeded)
          Invoked just after all MR jobs spawned by the script are completed.
 void launchStartedNotification(String scriptId, int numJobsToLaunch)
          Invoked just before launching MR jobs spawned by the script.
 void outputCompletedNotification(String scriptId, OutputStats outputStats)
          Invoked just after an output is successfully written.
 void progressUpdatedNotification(String scriptId, int progress)
          Invoked to update the execution progress.
 

Method Detail

initialPlanNotification

void initialPlanNotification(String scriptId,
                             MROperPlan plan)
Invoked before any MR jobs are run with the plan that is to be executed.

Parameters:
scriptId - the unique id of the script
plan - the MROperPlan that is to be executed

launchStartedNotification

void launchStartedNotification(String scriptId,
                               int numJobsToLaunch)
Invoked just before launching MR jobs spawned by the script.

Parameters:
scriptId - the unique id of the script
numJobsToLaunch - the total number of MR jobs spawned by the script

jobsSubmittedNotification

void jobsSubmittedNotification(String scriptId,
                               int numJobsSubmitted)
Invoked just before submitting a batch of MR jobs.

Parameters:
scriptId - the unique id of the script
numJobsSubmitted - the number of MR jobs in the batch

jobStartedNotification

void jobStartedNotification(String scriptId,
                            String assignedJobId)
Invoked after a MR job is started.

Parameters:
scriptId - the unique id of the script
assignedJobId - the MR job id

jobFinishedNotification

void jobFinishedNotification(String scriptId,
                             JobStats jobStats)
Invoked just after a MR job is completed successfully.

Parameters:
scriptId - the unique id of the script
jobStats - the JobStats object associated with the MR job

jobFailedNotification

void jobFailedNotification(String scriptId,
                           JobStats jobStats)
Invoked when a MR job fails.

Parameters:
scriptId - the unique id of the script
jobStats - the JobStats object associated with the MR job

outputCompletedNotification

void outputCompletedNotification(String scriptId,
                                 OutputStats outputStats)
Invoked just after an output is successfully written.

Parameters:
scriptId - the unique id of the script
outputStats - the OutputStats object associated with the output

progressUpdatedNotification

void progressUpdatedNotification(String scriptId,
                                 int progress)
Invoked to update the execution progress.

Parameters:
scriptId - the unique id of the script
progress - the percentage of the execution progress

launchCompletedNotification

void launchCompletedNotification(String scriptId,
                                 int numJobsSucceeded)
Invoked just after all MR jobs spawned by the script are completed.

Parameters:
scriptId - the unique id of the script
numJobsSucceeded - the total number of MR jobs succeeded


Copyright © 2007-2012 The Apache Software Foundation