关注 spark技术分享,
撸spark源码 玩spark最佳实践

AppStatusListener

AppStatusListener

AppStatusListener is a SparkListener that AppStatusStore uses to…​FIXME

AppStatusListener is created when:

Table 1. AppStatusListener’s Event Handlers
Event Handler

SparkListenerApplicationStart

onApplicationStart

SparkListenerApplicationEnd

onApplicationEnd

SparkListenerBlockManagerAdded

onBlockManagerAdded

SparkListenerBlockManagerRemoved

onBlockManagerRemoved

SparkListenerBlockUpdated

onBlockUpdated

SparkListenerEnvironmentUpdate

onEnvironmentUpdate

SparkListenerEvent

onOtherEvent

SparkListenerExecutorAdded

onExecutorAdded

SparkListenerExecutorBlacklisted

onExecutorBlacklisted

SparkListenerExecutorMetricsUpdate

onExecutorMetricsUpdate

SparkListenerExecutorRemoved

onExecutorRemoved

SparkListenerExecutorUnblacklisted

onExecutorUnblacklisted

SparkListenerJobStart

onJobStart

SparkListenerJobEnd

onJobEnd

SparkListenerNodeBlacklisted

onNodeBlacklisted

SparkListenerNodeUnblacklisted

onNodeUnblacklisted

SparkListenerStageCompleted

onStageCompleted

SparkListenerStageSubmitted

onStageSubmitted

SparkListenerTaskEnd

onTaskEnd

SparkListenerTaskGettingResult

onTaskGettingResult

SparkListenerTaskStart

onTaskStart

SparkListenerUnpersistRDD

onUnpersistRDD

Table 2. AppStatusListener’s Internal Properties (e.g. Registries, Counters and Flags)
Name Description

appInfo

v1.ApplicationInfo

appSummary

AppSummary

liveUpdatePeriodNs

coresPerTask

Default: 1

liveRDDs

LiveRDDs by RDD ID

liveStages

LiveStages by (Int, Int)

liveTasks

LiveTask by task ID

liveJobs

LiveJob by job ID

liveExecutors

LiveExecutor by executor ID

pools

SchedulerPool by FIXME

activeExecutorCount

Number of active executors

onStageSubmitted Method

Note
onStageSubmitted is part of SparkListener Contract to…​FIXME.

onStageSubmitted…​FIXME

update Internal Method

update simply requests the LiveEntity to write (with the ElementTrackingStore as the store and the last flag as checkTriggers flag).

Note
update is used in event handlers (i.e. onApplicationStart, onExecutorRemoved, onJobEnd, onStageSubmitted, onTaskEnd, onStageCompleted), liveUpdate, maybeUpdate, flush and updateRDDBlock.

flush Internal Method

flush…​FIXME

Note
flush is used when…​FIXME

maybeUpdate Internal Method

maybeUpdate…​FIXME

Note
maybeUpdate is used when…​FIXME

liveUpdate Internal Method

liveUpdate…​FIXME

Note
liveUpdate is used when…​FIXME

updateStreamBlock Internal Method

updateStreamBlock…​FIXME

Note
updateStreamBlock is used exclusively when AppStatusListener is requested to handle a SparkListenerBlockUpdated event (for a StreamBlockId).

Intercepting SparkListenerBlockUpdated Events — onBlockUpdated Handler Method

Note
onBlockUpdated is part of SparkListener Contract to…​FIXME.

onBlockUpdated simply dispatches to the following event-specific handlers (per BlockId type):

Creating AppStatusListener Instance

AppStatusListener takes the following when created:

AppStatusListener initializes the internal registries and counters.

updateRDDBlock Internal Method

updateRDDBlock…​FIXME

Note
updateRDDBlock is used exclusively when AppStatusListener is requested to handle a SparkListenerBlockUpdated event (for a RDDBlockId).
赞(0) 打赏
未经允许不得转载:spark技术分享 » AppStatusListener
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