Package org.apache.spark.scheduler
Interface SparkListenerInterface
- All Known Implementing Classes:
SparkFirehoseListener
,SparkListener
,SpillListener
,StatsReportListener
public interface SparkListenerInterface
Interface for listening to events from the Spark scheduler. Most applications should probably
extend SparkListener or SparkFirehoseListener directly, rather than implementing this class.
Note that this is an internal interface which might change in different Spark releases.
-
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) Deprecated.use onExecutorExcluded instead.void
onExecutorBlacklistedForStage
(SparkListenerExecutorBlacklistedForStage executorBlacklistedForStage) Deprecated.use onExecutorExcludedForStage instead.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) Deprecated.use onExecutorUnexcluded instead.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) Deprecated.use onNodeExcluded instead.void
onNodeBlacklistedForStage
(SparkListenerNodeBlacklistedForStage nodeBlacklistedForStage) Deprecated.use onNodeExcludedForStage instead.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) Deprecated.use onNodeUnexcluded instead.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.
-
Method Details
-
onApplicationEnd
Called when the application ends- Parameters:
applicationEnd
- (undocumented)
-
onApplicationStart
Called when the application starts- Parameters:
applicationStart
- (undocumented)
-
onBlockManagerAdded
Called when a new block manager has joined- Parameters:
blockManagerAdded
- (undocumented)
-
onBlockManagerRemoved
Called when an existing block manager has been removed- Parameters:
blockManagerRemoved
- (undocumented)
-
onBlockUpdated
Called when the driver receives a block update info.- Parameters:
blockUpdated
- (undocumented)
-
onEnvironmentUpdate
Called when environment properties have been updated- Parameters:
environmentUpdate
- (undocumented)
-
onExecutorAdded
Called when the driver registers a new executor.- Parameters:
executorAdded
- (undocumented)
-
onExecutorBlacklisted
Deprecated.use onExecutorExcluded instead. Since 3.1.0.Called when the driver excludes an executor for a Spark application.- Parameters:
executorBlacklisted
- (undocumented)
-
onExecutorBlacklistedForStage
void onExecutorBlacklistedForStage(SparkListenerExecutorBlacklistedForStage executorBlacklistedForStage) Deprecated.use onExecutorExcludedForStage instead. Since 3.1.0.Called when the driver excludes an executor for a stage.- Parameters:
executorBlacklistedForStage
- (undocumented)
-
onExecutorExcluded
Called when the driver excludes an executor for a Spark application.- Parameters:
executorExcluded
- (undocumented)
-
onExecutorExcludedForStage
Called when the driver excludes an executor for a stage.- Parameters:
executorExcludedForStage
- (undocumented)
-
onExecutorMetricsUpdate
Called when the driver receives task metrics from an executor in a heartbeat.- Parameters:
executorMetricsUpdate
- (undocumented)
-
onExecutorRemoved
Called when the driver removes an executor.- Parameters:
executorRemoved
- (undocumented)
-
onExecutorUnblacklisted
Deprecated.use onExecutorUnexcluded instead. Since 3.1.0.Called when the driver re-enables a previously excluded executor.- Parameters:
executorUnblacklisted
- (undocumented)
-
onExecutorUnexcluded
Called when the driver re-enables a previously excluded executor.- Parameters:
executorUnexcluded
- (undocumented)
-
onJobEnd
Called when a job ends- Parameters:
jobEnd
- (undocumented)
-
onJobStart
Called when a job starts- Parameters:
jobStart
- (undocumented)
-
onNodeBlacklisted
Deprecated.use onNodeExcluded instead. Since 3.1.0.Called when the driver excludes a node for a Spark application.- Parameters:
nodeBlacklisted
- (undocumented)
-
onNodeBlacklistedForStage
Deprecated.use onNodeExcludedForStage instead. Since 3.1.0.Called when the driver excludes a node for a stage.- Parameters:
nodeBlacklistedForStage
- (undocumented)
-
onNodeExcluded
Called when the driver excludes a node for a Spark application.- Parameters:
nodeExcluded
- (undocumented)
-
onNodeExcludedForStage
Called when the driver excludes a node for a stage.- Parameters:
nodeExcludedForStage
- (undocumented)
-
onNodeUnblacklisted
Deprecated.use onNodeUnexcluded instead. Since 3.1.0.Called when the driver re-enables a previously excluded node.- Parameters:
nodeUnblacklisted
- (undocumented)
-
onNodeUnexcluded
Called when the driver re-enables a previously excluded node.- Parameters:
nodeUnexcluded
- (undocumented)
-
onOtherEvent
Called when other events like SQL-specific events are posted.- Parameters:
event
- (undocumented)
-
onResourceProfileAdded
Called when a Resource Profile is added to the manager.- Parameters:
event
- (undocumented)
-
onSpeculativeTaskSubmitted
Called when a speculative task is submitted- Parameters:
speculativeTask
- (undocumented)
-
onStageCompleted
Called when a stage completes successfully or fails, with information on the completed stage.- Parameters:
stageCompleted
- (undocumented)
-
onStageExecutorMetrics
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.- Parameters:
executorMetrics
- (undocumented)
-
onStageSubmitted
Called when a stage is submitted- Parameters:
stageSubmitted
- (undocumented)
-
onTaskEnd
Called when a task ends- Parameters:
taskEnd
- (undocumented)
-
onTaskGettingResult
Called when a task begins remotely fetching its result (will not be called for tasks that do not need to fetch the result remotely).- Parameters:
taskGettingResult
- (undocumented)
-
onTaskStart
Called when a task starts- Parameters:
taskStart
- (undocumented)
-
onUnpersistRDD
Called when an RDD is manually unpersisted by the application- Parameters:
unpersistRDD
- (undocumented)
-
onUnschedulableTaskSetAdded
Called when a taskset becomes unschedulable due to exludeOnFailure and dynamic allocation is enabled.- Parameters:
unschedulableTaskSetAdded
- (undocumented)
-
onUnschedulableTaskSetRemoved
void onUnschedulableTaskSetRemoved(SparkListenerUnschedulableTaskSetRemoved unschedulableTaskSetRemoved) Called when an unschedulable taskset becomes schedulable and dynamic allocation is enabled.- Parameters:
unschedulableTaskSetRemoved
- (undocumented)
-