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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onApplicationEnd
(SparkListenerApplicationEnd applicationEnd) Called when the application endsvoid
onApplicationStart
(SparkListenerApplicationStart applicationStart) Called when the application startsvoid
onBlockManagerAdded
(SparkListenerBlockManagerAdded blockManagerAdded) Called when a new block manager has joinedvoid
onBlockManagerRemoved
(SparkListenerBlockManagerRemoved blockManagerRemoved) Called when an existing block manager has been removedvoid
onBlockUpdated
(SparkListenerBlockUpdated blockUpdated) Called when the driver receives a block update info.void
onEnvironmentUpdate
(SparkListenerEnvironmentUpdate environmentUpdate) Called when environment properties have been updatedvoid
onExecutorAdded
(SparkListenerExecutorAdded executorAdded) Called when the driver registers a new executor.void
onExecutorBlacklisted
(SparkListenerExecutorBlacklisted executorBlacklisted) Called when the driver excludes an executor for a Spark application.void
onExecutorBlacklistedForStage
(SparkListenerExecutorBlacklistedForStage executorBlacklistedForStage) Called when the driver excludes an executor for a stage.void
onExecutorExcluded
(SparkListenerExecutorExcluded executorExcluded) Called when the driver excludes an executor for a Spark application.void
onExecutorExcludedForStage
(SparkListenerExecutorExcludedForStage executorExcludedForStage) Called when the driver excludes an executor for a stage.void
onExecutorMetricsUpdate
(SparkListenerExecutorMetricsUpdate executorMetricsUpdate) Called when the driver receives task metrics from an executor in a heartbeat.void
onExecutorRemoved
(SparkListenerExecutorRemoved executorRemoved) Called when the driver removes an executor.void
onExecutorUnblacklisted
(SparkListenerExecutorUnblacklisted executorUnblacklisted) Called when the driver re-enables a previously excluded executor.void
onExecutorUnexcluded
(SparkListenerExecutorUnexcluded executorUnexcluded) Called when the driver re-enables a previously excluded executor.void
onJobEnd
(SparkListenerJobEnd jobEnd) Called when a job endsvoid
onJobStart
(SparkListenerJobStart jobStart) Called when a job startsvoid
onNodeBlacklisted
(SparkListenerNodeBlacklisted nodeBlacklisted) Called when the driver excludes a node for a Spark application.void
onNodeBlacklistedForStage
(SparkListenerNodeBlacklistedForStage nodeBlacklistedForStage) Called when the driver excludes a node for a stage.void
onNodeExcluded
(SparkListenerNodeExcluded nodeExcluded) Called when the driver excludes a node for a Spark application.void
onNodeExcludedForStage
(SparkListenerNodeExcludedForStage nodeExcludedForStage) Called when the driver excludes a node for a stage.void
onNodeUnblacklisted
(SparkListenerNodeUnblacklisted nodeUnblacklisted) Called when the driver re-enables a previously excluded node.void
onNodeUnexcluded
(SparkListenerNodeUnexcluded nodeUnexcluded) Called when the driver re-enables a previously excluded node.void
onOtherEvent
(SparkListenerEvent event) Called when other events like SQL-specific events are posted.void
Called when a Resource Profile is added to the manager.void
onSpeculativeTaskSubmitted
(SparkListenerSpeculativeTaskSubmitted speculativeTask) Called when a speculative task is submittedvoid
onStageCompleted
(SparkListenerStageCompleted stageCompleted) Called when a stage completes successfully or fails, with information on the completed stage.void
onStageExecutorMetrics
(SparkListenerStageExecutorMetrics executorMetrics) Called with the peak memory metrics for a given (executor, stage) combination.void
onStageSubmitted
(SparkListenerStageSubmitted stageSubmitted) Called when a stage is submittedvoid
onTaskEnd
(SparkListenerTaskEnd taskEnd) Called when a task endsvoid
onTaskGettingResult
(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).void
onTaskStart
(SparkListenerTaskStart taskStart) Called when a task startsvoid
onUnpersistRDD
(SparkListenerUnpersistRDD unpersistRDD) Called when an RDD is manually unpersisted by the applicationvoid
onUnschedulableTaskSetAdded
(SparkListenerUnschedulableTaskSetAdded unschedulableTaskSetAdded) Called when a taskset becomes unschedulable due to exludeOnFailure and dynamic allocation is enabled.void
onUnschedulableTaskSetRemoved
(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:SparkListenerInterface
Called when the application ends- Specified by:
onApplicationEnd
in interfaceSparkListenerInterface
- Parameters:
applicationEnd
- (undocumented)
-
onApplicationStart
Description copied from interface:SparkListenerInterface
Called when the application starts- Specified by:
onApplicationStart
in interfaceSparkListenerInterface
- Parameters:
applicationStart
- (undocumented)
-
onBlockManagerAdded
Description copied from interface:SparkListenerInterface
Called when a new block manager has joined- Specified by:
onBlockManagerAdded
in interfaceSparkListenerInterface
- Parameters:
blockManagerAdded
- (undocumented)
-
onBlockManagerRemoved
Description copied from interface:SparkListenerInterface
Called when an existing block manager has been removed- Specified by:
onBlockManagerRemoved
in interfaceSparkListenerInterface
- Parameters:
blockManagerRemoved
- (undocumented)
-
onBlockUpdated
Description copied from interface:SparkListenerInterface
Called when the driver receives a block update info.- Specified by:
onBlockUpdated
in interfaceSparkListenerInterface
- Parameters:
blockUpdated
- (undocumented)
-
onEnvironmentUpdate
Description copied from interface:SparkListenerInterface
Called when environment properties have been updated- Specified by:
onEnvironmentUpdate
in interfaceSparkListenerInterface
- Parameters:
environmentUpdate
- (undocumented)
-
onExecutorAdded
Description copied from interface:SparkListenerInterface
Called when the driver registers a new executor.- Specified by:
onExecutorAdded
in interfaceSparkListenerInterface
- Parameters:
executorAdded
- (undocumented)
-
onExecutorBlacklisted
Description copied from interface:SparkListenerInterface
Called when the driver excludes an executor for a Spark application.- Specified by:
onExecutorBlacklisted
in interfaceSparkListenerInterface
- Parameters:
executorBlacklisted
- (undocumented)
-
onExecutorBlacklistedForStage
public void onExecutorBlacklistedForStage(SparkListenerExecutorBlacklistedForStage executorBlacklistedForStage) Description copied from interface:SparkListenerInterface
Called when the driver excludes an executor for a stage.- Specified by:
onExecutorBlacklistedForStage
in interfaceSparkListenerInterface
- Parameters:
executorBlacklistedForStage
- (undocumented)
-
onExecutorExcluded
Description copied from interface:SparkListenerInterface
Called when the driver excludes an executor for a Spark application.- Specified by:
onExecutorExcluded
in interfaceSparkListenerInterface
- Parameters:
executorExcluded
- (undocumented)
-
onExecutorExcludedForStage
public void onExecutorExcludedForStage(SparkListenerExecutorExcludedForStage executorExcludedForStage) Description copied from interface:SparkListenerInterface
Called when the driver excludes an executor for a stage.- Specified by:
onExecutorExcludedForStage
in interfaceSparkListenerInterface
- Parameters:
executorExcludedForStage
- (undocumented)
-
onExecutorMetricsUpdate
Description copied from interface:SparkListenerInterface
Called when the driver receives task metrics from an executor in a heartbeat.- Specified by:
onExecutorMetricsUpdate
in interfaceSparkListenerInterface
- Parameters:
executorMetricsUpdate
- (undocumented)
-
onExecutorRemoved
Description copied from interface:SparkListenerInterface
Called when the driver removes an executor.- Specified by:
onExecutorRemoved
in interfaceSparkListenerInterface
- Parameters:
executorRemoved
- (undocumented)
-
onExecutorUnblacklisted
Description copied from interface:SparkListenerInterface
Called when the driver re-enables a previously excluded executor.- Specified by:
onExecutorUnblacklisted
in interfaceSparkListenerInterface
- Parameters:
executorUnblacklisted
- (undocumented)
-
onExecutorUnexcluded
Description copied from interface:SparkListenerInterface
Called when the driver re-enables a previously excluded executor.- Specified by:
onExecutorUnexcluded
in interfaceSparkListenerInterface
- Parameters:
executorUnexcluded
- (undocumented)
-
onJobEnd
Description copied from interface:SparkListenerInterface
Called when a job ends- Specified by:
onJobEnd
in interfaceSparkListenerInterface
- Parameters:
jobEnd
- (undocumented)
-
onJobStart
Description copied from interface:SparkListenerInterface
Called when a job starts- Specified by:
onJobStart
in interfaceSparkListenerInterface
- Parameters:
jobStart
- (undocumented)
-
onNodeBlacklisted
Description copied from interface:SparkListenerInterface
Called when the driver excludes a node for a Spark application.- Specified by:
onNodeBlacklisted
in interfaceSparkListenerInterface
- Parameters:
nodeBlacklisted
- (undocumented)
-
onNodeBlacklistedForStage
Description copied from interface:SparkListenerInterface
Called when the driver excludes a node for a stage.- Specified by:
onNodeBlacklistedForStage
in interfaceSparkListenerInterface
- Parameters:
nodeBlacklistedForStage
- (undocumented)
-
onNodeExcluded
Description copied from interface:SparkListenerInterface
Called when the driver excludes a node for a Spark application.- Specified by:
onNodeExcluded
in interfaceSparkListenerInterface
- Parameters:
nodeExcluded
- (undocumented)
-
onNodeExcludedForStage
Description copied from interface:SparkListenerInterface
Called when the driver excludes a node for a stage.- Specified by:
onNodeExcludedForStage
in interfaceSparkListenerInterface
- Parameters:
nodeExcludedForStage
- (undocumented)
-
onNodeUnblacklisted
Description copied from interface:SparkListenerInterface
Called when the driver re-enables a previously excluded node.- Specified by:
onNodeUnblacklisted
in interfaceSparkListenerInterface
- Parameters:
nodeUnblacklisted
- (undocumented)
-
onNodeUnexcluded
Description copied from interface:SparkListenerInterface
Called when the driver re-enables a previously excluded node.- Specified by:
onNodeUnexcluded
in interfaceSparkListenerInterface
- Parameters:
nodeUnexcluded
- (undocumented)
-
onOtherEvent
Description copied from interface:SparkListenerInterface
Called when other events like SQL-specific events are posted.- Specified by:
onOtherEvent
in interfaceSparkListenerInterface
- Parameters:
event
- (undocumented)
-
onResourceProfileAdded
Description copied from interface:SparkListenerInterface
Called when a Resource Profile is added to the manager.- Specified by:
onResourceProfileAdded
in interfaceSparkListenerInterface
- Parameters:
event
- (undocumented)
-
onSpeculativeTaskSubmitted
Description copied from interface:SparkListenerInterface
Called when a speculative task is submitted- Specified by:
onSpeculativeTaskSubmitted
in interfaceSparkListenerInterface
- Parameters:
speculativeTask
- (undocumented)
-
onStageCompleted
Description copied from interface:SparkListenerInterface
Called when a stage completes successfully or fails, with information on the completed stage.- Specified by:
onStageCompleted
in interfaceSparkListenerInterface
- Parameters:
stageCompleted
- (undocumented)
-
onStageExecutorMetrics
Description copied from interface:SparkListenerInterface
Called 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:
onStageExecutorMetrics
in interfaceSparkListenerInterface
- Parameters:
executorMetrics
- (undocumented)
-
onStageSubmitted
Description copied from interface:SparkListenerInterface
Called when a stage is submitted- Specified by:
onStageSubmitted
in interfaceSparkListenerInterface
- Parameters:
stageSubmitted
- (undocumented)
-
onTaskEnd
Description copied from interface:SparkListenerInterface
Called when a task ends- Specified by:
onTaskEnd
in interfaceSparkListenerInterface
- Parameters:
taskEnd
- (undocumented)
-
onTaskGettingResult
Description copied from interface:SparkListenerInterface
Called 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:
onTaskGettingResult
in interfaceSparkListenerInterface
- Parameters:
taskGettingResult
- (undocumented)
-
onTaskStart
Description copied from interface:SparkListenerInterface
Called when a task starts- Specified by:
onTaskStart
in interfaceSparkListenerInterface
- Parameters:
taskStart
- (undocumented)
-
onUnpersistRDD
Description copied from interface:SparkListenerInterface
Called when an RDD is manually unpersisted by the application- Specified by:
onUnpersistRDD
in interfaceSparkListenerInterface
- Parameters:
unpersistRDD
- (undocumented)
-
onUnschedulableTaskSetAdded
public void onUnschedulableTaskSetAdded(SparkListenerUnschedulableTaskSetAdded unschedulableTaskSetAdded) Description copied from interface:SparkListenerInterface
Called when a taskset becomes unschedulable due to exludeOnFailure and dynamic allocation is enabled.- Specified by:
onUnschedulableTaskSetAdded
in interfaceSparkListenerInterface
- Parameters:
unschedulableTaskSetAdded
- (undocumented)
-
onUnschedulableTaskSetRemoved
public void onUnschedulableTaskSetRemoved(SparkListenerUnschedulableTaskSetRemoved unschedulableTaskSetRemoved) Description copied from interface:SparkListenerInterface
Called when an unschedulable taskset becomes schedulable and dynamic allocation is enabled.- Specified by:
onUnschedulableTaskSetRemoved
in interfaceSparkListenerInterface
- Parameters:
unschedulableTaskSetRemoved
- (undocumented)
-