org.apache.spark.util.SparkFatalException

前言

本文隶属于专栏《Spark异常问题汇总》,该专栏为笔者原创,引用请注明来源,不足和错误之处请在评论区帮忙指出,谢谢!

本专栏目录结构和参考文献请见 Spark异常问题汇总

问题描述

加工维表的过程中做了两个维表的关联报错:

java.util.concurrent.ExecutionException: org.apache.spark.util.SparkFatalException
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:206)
        at org.apache.spark.sql.execution.exchange.BroadcastExchangeExec$$anonfun$doExecuteBroadcast$2.apply$mcVI$sp(BroadcastExchangeExec.scala:152)
        at org.apache.spark.sql.execution.exchange.BroadcastExchangeExec$$anonfun$doExecuteBroadcast$2.apply(BroadcastExchangeExec.scala:150)
        at org.apache.spark.sql.execution.exchange.BroadcastExchangeExec$$anonfun$doExecuteBroadcast$2.apply(BroadcastExchangeExec.scala:150)
        at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:733)
        at scala.collection.immutable.Range.foreach(Range.scala:160)
        at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:732)
        at org.apache.spark.sql.execution.exchange.BroadcastExchangeExec.doExecuteBroadcast(BroadcastExchangeExec.scala:150)
        at org.apache.spark.sql.execution.InputAdapter.doExecuteBroadcast(WholeStageCodegenExec.scala:387)
        at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeBroadcast$1.apply(SparkPlan.scala:158)
        at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeBroadcast$1.apply(SparkPlan.scala:154)
        at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:169)
        at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
        at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:166)
        at org.apache.spark.sql.execution.SparkPlan.executeBroadcast(SparkPlan.scala:154)
        at org.apache.spark.sql.execution.joins.BroadcastHashJoinExec.prepareBroadcast(BroadcastHashJoinExec.scala:117)
        at org.apache.spark.sql.execution.joins.BroadcastHashJoinExec.codegenInner(BroadcastHashJoinExec.scala:211)
        at org.apache.spark.sql.execution.joins.BroadcastHashJoinExec.doConsume(BroadcastHashJoinExec.scala:101)
        at org.apache.spark.sql.execution.CodegenSupport$class.consume(WholeStageCodegenExec.scala:189)
        at org.apache.spark.sql.execution.ProjectExec.consume(basicPhysicalOperators.scala:41)
        at org.apache.spark.sql.execution.ProjectExec.doConsume(basicPhysicalOperators.scala:71)
        at org.apache.spark.sql.execution.CodegenSupport$class.consume(WholeStageCodegenExec.scala:189)
        at org.apache.spark.sql.execution.FilterExec.consume(basicPhysicalOperators.scala:91)
        at org.apache.spark.sql.execution.FilterExec.doConsume(basicPhysicalOperators.scala:216)
        at org.apache.spark.sql.execution.CodegenSupport$class.consume(WholeStageCodegenExec.scala:189)
        at org.apache.spark.sql.execution.FileSourceScanExec.consume(DataSourceScanExec.scala:165)
        at org.apache.spark.sql.execution.ColumnarBatchScan$class.produceBatches(ColumnarBatchScan.scala:144)
        at org.apache.spark.sql.execution.ColumnarBatchScan$class.doProduce(ColumnarBatchScan.scala:83)
        at org.apache.spark.sql.execution.FileSourceScanExec.doProduce(DataSourceScanExec.scala:165)
        at org.apache.spark.sql.execution.CodegenSupport$$anonfun$produce$1.apply(WholeStageCodegenExec.scala:90)
        at org.apache.spark.sql.execution.CodegenSupport$$anonfun$produce$1.apply(WholeStageCodegenExec.scala:85)
        at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:169)
        at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
        at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:166)
        at org.apache.spark.sql.execution.CodegenSupport$class.produce(WholeStageCodegenExec.scala:85)
        at org.apache.spark.sql.execution.FileSourceScanExec.produce(DataSourceScanExec.scala:165)
        at org.apache.spark.sql.execution.FilterExec.doProduce(basicPhysicalOperators.scala:131)
        at org.apache.spark.sql.execution.CodegenSupport$$anonfun$produce$1.apply(WholeStageCodegenExec.scala:90)
        at org.apache.spark.sql.execution.CodegenSupport$$anonfun$produce$1.apply(WholeStageCodegenExec.scala:85)
        at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:169)
        at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
        at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:166)
        at org.apache.spark.sql.execution.CodegenSupport$class.produce(WholeStageCodegenExec.scala:85)
        at org.apache.spark.sql.execution.FilterExec.produce(basicPhysicalOperators.scala:91)
        at org.apache.spark.sql.execution.ProjectExec.doProduce(basicPhysicalOperators.scala:51)
        at org.apache.spark.sql.execution.CodegenSupport$$anonfun$produce$1.apply(WholeStageCodegenExec.scala:90)
        at org.apache.spark.sql.execution.CodegenSupport$$anonfun$produce$1.apply(WholeStageCodegenExec.scala:85)
        at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:169)
        at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
        at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:166)
        at org.apache.spark.sql.execution.CodegenSupport$class.produce(WholeStageCodegenExec.scala:85)
        at org.apache.spark.sql.execution.ProjectExec.produce(basicPhysicalOperators.scala:41)
        at org.apache.spark.sql.execution.joins.BroadcastHashJoinExec.doProduce(BroadcastHashJoinExec.scala:96)
        at org.apache.spark.sql.execution.CodegenSupport$$anonfun$produce$1.apply(WholeStageCodegenExec.scala:90)
        at org.apache.spark.sql.execution.CodegenSupport$$anonfun$produce$1.apply(WholeStageCodegenExec.scala:85)
        at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:169)
        at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
        at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:166)
        at org.apache.spark.sql.execution.CodegenSupport$class.produce(WholeStageCodegenExec.scala:85)
        at org.apache.spark.sql.execution.joins.BroadcastHashJoinExec.produce(BroadcastHashJoinExec.scala:40)
        at org.apache.spark.sql.execution.ProjectExec.doProduce(basicPhysicalOperators.scala:51)
        at org.apache.spark.sql.execution.CodegenSupport$$anonfun$produce$1.apply(WholeStageCodegenExec.scala:90)
        at org.apache.spark.sql.execution.CodegenSupport$$anonfun$produce$1.apply(WholeStageCodegenExec.scala:85)
        at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:169)
        at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)

