Package org.apache.spark.scheduler
Class SparkListener
Object
org.apache.spark.scheduler.SparkListener
- All Implemented Interfaces:
SparkListenerInterface
- Direct Known Subclasses:
SpillListener,StatsReportListener
:: DeveloperApi ::
A default implementation for
SparkListenerInterface that has no-op implementations for
all callbacks.
Note that this is an internal interface which might change in different Spark releases.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonApplicationEnd(SparkListenerApplicationEnd applicationEnd) Called when the application endsvoidonApplicationStart(SparkListenerApplicationStart applicationStart) Called when the application startsvoidonBlockManagerAdded(SparkListenerBlockManagerAdded blockManagerAdded) Called when a new block manager has joinedvoidonBlockManagerRemoved(SparkListenerBlockManagerRemoved blockManagerRemoved) Called when an existing block manager has been removedvoidonBlockUpdated(SparkListenerBlockUpdated blockUpdated) Called when the driver receives a block update info.voidonEnvironmentUpdate(SparkListenerEnvironmentUpdate environmentUpdate) Called when environment properties have been updatedvoidonExecutorAdded(SparkListenerExecutorAdded executorAdded) Called when the driver registers a new executor.voidonExecutorBlacklisted(SparkListenerExecutorBlacklisted executorBlacklisted) Called when the driver excludes an executor for a Spark application.voidonExecutorBlacklistedForStage(SparkListenerExecutorBlacklistedForStage executorBlacklistedForStage) Called when the driver excludes an executor for a stage.voidonExecutorExcluded(SparkListenerExecutorExcluded executorExcluded) Called when the driver excludes an executor for a Spark application.voidonExecutorExcludedForStage(SparkListenerExecutorExcludedForStage executorExcludedForStage) Called when the driver excludes an executor for a stage.voidonExecutorMetricsUpdate(SparkListenerExecutorMetricsUpdate executorMetricsUpdate) Called when the driver receives task metrics from an executor in a heartbeat.voidonExecutorRemoved(SparkListenerExecutorRemoved executorRemoved) Called when the driver removes an executor.voidonExecutorUnblacklisted(SparkListenerExecutorUnblacklisted executorUnblacklisted) Called when the driver re-enables a previously excluded executor.voidonExecutorUnexcluded(SparkListenerExecutorUnexcluded executorUnexcluded) Called when the driver re-enables a previously excluded executor.voidonJobEnd(SparkListenerJobEnd jobEnd) Called when a job endsvoidonJobStart(SparkListenerJobStart jobStart) Called when a job startsvoidonNodeBlacklisted(SparkListenerNodeBlacklisted nodeBlacklisted) Called when the driver excludes a node for a Spark application.voidonNodeBlacklistedForStage(SparkListenerNodeBlacklistedForStage nodeBlacklistedForStage) Called when the driver excludes a node for a stage.voidonNodeExcluded(SparkListenerNodeExcluded nodeExcluded) Called when the driver excludes a node for a Spark application.voidonNodeExcludedForStage(SparkListenerNodeExcludedForStage nodeExcludedForStage) Called when the driver excludes a node for a stage.voidonNodeUnblacklisted(SparkListenerNodeUnblacklisted nodeUnblacklisted) Called when the driver re-enables a previously excluded node.voidonNodeUnexcluded(SparkListenerNodeUnexcluded nodeUnexcluded) Called when the driver re-enables a previously excluded node.voidonOtherEvent(SparkListenerEvent event) Called when other events like SQL-specific events are posted.voidCalled when a Resource Profile is added to the manager.voidonSpeculativeTaskSubmitted(SparkListenerSpeculativeTaskSubmitted speculativeTask) Called when a speculative task is submittedvoidonStageCompleted(SparkListenerStageCompleted stageCompleted) Called when a stage completes successfully or fails, with information on the completed stage.voidonStageExecutorMetrics(SparkListenerStageExecutorMetrics executorMetrics) Called with the peak memory metrics for a given (executor, stage) combination.voidonStageSubmitted(SparkListenerStageSubmitted stageSubmitted) Called when a stage is submittedvoidonTaskEnd(SparkListenerTaskEnd taskEnd) Called when a task endsvoidonTaskGettingResult(SparkListenerTaskGettingResult taskGettingResult) Called when a task begins remotely fetching its result (will not be called for tasks that do not need to fetch the result remotely).voidonTaskStart(SparkListenerTaskStart taskStart) Called when a task startsvoidonUnpersistRDD(SparkListenerUnpersistRDD unpersistRDD) Called when an RDD is manually unpersisted by the applicationvoidonUnschedulableTaskSetAdded(SparkListenerUnschedulableTaskSetAdded unschedulableTaskSetAdded) Called when a taskset becomes unschedulable due to exludeOnFailure and dynamic allocation is enabled.voidonUnschedulableTaskSetRemoved(SparkListenerUnschedulableTaskSetRemoved unschedulableTaskSetRemoved) Called when an unschedulable taskset becomes schedulable and dynamic allocation is enabled.
-
Constructor Details
-
SparkListener
public SparkListener()
-
-
Method Details
-
onApplicationEnd
Description copied from interface:SparkListenerInterfaceCalled when the application ends- Specified by:
onApplicationEndin interfaceSparkListenerInterface- Parameters:
applicationEnd- (undocumented)
-
onApplicationStart
Description copied from interface:SparkListenerInterfaceCalled when the application starts- Specified by:
onApplicationStartin interfaceSparkListenerInterface- Parameters:
applicationStart- (undocumented)
-
onBlockManagerAdded
Description copied from interface:SparkListenerInterfaceCalled when a new block manager has joined- Specified by:
onBlockManagerAddedin interfaceSparkListenerInterface- Parameters:
blockManagerAdded- (undocumented)
-
onBlockManagerRemoved
Description copied from interface:SparkListenerInterfaceCalled when an existing block manager has been removed- Specified by:
onBlockManagerRemovedin interfaceSparkListenerInterface- Parameters:
blockManagerRemoved- (undocumented)
-
onBlockUpdated
Description copied from interface:SparkListenerInterfaceCalled when the driver receives a block update info.- Specified by:
onBlockUpdatedin interfaceSparkListenerInterface- Parameters:
blockUpdated- (undocumented)
-
onEnvironmentUpdate
Description copied from interface:SparkListenerInterfaceCalled when environment properties have been updated- Specified by:
onEnvironmentUpdatein interfaceSparkListenerInterface- Parameters:
environmentUpdate- (undocumented)
-
onExecutorAdded
Description copied from interface:SparkListenerInterfaceCalled when the driver registers a new executor.- Specified by:
onExecutorAddedin interfaceSparkListenerInterface- Parameters:
executorAdded- (undocumented)
-
onExecutorBlacklisted
Description copied from interface:SparkListenerInterfaceCalled when the driver excludes an executor for a Spark application.- Specified by:
onExecutorBlacklistedin interfaceSparkListenerInterface- Parameters:
executorBlacklisted- (undocumented)
-
onExecutorBlacklistedForStage
public void onExecutorBlacklistedForStage(SparkListenerExecutorBlacklistedForStage executorBlacklistedForStage) Description copied from interface:SparkListenerInterfaceCalled when the driver excludes an executor for a stage.- Specified by:
onExecutorBlacklistedForStagein interfaceSparkListenerInterface- Parameters:
executorBlacklistedForStage- (undocumented)
-
onExecutorExcluded
Description copied from interface:SparkListenerInterfaceCalled when the driver excludes an executor for a Spark application.- Specified by:
onExecutorExcludedin interfaceSparkListenerInterface- Parameters:
executorExcluded- (undocumented)
-
onExecutorExcludedForStage
public void onExecutorExcludedForStage(SparkListenerExecutorExcludedForStage executorExcludedForStage) Description copied from interface:SparkListenerInterfaceCalled when the driver excludes an executor for a stage.- Specified by:
onExecutorExcludedForStagein interfaceSparkListenerInterface- Parameters:
executorExcludedForStage- (undocumented)
-
onExecutorMetricsUpdate
Description copied from interface:SparkListenerInterfaceCalled when the driver receives task metrics from an executor in a heartbeat.- Specified by:
onExecutorMetricsUpdatein interfaceSparkListenerInterface- Parameters:
executorMetricsUpdate- (undocumented)
-
onExecutorRemoved
Description copied from interface:SparkListenerInterfaceCalled when the driver removes an executor.- Specified by:
onExecutorRemovedin interfaceSparkListenerInterface- Parameters:
executorRemoved- (undocumented)
-
onExecutorUnblacklisted
Description copied from interface:SparkListenerInterfaceCalled when the driver re-enables a previously excluded executor.- Specified by:
onExecutorUnblacklistedin interfaceSparkListenerInterface- Parameters:
executorUnblacklisted- (undocumented)
-
onExecutorUnexcluded
Description copied from interface:SparkListenerInterfaceCalled when the driver re-enables a previously excluded executor.- Specified by:
onExecutorUnexcludedin interfaceSparkListenerInterface- Parameters:
executorUnexcluded- (undocumented)
-
onJobEnd
Description copied from interface:SparkListenerInterfaceCalled when a job ends- Specified by:
onJobEndin interfaceSparkListenerInterface- Parameters:
jobEnd- (undocumented)
-
onJobStart
Description copied from interface:SparkListenerInterfaceCalled when a job starts- Specified by:
onJobStartin interfaceSparkListenerInterface- Parameters:
jobStart- (undocumented)
-
onNodeBlacklisted
Description copied from interface:SparkListenerInterfaceCalled when the driver excludes a node for a Spark application.- Specified by:
onNodeBlacklistedin interfaceSparkListenerInterface- Parameters:
nodeBlacklisted- (undocumented)
-
onNodeBlacklistedForStage
Description copied from interface:SparkListenerInterfaceCalled when the driver excludes a node for a stage.- Specified by:
onNodeBlacklistedForStagein interfaceSparkListenerInterface- Parameters:
nodeBlacklistedForStage- (undocumented)
-
onNodeExcluded
Description copied from interface:SparkListenerInterfaceCalled when the driver excludes a node for a Spark application.- Specified by:
onNodeExcludedin interfaceSparkListenerInterface- Parameters:
nodeExcluded- (undocumented)
-
onNodeExcludedForStage
Description copied from interface:SparkListenerInterfaceCalled when the driver excludes a node for a stage.- Specified by:
onNodeExcludedForStagein interfaceSparkListenerInterface- Parameters:
nodeExcludedForStage- (undocumented)
-
onNodeUnblacklisted
Description copied from interface:SparkListenerInterfaceCalled when the driver re-enables a previously excluded node.- Specified by:
onNodeUnblacklistedin interfaceSparkListenerInterface- Parameters:
nodeUnblacklisted- (undocumented)
-
onNodeUnexcluded
Description copied from interface:SparkListenerInterfaceCalled when the driver re-enables a previously excluded node.- Specified by:
onNodeUnexcludedin interfaceSparkListenerInterface- Parameters:
nodeUnexcluded- (undocumented)
-
onOtherEvent
Description copied from interface:SparkListenerInterfaceCalled when other events like SQL-specific events are posted.- Specified by:
onOtherEventin interfaceSparkListenerInterface- Parameters:
event- (undocumented)
-
onResourceProfileAdded
Description copied from interface:SparkListenerInterfaceCalled when a Resource Profile is added to the manager.- Specified by:
onResourceProfileAddedin interfaceSparkListenerInterface- Parameters:
event- (undocumented)
-
onSpeculativeTaskSubmitted
Description copied from interface:SparkListenerInterfaceCalled when a speculative task is submitted- Specified by:
onSpeculativeTaskSubmittedin interfaceSparkListenerInterface- Parameters:
speculativeTask- (undocumented)
-
onStageCompleted
Description copied from interface:SparkListenerInterfaceCalled when a stage completes successfully or fails, with information on the completed stage.- Specified by:
onStageCompletedin interfaceSparkListenerInterface- Parameters:
stageCompleted- (undocumented)
-
onStageExecutorMetrics
Description copied from interface:SparkListenerInterfaceCalled with the peak memory metrics for a given (executor, stage) combination. Note that this is only present when reading from the event log (as in the history server), and is never called in a live application.- Specified by:
onStageExecutorMetricsin interfaceSparkListenerInterface- Parameters:
executorMetrics- (undocumented)
-
onStageSubmitted
Description copied from interface:SparkListenerInterfaceCalled when a stage is submitted- Specified by:
onStageSubmittedin interfaceSparkListenerInterface- Parameters:
stageSubmitted- (undocumented)
-
onTaskEnd
Description copied from interface:SparkListenerInterfaceCalled when a task ends- Specified by:
onTaskEndin interfaceSparkListenerInterface- Parameters:
taskEnd- (undocumented)
-
onTaskGettingResult
Description copied from interface:SparkListenerInterfaceCalled when a task begins remotely fetching its result (will not be called for tasks that do not need to fetch the result remotely).- Specified by:
onTaskGettingResultin interfaceSparkListenerInterface- Parameters:
taskGettingResult- (undocumented)
-
onTaskStart
Description copied from interface:SparkListenerInterfaceCalled when a task starts- Specified by:
onTaskStartin interfaceSparkListenerInterface- Parameters:
taskStart- (undocumented)
-
onUnpersistRDD
Description copied from interface:SparkListenerInterfaceCalled when an RDD is manually unpersisted by the application- Specified by:
onUnpersistRDDin interfaceSparkListenerInterface- Parameters:
unpersistRDD- (undocumented)
-
onUnschedulableTaskSetAdded
public void onUnschedulableTaskSetAdded(SparkListenerUnschedulableTaskSetAdded unschedulableTaskSetAdded) Description copied from interface:SparkListenerInterfaceCalled when a taskset becomes unschedulable due to exludeOnFailure and dynamic allocation is enabled.- Specified by:
onUnschedulableTaskSetAddedin interfaceSparkListenerInterface- Parameters:
unschedulableTaskSetAdded- (undocumented)
-
onUnschedulableTaskSetRemoved
public void onUnschedulableTaskSetRemoved(SparkListenerUnschedulableTaskSetRemoved unschedulableTaskSetRemoved) Description copied from interface:SparkListenerInterfaceCalled when an unschedulable taskset becomes schedulable and dynamic allocation is enabled.- Specified by:
onUnschedulableTaskSetRemovedin interfaceSparkListenerInterface- Parameters:
unschedulableTaskSetRemoved- (undocumented)
-