我正在使用spark-submit运行一个小的Spark应用程序。它失败了,但有一个例外。但是生成的控制台输出似乎被覆盖/混合。特别是,调用堆栈跟踪似乎与异常消息混杂在一起。
尝试将stdout和stderr重定向到单独的文件,但是没有运气。试图从Spark Web UI的应用程序日志中查看stdout / stderr,但它没有显示任何错误/异常。
这是在具有2个工作程序的dockerized Spark 2.4.0 / Scala 2.12上运行的。 Docker镜像是基于Docker Hub上可用的bde2020 / spark-base:latest镜像构建的。我试图调整其Dockerfile,以删除将Spark输出日志重定向到控制台的软链接。但是这些都不会对这个问题有任何影响。
下面是spark-submit命令和输出:
/ # spark-submit --class churnPredict --master spark://spark-master:7077 --conf spark.sql.shuffle.partitions=4 churn_2.12-0.1.0-SNAPSHOT.jar GDCData GDCData tdap790t1.labs
.teradata.com 2
19/05/28 13:53:40 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Create Spark Session
Build JDBC URL
Read the model from disk
Exceptioat org.apache.spark.rdd.RDD$$anonfun$first$1.apply(RDD.scala:1380)collection
at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
at org.apache.spark.rdd.RDD.first(RDD.scala:1377)63)
at org.apache.spark.ml.classification.LogisticRegressionModel$LogisticRegressionModelReader.load(LogisticRegression.scala:1251)
at org.apache.spark.ml.util.MLReadable$class.load(ReadWrite.scala:380)RegressionModelReader.load(LogisticRegression.scala:1245)
at churnPredict$.main(churn.scala:93).LogisticRegressionModel$.load(LogisticRegression.scala:1220)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:167)t$$runMain(SparkSubmit.scala:849)
at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:933).scala:924)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)