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

ExecutionListenerManager — Management Interface of QueryExecutionListeners

ExecutionListenerManager — Management Interface of QueryExecutionListeners

ExecutionListenerManager is the management interface for QueryExecutionListeners that listen for execution metrics:

  • Name of the action (that triggered a query execution)

  • QueryExecution

  • Execution time of this query (in nanoseconds)

ExecutionListenerManager is available as listenerManager property of SparkSession (and listenerManager property of SessionState).

ExecutionListenerManager takes a single SparkConf when created

While created, ExecutionListenerManager reads spark.sql.queryExecutionListeners configuration property with QueryExecutionListeners and registers them.

ExecutionListenerManager uses spark.sql.queryExecutionListeners configuration property as the list of QueryExecutionListeners that should be automatically added to newly created sessions (and registers them while being created).

Table 1. ExecutionListenerManager’s Public Methods
Method Description

register

unregister

clear

ExecutionListenerManager is created exclusively when BaseSessionStateBuilder is requested for ExecutionListenerManager (while SessionState is built).

ExecutionListenerManager uses listeners internal registry for registered QueryExecutionListeners.

onSuccess Internal Method

onSuccess…​FIXME

Note

onSuccess is used when:

onFailure Internal Method

onFailure…​FIXME

Note

onFailure is used when:

withErrorHandling Internal Method

withErrorHandling…​FIXME

Note
withErrorHandling is used when ExecutionListenerManager is requested to onSuccess and onFailure.

Registering QueryExecutionListener — register Method

Internally, register simply registers (adds) the input QueryExecutionListener to the listeners internal registry.

赞(0) 打赏
未经允许不得转载:spark技术分享 » ExecutionListenerManager — Management Interface of QueryExecutionListeners
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