Apache spark 如何跨集群跟踪全局任务/作业失败率
我想跟踪集群中所有节点上作业/任务/阶段的全局故障率。目前的想法是解析历史服务器编写的HDF中的日志文件并获取这些数据,但这似乎很笨拙。有没有更好的办法?理想情况下,我可以访问客户端提交的每个作业的这些信息,但情况似乎并非如此。推荐的解决方法是什么?一个想法是将故障相关指标扩展并收集到您想要的任何地方(例如,将事件推送到麋鹿) 一些有用的活动:Apache spark 如何跨集群跟踪全局任务/作业失败率,apache-spark,pyspark,monitoring,Apache Spark,Pyspark,Monitoring,我想跟踪集群中所有节点上作业/任务/阶段的全局故障率。目前的想法是解析历史服务器编写的HDF中的日志文件并获取这些数据,但这似乎很笨拙。有没有更好的办法?理想情况下,我可以访问客户端提交的每个作业的这些信息,但情况似乎并非如此。推荐的解决方法是什么?一个想法是将故障相关指标扩展并收集到您想要的任何地方(例如,将事件推送到麋鹿) 一些有用的活动: case class SparkListenerExecutorBlacklisted( time: Long, executorId:
case class SparkListenerExecutorBlacklisted(
time: Long,
executorId: String,
taskFailures: Int)
extends SparkListenerEvent
case class SparkListenerExecutorBlacklistedForStage(
time: Long,
executorId: String,
taskFailures: Int,
stageId: Int,
stageAttemptId: Int)
extends SparkListenerEvent
case class SparkListenerNodeBlacklistedForStage(
time: Long,
hostId: String,
executorFailures: Int,
stageId: Int,
stageAttemptId: Int)
extends SparkListenerEvent
case class SparkListenerNodeBlacklisted(
time: Long,
hostId: String,
executorFailures: Int)
extends SparkListenerEvent
和听众:
def onExecutorBlacklisted(executorBlacklisted: SparkListenerExecutorBlacklisted): Unit
def onExecutorBlacklistedForStage(executorBlacklistedForStage: SparkListenerExecutorBlacklistedForStage): Unit
def onNodeBlacklistedForStage(nodeBlacklistedForStage: SparkListenerNodeBlacklistedForStage): Unit
def onNodeBlacklisted(nodeBlacklisted: SparkListenerNodeBlacklisted): Unit
请注意,您可以通过Spark上下文的addSparkListener
订阅侦听器。有关此其他堆栈溢出线程的更多详细信息:
注意:要使其与PySpark一起工作,请按照另一个堆栈溢出线程中描述的步骤进行操作:这似乎非常有用,但它似乎不适用于PySpark。请在引用另一个堆栈溢出线程的答案中添加一个注释,并给出实现步骤。谢谢