问题定位

创建广播的时候超时了,数据集太大

解决方案

  1. spark.sql.broadcastTimeout

默认5分钟,可以尝试把这个参数调大再试试,当然了,等那么久,值不值得就看作业整体情况了

  1. spark.sql.autoBroadcastJoinThreshold=-1

关掉 autoBroadcast

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: org.apache.tomcat.util.modeler是一个Java类库,用于管理和监控Tomcat服务器的运行状态。它提供了一组工具和API,可以让开发人员更方便地管理Tomcat服务器的配置和运行。该类库包含了一些核心类,如ModelMBean、ManagedBean、MBeanServer等,这些类可以帮助开发人员实现自定义的MBean,并将其注册到MBeanServer中,从而实现对Tomcat服务器的监控和管理。 ### 回答2: org.apache.tomcat.util.modeler是Apache Tomcat中的一个工具类库,用于管理和操作Java对象的模型。它提供了一套API和工具,可以用于创建、注册、查询和管理Java对象的模型和元数据。 org.apache.tomcat.util.modeler主要有以下几个功能: 1. 创建模型:通过使用ModelMBean接口和相关类,可以创建一个JavaBean对象的模型。这个模型可以包含一些属性、操作和事件,用于描述JavaBean的各种行为和特征。 2. 注册模型:通过使用ModelMBeanRegistration接口和相关类,可以将一个JavaBean对象的模型注册到Tomcat的模型管理器中。注册后,可以通过唯一的ObjectName标识符来访问和操作模型。 3. 查询模型:通过使用ModelMBeanInfo接口和相关类,可以查询模型的元数据信息,包括模型的属性、操作、事件等详细信息。这些信息可以用于动态管理和操作JavaBean对象。 4. 管理模型:通过使用ModelMBean接口和相关类,可以对模型进行一些管理操作,如属性值的设置和获取、操作的调用等。这些操作可以通过Java代码或JMX控制台来执行。 org.apache.tomcat.util.modeler的主要目的是提供一种简单、灵活且可扩展的方式来管理和操作Java对象的模型。它可以广泛应用于Tomcat服务器的管理和监控系统中,也可以作为独立的工具类库在其他Java应用程序中使用。通过使用org.apache.tomcat.util.modeler,开发人员可以更方便地管理和操作Java对象,提高系统的可管理性和可维护性。 ### 回答3: org.apache.tomcat.util.modeler是一个Apache Tomcat服务器的模块,用于管理和操作Java管理扩展(MBeans)。MBeans是一种Java对象,用于管理和监控Java应用程序的运行时行为。 org.apache.tomcat.util.modeler提供了一个框架,可以通过注解或XML配置文件定义MBeans,来监控和管理Java应用程序的各种方面。它通过使用Java动态代理和反射机制来实现动态生成和管理MBeans对象。 通过org.apache.tomcat.util.modeler,可以将Java应用程序的各种组件(如连接池、Servlet、JSP引擎等)以MBeans的形式暴露出来,从而可以通过标准的Java管理扩展API(JMX API)对其进行监控和管理。这些组件的属性和操作可以通过MBeans的属性和方法来获取和设置。 除了管理和监控外,org.apache.tomcat.util.modeler还提供了一些其他功能,例如:描述和验证MBeans的模型,自动生成MBeans的XML描述文件,支持运行时动态加载和卸载MBeans等。 总之,org.apache.tomcat.util.modeler是一个帮助开发人员实现和管理MBeans的工具,为Java应用程序提供了一种方便的方式来监控、管理和诊断运行时行为。它为Apache Tomcat服务器的开发和管理提供了强大的支持。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值