调用O137.分区时发生错误。 :org.apache.hadoop.mapred.invalidinputexception:不存在输入路径:hdfs:// ip ip

发布于 2025-01-27 02:44:01 字数 856 浏览 4 评论 0原文

我正在尝试在AWS EMR Spark群集中执行此GitHub项目

我已经成功运行了2个FISRT代码

  • tweet_stream_producer.py
  • sparkml_train_model.py,

但是当我使用命令运行消费者时,

spark-submit --packages org.apache.spark:spark-sql-kafka-0-10_2.12:3.0.0,io.delta:delta-core_2.12:0.7.0 tweet_stream_consumer.py

我有文件路径错误

Py4JJavaError: An error occurred while calling o137.partitions.
: org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://ip-10-0-0-61.ec2.internal:8020/home/hadoop/spark-twitter-streaming/TwitterStreaming/src/app/models/metadata

,似乎问题位于本地文件系统路径和hadoop文件系统路径之间映射

model_path = str(SRC_DIR / 'models')

pipeline_model = PipelineModel.load(model_path)

I am trying to execute this github project in an aws emr spark cluster
https://github.com/pran4ajith/spark-twitter-streaming.git

I've succeeded to run 2 fisrt codes

  • tweet_stream_producer.py
  • sparkml_train_model.py

But when I run consumer part with command

spark-submit --packages org.apache.spark:spark-sql-kafka-0-10_2.12:3.0.0,io.delta:delta-core_2.12:0.7.0 tweet_stream_consumer.py

I got file path error

Py4JJavaError: An error occurred while calling o137.partitions.
: org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://ip-10-0-0-61.ec2.internal:8020/home/hadoop/spark-twitter-streaming/TwitterStreaming/src/app/models/metadata

It seems that the problem is located mapping between local file system path and hadoop file system path

model_path = str(SRC_DIR / 'models')

pipeline_model = PipelineModel.load(model_path)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文