Spark提交任务运行报错:Unregistering ApplicationMaster...Promise already completed.

Spark报错处理系列之:Caused by: java.lang.StackOverflowError 阅读详情

报错日志:

2022-05-23 14:33:05,581 INFO yarn.ApplicationMaster: Unregistering ApplicationMaster with FAILED (diag message: User class threw exception: java.lang.IllegalStateException: Promise already completed.
	at scala.concurrent.Promise.complete(Promise.scala:53)
	at scala.concurrent.Promise.complete$(Promise.scala:52)
	at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:187)
	at scala.concurrent.Promise.success(Promise.scala:86)
	at scala.concurrent.Promise.success$(Promise.scala:86)
	at scala.concurrent.impl.Promise$DefaultPromise.success(Promise.scala:187)
	at org.apache.spark.deploy.yarn.ApplicationMaster.org$apache$spark$deploy$yarn$ApplicationMaster$$sparkContextInitialized(ApplicationMaster.scala:404)
	at org.apache.spark.deploy.yarn.ApplicationMaster$.sparkContextInitialized(ApplicationMaster.scala:895)
	at org.apache.spark.scheduler.cluster.YarnClusterScheduler.postStartHook(YarnClusterScheduler.scala:32)
	at org.apache.spark.SparkContext.<init>(SparkContext.scala:608)
	at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2555)
	at org.apache.spark.sql.SparkSession$Builder.$anonfun$getOrCreate$1(SparkSession.scala:930)
	at scala.Option.getOrElse(Option.scala:189)
	at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:921)
	at MovieDataAnalysisBySparkRDD$.demand_1_by_sparkSql(Run.scala:153)
	at Run$.main(Run.scala:187)
	at Run.main(Run.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:728)
)

报错原因:一个application 应该只能有一个SparkSession对象或者SparkConext对象。可以将spark或sc在主函数中创建,然后再以参数的形式传递。

object Run {
  def main(args: Array[String]): Unit = {
    // 1 创建上下文环境配置对象
    val conf: SparkConf = new SparkConf()
      .setAppName("movie_data_analysis")
      .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer") //替换默认序列化机制
      .registerKryoClasses(Array(classOf[MovieQuota])) //注册使用kryo序列化的自定义类
      .setMaster("yarn")

    // 2 创建SparkSession对象
    val spark: SparkSession = SparkSession.builder().config(conf).getOrCreate()
    println("------------字符编码------------")
    println(System.getProperty("file.encoding"))
    MovieDataAnalysisBySparkRDD.demand_1_by_sparkRdd(spark.sparkContext)
    MovieDataAnalysisBySparkRDD.demand_1_by_sparkSql(spark)
    spark.stop()
  }
}

