gpt4 book ai didi

scala - Spark session 返回错误 : Apache NiFi

转载 作者:行者123 更新时间:2023-12-03 14:47:51 28 4
gpt4 key购买 nike

我们正在尝试使用 NiFi 运行一个 Spark 程序。 This is the basic sample我们试图跟随。

我们已经在 127.0.0.1:8998 中配置了 Apache-Livy 服务器.
ExecutiveSparkInteractive处理器用于运行示例 Spark 代码。

val gdpDF = spark.read.json("gdp.json")
val gdpRDD = gdpDF.rdd
gdpRDD.count()
LivyController127.0.0.1 配置端口 8998Session Type : spark .

当我们运行处理器时,我们得到以下错误:

Spark Session returned an error, sending the output JSON object as the flow file content to failure (after penalizing)



我们只想输出 JSON 文件中的行数。如何将其重定向到流文件?

NiFi 用户日志:

2020-04-13 21:50:49,955 INFO [NiFi Web Server-85] org.apache.nifi.web.filter.RequestLogger Attempting request for (anonymous) GET http://localhost:9090/nifi-api/flow/controller/bulletins (source ip: 127.0.0.1)



NiFi 应用程序.log

ERROR [Timer-Driven Process Thread-3] o.a.n.p.livy.ExecuteSparkInteractive ExecuteSparkInteractive[id=9a338053-0173-1000-fbe9-e613558ad33b] Spark Session returned an error, sending the output JSON object as the flow file content to failure (after penalizing)

最佳答案

我见过几个人在这个例子中挣扎。我建议遵循 Cloudera 社区中的这个示例(特别是注意第 2 部分)。
https://community.cloudera.com/t5/Community-Articles/HDF-3-1-Executing-Apache-Spark-via-ExecuteSparkInteractive/ta-p/247772
我会关心的关键点:

  • 你的 Spark 一般有效吗
  • 你的生活一般吗
  • Spark 示例代码好吗
  • 关于scala - Spark session 返回错误 : Apache NiFi,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61011111/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com