[Spark streaming举例]-- yarn-cluster运行spark streaming问题 一、本地运行spark出现的错误 Exception in thread "main" java.lang.VerifyError: class com.fasterxml.jackson.module.scala.ser.ScalaIteratorSerializer overrides final method withResolved. (Lcom/fasterxml/jackson/... 阅读详情

相关推荐

大模型-高通平台性能测试示例-2

在QNN中,可以使用(genis-t2t-run)和这两个工具来进行推理的性能分析。支持在QNX操作系统或Android操作系统上进行性能分析。:提供基本的性能数据,如运行时间、资源消耗等。:提供更详细的性能数据,可能包括各个操作的执行时间、资源使用情况等。:是指在性能分析的同时进行代码质量检查,以发现潜在的问题。:是指跟踪和分析神经网络中各个操作的性能,以优化网络结构或参数。

点滴的岁月 1503

spark任务连接mysql

mysql 连接: 首先确认mysql的版本:执行查询语句 select version(); maven中配置mysql连接: <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.21</v

小小码农的博客 2244

告别懵圈!用CANoe 5640手把手带你跑通SomeIP TC8测试(附脚本思路)

本文详细解析了基于CANoe 5640的SomeIP TC8测试全流程,从环境搭建到结果分析,特别针对车载以太网测试中的SomeIP协议测试难点提供实战指南。通过典型测试用例SOMEIP_TEST_61,手把手教你配置CANoe工程、编写CAPL脚本,并解决常见问题,助力开发者高效完成协议验证。

weixin_30791095的博客 368

ERROR yarn.ApplicationMaster: Promise already completed.(基于spark将数据load到hive外部表时遇到的错误)

Traceback (most recent call last): File "local_etl_hive.py", line 20, in &lt;module&gt; .config('spark.debug.maxToStringFields', '100')\ File "/opt/cloudera/parcels/SPARK2-2.3.0.cloudera3-1....

西柚大数据 2230

DELL SC存储扩容避坑指南:6Gb vs 12Gb扩展柜混插的真相

本文深入解析DELL SC存储扩容中6Gb与12Gb扩展柜混插的核心规则与性能影响。文章指出,从SCOS 7.3版本起允许混插,但整个SAS环路速率将降至最低设备水平,尤其在12Gb控制器上接入6Gb扩展柜会严重拖累性能。指南提供了清晰的兼容性矩阵、实战操作流程及关键避坑清单,帮助管理员安全、高效地完成存储扩容。

weixin_28314575的博客 463

使用 ChatGPT/Copilot 提升前端开发效率的 N 种方式

typescript// 输入:根据这个 JavaScript 对象,生成完整的 TypeScript 类型定义id: '123',stock: 50,},// ChatGPT 生成:id: string;discount?: number;// 可选属性// 只读属性// 更进一步,生成 Zod schema 用于运行时验证:});}),});AI 代码助手真正的革命性不在于它能生成多少代码,而在于它改变了我们解决问题的方式。

fineday 1602

java.lang.IllegalStateException: Promise already completed.

然后看左下角记录的支持的python的版本列表,如图所以是查询的pyspark3.1.2的所支持的python列表。spark submit 提交作业的时候提示Promise already complete。这种情况是python版本和pyspark版本不一致的情况导致的。说一下查询pyspark兼容python版本查询的方法。

liu82327114的博客 922

别再折腾老教程了!树莓派4B/5最新系统(Raspberry Pi OS Bookworm)红外遥控配置,用gpio-ir驱动一次成功

本文详细介绍了树莓派4B/5在最新Raspberry Pi OS Bookworm系统下配置红外遥控的完整指南,摒弃过时的lirc-rpi驱动,采用现代gpio-ir驱动方案。从硬件连接到软件配置,提供10分钟快速上手指南,涵盖驱动加载、信号测试、按键映射及高级应用场景,帮助用户高效完成红外遥控配置。

weixin_42520909的博客 447

ERROR yarn.ApplicationMaster: Promise already completed.

18/09/11 11:41:58 INFO cluster.YarnClusterScheduler: Created YarnClusterScheduler 18/09/11 11:41:58 INFO cluster.SchedulerExtensionServices: Starting Yarn extension services with app application_15247...

u010791030的博客 6377

Natural Language Processing

作者:禅与计算机程序设计艺术 1.简介 自然语言处理(NLP)是研究如何使计算机理解和处理自然语言的理论和方法,目的是让电脑更好的理解、获取、生成、存储和沟通人类语言。20世纪80年代末,IBM的三位博士陈天奇、周博磊和王力雄在贝尔实验室创建了首个自然语言处理系统——“布莱克多·艾森豪威尔”(Bletc

AI天才研究院 737

6S大气校正模型说明

title: 6S大气校正 date: 2018-04-13 categories: 遥感图像处理 tags: 大气校正 6S辐射传输模型 6S(Second Simulation of Satellite Signal in the Solar Spectrum)辐射传输模型是由vermote E 和 Tanre D 等人用FORTRAN编写的适用于太阳反射波段(0.25~4um)的大...

qq_40974572的博客 9790

大数据中的组件报错及解决方法集锦——spark

1、spark版本不对 "Failed to execute spark task, with exception 'org.apache.hadoop.hive.ql.metadata.HiveException(Failed to create spark client.)' FAILED: Execution Error, return code 1 from org.apache.had

腼腆纯朴、程序猿 的专栏 4023

在YOLO中扩充新类别并且不影响旧类的识别精度

让我们先从简单的部分开始:用我们的新类训练自定义 YOLOv8 模型。在本教程中,我们将向模型添加车牌类。我们将使用Roboflow 中的一个数据集。这个数据集有两个车牌类。在开始训练之前,我们还必须对库进行一些更改。为了节省时间,我还将本教程中我们将进行的更改转换为补丁该补丁包含多项更改,但大多数更改都用于指南的下一部分。if RANK!= -1:是的,我们将编写一个回调。我们希望将此自定义训练模型的头部与 COCO 预训练模型中的旧头部一起使用。

如果想成为中心,那么就到中心去吧。 1230

spark maxResultSize

INFO org.apache.spark.deploy.yarn.ApplicationMaster: Unregistering ApplicationMaster with FAILED (diag message: User class threw exception: org.apache.spark.SparkException: Job aborted

SNS程飞的专栏 4250

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

深入解析java.lang.IllegalStateException异常

是Java中的一个非受检异常,它表示在不适当的时间或状态下调用方法。日志记录工具:如Log4j、Logback等,可以记录异常信息和错误日志,方便排查和分析问题。断言工具:如Assert类,可以在程序中添加断言语句,用于验证代码中的假设条件是否满足,帮助我们在开发和测试阶段快速发现问题。异常处理框架:如Spring框架中的异常处理机制,可以统一处理应用程序中的异常,提供统一的异常处理逻辑和错误信息返回。异常是程序中常见的错误和异常情况,合理处理异常对于保证程序的正确性和稳定性非常重要。

博客 4万+

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

提交PySpark应用程序以集群模式在YARN上触发

我正在尝试测试为我工作的团队构建的大数据平台。它在YARN上运行时具有火花。 是否可以创建PySpark应用并将其提交到YARN集群上? 我能够成功提交示例SparkPi jar文件,它在YARN stdout日志中返回输出。 这是我要测试的PySpark代码; <span style="color:#333333"><code>from pyspark import SparkConf from pyspark import SparkContext HDFS_MAST

u011250186的博客 2856

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

spark on yarn 的那些坑

在公司6个节点的测试集群运行得好好的,结果也很正常,然后放上60个节点的预生产环境,我勒个擦,搞了我两天,主要是生产环境的那些家伙不配合,一个问题搞得拖啊拖 ,首先是安全认证问题,截取一两个有意义的吧:       1.没有认证 Caused by: java.io.IOException: javax.security.sasl.SaslException: GSS initi

qq_32253371的博客 2302

Spark 1.5.2 on yarn升级问题总结

Spark 1.4.0 standlone升级到Spark 1.5.2 on yarn问题总结

我想静静 6025

SpringCloud(十六)Eureka Client启动后就关闭 Unregistering application xxx with eureka with status DOWN

springboot版本: 2.0.1.RELEASE springcloud版本: Finchley.RELEASE   日志: 2018-07-15 10:50:10.516 INFO 16952 --- [ main] c.x.springcloud.EurekaClientApplication : Started EurekaClientAppl...

徐海兴的专栏 2万+

ERROR yarn.ApplicationMaster: Promise already completed.

使用sparkStreaming读取kafka数据时,再需要借助hdfs存储路径下的文件可借助streamingContext,不使用spark.sparkSession即可

阿正的博客 646

Eureka Client启动后就关闭 Unregistering application xxx with eureka with status DOWN

报错如下: DiscoveryClient_USER-CENTER/192.168.1.231:user-center:2001: registering service... Started UserCenterApplication in 2.351 seconds (JVM running for 2.892)Unregistering application USER-CENTER w...

Sucker的小笔记 2419

大数据常见错误解决方案(转载)

1、用./bin/spark-shell启动spark时遇到异常:java.net.BindException: Can't assign requested address: Service 'sparkDriver' failed after 16 retries! 解决方法:add export SPARK_LOCAL_IP="127.0.0.1" to spark-env....

defang0693的博客 3420
上一篇: scala入门知识点
下一篇: 数据库报表:统计当前指标值比上月,比上季度,比年初,比去年同期增幅(同比)指标值,sql逻辑
宇文智
博客等级 码龄10年 4216粉丝 75原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值